Problem making a ZigBee beaconed network

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

Problem making a ZigBee beaconed network

Jump to solution
3,345 Views
neocronos
Contributor III
Hello. First, please don't scroll down yet, I copied/pasted many things and it may look too long to read but I'll try my best to make it short. Second, I'll explain the tools I'm using:

- CodeWarrior 5.9
- BeeKit 1.5 with MAC CodeBase 1.01
- 3 Panasonic PAN802154HAR Modules (imagine 3 SARDs)
- RS232 to Hyperterminal kind of interface.

What I'm trying to do is to create a little network between one coordinator and two end devices. The coordinator will be AC powered and the devices will have battery. I'm checking MyWirelessApp Demos, trying to understand how they work. I tried 6a and 6b demos (non beaconed networks) since their description was pretty suitable for what I'm looking for, I'll quote it:

"In many user scenarios, there will be one PAN coordinator with several devices associated to it and the PAN coordinator will be powered with AC power, where the devices will be powered by a battery."

But then I found that with just 6a and 6b demos (without mayor modifications) wasn't enough to hold a simple communication from the coordinator to both devices, seems like if I had to modify their code to no lose packets because if not then the devices will only get part of the data sent.

Before going deep into demo 6, I decided to try a beaconed network (demo 7). I did some calculations (between, if someone knows where to find a site with beaconed math well explained, I'd appreciate it) and I got BO = 5 and SO = 1, I made BeeKit solutions exported them to CodeWarrior and when I run them I get this at the HyperTerminal:

Code:
MyWirelessApp_07-Coordinator demo application is initialized and ready.Initiating the Energy Detection ScanSending the MLME-Scan Request message to the MAC...DoneReceived the MLME-Scan Confirm message from the MACED scan returned the following results:  [10 0E 0C 30 00 88 30 80 10 00 10 10 00 30 30 30 ]Based on the ED scan the logical channel 0x0F was selectedStarting as PAN coordinator on channel 0x0FSending the MLME-Start Request message to the MAC...DoneStarted the coordinator with PAN ID 0xBEEF, and short address 0xCAFE.Ready to send and receive data over the UART.

Then, when I connect the 1st device:

Code:
MyWirelessApp_07-EndDevice demo 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....0x0FBeacon Spec........0xCF15Link Quality.......0xB2Associating to PAN coordinator on channel 0x0FSending the MLME-Associate Request message to the MAC...DoneSuccessfully associated with the coordinator.We were assigned the short address 0x0001Ready to send and receive data over the UART.

 Coordinator shows:

Code:
Received an MLME-Associate Indication from the MACSending the MLME-Associate Response message to the MAC...DoneReceived an MLME-Comm-Status Indication from the MAC - status = 00
 
... Until here it works great. Then, when I connect the 2nd device it shows:

Code:
MyWirelessApp_07-EndDevice demo 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....0x0FBeacon Spec........0xCF15Link Quality.......0xA6Associating to PAN coordinator on channel 0x0FSending the MLME-Associate Request message to the MAC...Done
 
and the Coordinator shows:

Code:
Received an MLME-Associate Indication from the MACSending the MLME-Associate Response message to the MAC...DoneReceived an MLME-Comm-Status Indication from the MAC - status = 00

But then, the 2nd device shows:

Code:
Associate Confirm wasn't successful...Start scanning for a PAN coordinatorSending the MLME-Scan Request message to the MAC...Done

An then it shows:

Code:
Found a coordinator with the following properties: ...

But once again it shows:

Code:
Associate Confirm wasn't successful ...

and so on, and the Coordinator keeps showing:

Code:
Received an MLME-Associate Indication from the MACSending the MLME-Associate Response message to the MAC...DoneReceived an MLME-Comm-Status Indication from the MAC - status = 00

Any idea of why it isn't working well? and if you wanna give me other kind of advices, I'd appreciate it too.

Thanks a lot for the help.



Message Edited by neocronos on 2008-06-05 11:15 PM
Labels (1)
0 Kudos
1 Solution
645 Views
UK_CF_FAE
NXP Employee
NXP Employee
Hi Neocronos,
 
Well, 117 people before me read you post, but it is one of us Freescale employees who are brave enough to answer it.
 
[Tags]
BeeKit. SARD. CodeWarrior. Version. 1.0.3 applicationconf.h
 
 
First Point,
1) Check the version numbers that you are using.
 
You mentioned CW 5.9, but this is the version number of the IDE within CodeWarrior. I'll assume that this was actually IDE 5.9.0, shipped with CW for MCU version 6.1.  
 
Anyone reading this - to find your CW version number, inside CW go to Help | About. At the dialog screen, select Installed Products, and the CW version number is displayed at the top of the Installed Products dialog.
 
Next, your version of BeeKit is quite old. The current MAC codebase is 1.0.3 and we fixed a whole stack of things in this, as detailed in the release notes for the product which is installed into the \Program files\Freescale\BeeKit directory.
 
 
Second Point
2) I'd say that the 2-off end devices have the same MAC addresses. Check this inside CW - it is file applicationconf.h (well, it is in MAC1.0.3).
 
