Can I use both SMAC and MAC at the same time?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can I use both SMAC and MAC at the same time?

2,309 Views
VincentLau
Contributor I
Hi, everyone
 
   I am a newer for Zigbee. I am using two MC13213-SRB demo boards. Can I use SMAC codebase when the endpoint communicate with another endpoint ,however, use MAC codebase when the device  is going to a network as a coordinator?
 
Best regards
 
Vincent
Labels (1)
0 Kudos
Reply
7 Replies

672 Views
VincentLau
Contributor I
Hi, Mark
 
    Thanks again for your reply. I would like to have the API drivers built for MAC and SMAC. I would initialize only MAC or SMAC at any given time. Do you see this posing as a problem in driver?
    There are a few issues I see with SMAC. It works perfectly as long as there is a single device in the vicinity. But if there are multiple, then I need to start worrying about addressing, security etc. 
Developing all those API may take longer time. MAC would be a better choice in this scenario. We anticipate having 2-3 Zigbee devices per Device. It means that I have only a main Device, other slave Device comunicate with the main throught Zigbee module. I think it will be easier if SMAC can achieve this. Can I use SMAC?
 
Best regards

Vincent

 


0 Kudos
Reply

672 Views
addiyi
NXP Employee
NXP Employee
Hello Vincent.

SMAC only implements the layer to handle the transceiver it means transmit, receive, change channel, adjust transmitter output power, CCA operation and low power modes. SMAC is intended to provide a communication point to point since it doesn’t implement any networking function like bind, associate, dissociate, addressing, etc. So, for your application it is recommanded to use MAC.

Regards,
Adrian
0 Kudos
Reply

672 Views
VincentLau
Contributor I
Hi, Adrian
 
    I think I should give you more details about my project: There are only one Controller and 2-3 end Devices in the system. However, end Devices do not need to comunicate with each other through Controller, each Device just needs to talk with Controller respectively and in series. Actually, this is also an end-to-end mode. The problem is that: how can I distinguish different end Devices that controller wants to talk? Can I still use SMAC, as this is a easy and convenient for me? Thank you very much!
 
Best regards
 
Vincent
0 Kudos
Reply

672 Views
addiyi
NXP Employee
NXP Employee
Using SMAC will be difficult to implement what you need for your project, because the SMAC don't provide this features. Will be your job to write a code for distinguish different end devices that controller wants to talk and this will be difficult. I recommend you to use MAC, because in this way you have already implement point-to-multipoint access (Peer-to-Peer and Star Networks) and you will be focused on the application, not on devices communications problems.

BR,
Adrian
0 Kudos
Reply

672 Views
VincentLau
Contributor I
Hi, Mark
 
    Thank you for you reply so quickly. However, maybe I have to use both MAC and SMAC now for some other reasons. When I create a new project in BeeKit, I have to choose codebase first. Either MAC or SMAC, I can just choose one of two.  How can I use both of them? Thanks again!
 
Best regards
 
Vincent
0 Kudos
Reply

672 Views
UK_CF_FAE
NXP Employee
NXP Employee
OK, if you MUST use both SMAC and MAC....
 
1) I do not recommend that you do this
2) Create your solution in BeeKit with the MAC codebase, with 2 projects, one for the coordinator and one for the device.
3) Export as XML files, and import into CodeWarrior. Here, call the coordinator project MAC_SRB_PAN1.mcp and the end device MAC_SRB_ED1,mcp
 
4) Now, back in Beekit, create a new solution with the SMAC codebase, with 2 projects, one for the coordinator and one for the device.
5) Export as XML files, and import into CodeWarrior. Now, call the coordinator project SMAC_SRB_PAN1.mcp and the end device SMAC_SRB_ED1.mcp.
 
6) Now you will begin to recognise your mistake, and you have 4 corewarrior projects. You are going to have to merge the coordinator projects into one main application. Choose how you will switch from one sub-application (MAC) to the other application (SMAC).
7) Let's assume that it is on a button-press. In the interrupt service routine for the button press, you're going to have to set a flag, and back in the main loop, test that flag and basically re-initialise the whole app.
 
8) This is a completely crazy thing to try and do. Problems that I can for-see are related to the amount of flash memory in something like the MC13213 (60kbytes) and the whole time that it will take to switch, particularly back to the MAC application.
 
9) I do not recommend that you do this.
 
Maybe it would help the forum i f you explain what you are trying to achieve, and we will come up with a more simple method to achieve this.
 
Mark
0 Kudos
Reply

672 Views
UK_CF_FAE
NXP Employee
NXP Employee
Hi Vincent,
 
Welcome to the forum. You have come to the right place. I trust that you have a good experience of Freescale and our IEEE802.15.4 radios & software.
 
Your question - can you use the SMAC and the MAC at the same time. Technically it would be possible, but I would advice against it.
 
In a simple star network, the central coordinator can communicare with all the end devices using the MAC network, and the end devices can messages to each other (via the coordinator)  using the MAC, too.
 
An IEEE compliant network always has one node which is the network owner, it has a Full function Device FFD library, and is the PAN coordinator. The network can have many end devices, using the Reduced Function Device library.
 
Good luck,
 
Mark
 
 
0 Kudos
Reply