Little doubt on ZigBee non beaconed network addressing

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

Little doubt on ZigBee non beaconed network addressing

Jump to solution
1,753 Views
neocronos
Contributor III
Hello,

First, what I'm working with:

- IDE 5.9.0 and CW for MCU version 6.1.
- BeeKit 1.9.2 with HCS08 MAC CodeBase 1.0.4
- 3 Panasonic PAN802154HAR modules (almost SARDs). One as coordinator and two as end devices.
- 2 MC9S08QG8 which act as the robot's brain, handling the recieved packages through the end devices.
- MyWirelessApp Demo Non Beacon (Coordinator & End Device) with minor modifications.
- And just for test purposes, RS232 to Hyperterminal kind of interface.

Second, the doubt: As I mentioned, I'm using a coordinator and two end devices. MyWirelessApp for End Devices gives some useful data when the end device finds a coordinator. Here is a quick shot:

Code:
MyWirelessApp Demo Non Beacon End Device application is initialized and ready.
Start scanning for a PAN coordinatorSending the MLME-Scan Request message to the MAC...DoneFound a coordinator with the following properties:----------------------------------------------------Address...........0xCAFEPAN ID............0xBEEFLogical Channel...0x12Beacon Spec.......0xCFFFLink Quality......0xD3Associating to PAN coordinator on channel 0x12Sending the MLME-Associate Request message to the MAC...DoneSuccessfully associated with the coordinator.We were assigned the short address 0x0001
 
What I noted is that it's short address (0x0001) doesn't change, even if there is a first end device already associated with the coordinator and what I wanted to do, was to take that address and to use it as header for the outgoing packages. Of course, it would be pointless if the address as well doesn't change.

What should I do in order to make it change? Did I forget something?

Thanks for the help.


Message Edited by neocronos on 2008-12-17 05:12 PM

Message Edited by neocronos on 2008-12-17 05:13 PM
Labels (1)
0 Kudos
Reply
1 Solution
552 Views
Mads
Contributor V
Hi Neocronos,
 
the 802.15.4 MACPHY codebase is a MAC - Media Access Controller and does not provide you with network layer functionality like ZigBee Does.
 
The MyWirelessApp provide you a good startng point, which works with 1 coordinator and 1 end device.
the MyStarNetworkApp provides you a good starting point for a star network.
 
But in the MyWirelessApp there is no addressing scheme (you need to program your own). If you look at the function App_SendAssociateResponse() you will see that when ever a node joins the 0x0001 address is always supplied:
 
  
    /* Assign a short address to the device. In this example we simply
       choose 0x0001. Though, all devices and coordinators in a PAN must have
       different short addresses. However, if a device do not want to use
       short addresses at all in the PAN, a short address of 0xFFFE must
       be assigned to it. */
    if(pMsgIn->msgData.associateInd.capabilityInfo & gCapInfoAllocAddr_c)
    {
      /* Assign a unique short address less than 0xfffe if the device requests so. */
      pAssocRes->assocShortAddress[0] = 0x01;
      pAssocRes->assocShortAddress[1] = 0x00;
    }
    else
 
If you need more devices joining you should make your own addressing scheme and re-program this code.
I can only recommend that you look at the MyStarNetworkApp as an example.
 
BR,
Mads

View solution in original post

0 Kudos
Reply
2 Replies
553 Views
Mads
Contributor V
Hi Neocronos,
 
the 802.15.4 MACPHY codebase is a MAC - Media Access Controller and does not provide you with network layer functionality like ZigBee Does.
 
The MyWirelessApp provide you a good startng point, which works with 1 coordinator and 1 end device.
the MyStarNetworkApp provides you a good starting point for a star network.
 
But in the MyWirelessApp there is no addressing scheme (you need to program your own). If you look at the function App_SendAssociateResponse() you will see that when ever a node joins the 0x0001 address is always supplied:
 
  
    /* Assign a short address to the device. In this example we simply
       choose 0x0001. Though, all devices and coordinators in a PAN must have
       different short addresses. However, if a device do not want to use
       short addresses at all in the PAN, a short address of 0xFFFE must
       be assigned to it. */
    if(pMsgIn->msgData.associateInd.capabilityInfo & gCapInfoAllocAddr_c)
    {
      /* Assign a unique short address less than 0xfffe if the device requests so. */
      pAssocRes->assocShortAddress[0] = 0x01;
      pAssocRes->assocShortAddress[1] = 0x00;
    }
    else
 
If you need more devices joining you should make your own addressing scheme and re-program this code.
I can only recommend that you look at the MyStarNetworkApp as an example.
 
BR,
Mads
0 Kudos
Reply
552 Views
neocronos
Contributor III
Thanks for the answer Mads.

I just tried the MyStarNetworkApp and worked fine, actually, it is similar to what I need but unfortunately, it only allows to send pre-defined messages from the end devices to the coordinator. The application that I'm working on sends "built" in running time messages and in both ways. Is there a way to use MyStarNetworkApp without the power-saving features to allow a true "wireless" kind of communication?.

If not, what would be smarter: To take MyStarNetworkApp and to modify it to have fluently packages btw devices or to take MyWirelessApp and to modify it to have an own addressing scheme, as Mads said?. I would say that the second one. It shouldn't be too complicated to add a short scheme.

EDIT. I forgot to mention something. The broadcast used in the MyStarNetworkApp is perfect for my application and I'm having hard times without it in the other demos. I haven't checked well their code but I'm kinda avoiding to try mayor modifications inside the demos code, mostly, because their "programming style" is a bit strange for me (perhaps because I'm not a pro). Any advice to have broadcast, "throughput" and a very short addressing scheme (not to address packages but to just asign addresses to few devices)? would it be hard to use code from one demo to another?


Message Edited by neocronos on 2008-12-17 11:40 PM
0 Kudos
Reply