Make a simple test - run the PAN, then get the first board to join the network only. Turn everything off. Run the PAN. Get the second board to join the network only. I'd guess that it is OK.
 
Maybe you programmed MAC address FFFFFFFFFFFF into the boards, to generate a random MAC address. The algorithm for the random addresses is not great, but I doubt that both boards get the same random MAC address every time. Most unlikely.
 
Try those suggestions, and you can download latest BeeKit from www.freescale.com/zigbee. Its about 90MBytes, but well worth the effort.
 
 Let us know how you got on, good luck.
 
 
Mark
R60287
 
 

View solution in original post

0 Kudos
8 Replies
646 Views
UK_CF_FAE
NXP Employee
NXP Employee
Hi Neocronos,
 
Well, 117 people before me read you post, but it is one of us Freescale employees who are brave enough to answer it.
 
[Tags]
BeeKit. SARD. CodeWarrior. Version. 1.0.3 applicationconf.h
 
 
First Point,
1) Check the version numbers that you are using.
 
You mentioned CW 5.9, but this is the version number of the IDE within CodeWarrior. I'll assume that this was actually IDE 5.9.0, shipped with CW for MCU version 6.1.  
 
Anyone reading this - to find your CW version number, inside CW go to Help | About. At the dialog screen, select Installed Products, and the CW version number is displayed at the top of the Installed Products dialog.
 
Next, your version of BeeKit is quite old. The current MAC codebase is 1.0.3 and we fixed a whole stack of things in this, as detailed in the release notes for the product which is installed into the \Program files\Freescale\BeeKit directory.
 
 
Second Point
2) I'd say that the 2-off end devices have the same MAC addresses. Check this inside CW - it is file applicationconf.h (well, it is in MAC1.0.3).
 
Make a simple test - run the PAN, then get the first board to join the network only. Turn everything off. Run the PAN. Get the second board to join the network only. I'd guess that it is OK.
 
Maybe you programmed MAC address FFFFFFFFFFFF into the boards, to generate a random MAC address. The algorithm for the random addresses is not great, but I doubt that both boards get the same random MAC address every time. Most unlikely.
 
Try those suggestions, and you can download latest BeeKit from www.freescale.com/zigbee. Its about 90MBytes, but well worth the effort.
 
 Let us know how you got on, good luck.
 
 
Mark
R60287
 
 
0 Kudos
645 Views
neocronos
Contributor III
Thanks a lot for answering. I meant to check the thread sooner but I had a surgery and I was on recovery so I stopped studying for a couple of weeks. Now I'm back :smileyhappy:

I didn't know there were IDE version and CW version, mine are 5.9 and 6.1 as you said.

Is there a way to keep the codebases updated without having to download the whole BeeKit? I searched at Freescale's ZigBee section and I didn't find it. Though, I have MAC 1.0.3 now.

:smileysurprised: There isn't SARD option anymore ... my project is based on SARD configuration + some changes on the headers to be able to use PAN802154HAR modules. How can I go on then?

Thanks again.
0 Kudos
645 Views
neocronos
Contributor III
:smileyvery-happy: User defined target is working much better with this new BeeKit. I finally could use my PAN802154HAR without using SARD as target. I still had to replace PWR_Configuration.h file. Seems like if the user defined target editer didn't save the switch configurations. Complete explanation of why here:

http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&thread.id=9756&page=1
(you can use ctrl+F and search for PWR_Configuration.h instead of reading the whole thread)

I will test Beaconed demos and come back with more inputs. I tested Non Beaconed and I'm still having issues when I send information from the coordinator to both devices. How can I decide which device the coordinator will send information to? what if I wanted to send info to both?. Right now the coordinator is sending characters (I'm using Hyperterminal kind of interface) to just one device at the time and I don't really know how it decides to which one. I would appreciate help here because I was told Non Beaconed network was the way to go for my project.

Thanks
0 Kudos
645 Views
neocronos
Contributor III
I was using random MAC address (FFFFFFFFFFFF) so I manually assigned all the address and it worked :smileyhappy: (thanks UK CF FAE!). Now I got both, Beaconed and Non Beaconed networks with the same behavior I told on the last reply which I will quote here:


neocronos wrote:

I'm still having issues when I send information from the coordinator to both devices. How can I decide which device the coordinator will send information to? what if I wanted to send info to both?. Right now the coordinator is sending characters (I'm using Hyperterminal kind of interface) to just one device at the time and I don't really know how it decides to which one. I would appreciate help here because I was told Non Beaconed network was the way to go for my project.



Hope someone drops a little of help :smileywink:

0 Kudos
645 Views
neocronos
Contributor III
Helloooooow.
0 Kudos
645 Views
neocronos
Contributor III
Hey guys I know some of you have deep knowledge on ZigBee issues and I'd really appreciate some feedback.

Thanks
0 Kudos
645 Views
neocronos
Contributor III
... :smileysad:


Message Edited by neocronos on 2008-07-08 03:09 AM
0 Kudos
645 Views
neocronos
Contributor III
How can I do to get some help here? any advice?
0 Kudos