Re: Beacon Tree Mode - PART 2

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

Re: Beacon Tree Mode - PART 2

4,130 Views
lex4098
Contributor III
Why SO is different from BO? Maybe with SO = 6 = BO you can see better what happens?

I am working on the same topic.

I actually associate a Coordinator to a PAN Coordinator.
Then, the Coordinator starts beaconing.
But in my case the Coordinator sends beacons exactly when also the
PAN Coordinator does.
So, it is like the StartTime parameter is discarded.

Here is the problem: the Standard doesn't say much about the StartTime parameter.
It is a 24-bit integer, it says.

In the Freescale MAC, it is mapped as gMPibTreemodeStartTime_c.
But what is its internal representation? Little endian or Big endian? 24 bits or more?
There are some formulas to estimate this parameter in 802154MWAUG.pdf p.66.

Let's suppose it is little endian and exactly 24 bits.
So we can build an array of 3 bytes and send it as a StartTime parameter.

However, have problems already at the request of starting beacons. So i put a
while(/*it doesnt work*/){/*retry with another value of StartTime*/}
to avoid this, and I found some values that works. But then beacons are exacly
over PAN Coordinator's beacons.

(PS: ragazzi, ma qua siamo tutti italiani?)

Best Regards,
Leonardo

--
Alban Edit: Thread split see source here



Message Edited by Alban on 2007-09-03 09:08 PM
Labels (1)
0 Kudos
18 Replies

1,153 Views
Spell
Contributor I


lex4098 wrote:
in my case the Coordinator sends beacons exactly when also the
PAN Coordinator does.
So, it is like the StartTime parameter is discarded.


Why Router and PAN Coord sends its beacons in the same moments? It's not logical...
Before calling MLME-Start request in router procedure you must set the start time parameter to a value different from zero for start track beacon from parent's node.

lex4098 wrote:
Let's suppose it is little endian and exactly 24 bits.
So we can build an array of 3 bytes and send it as a StartTime parameter.


I do exactly in this way for set start time PIB, rembember you must set SO and BO before calling MLME-SYNC and after you can set the start time pib.


lex4098 wrote:
(PS: ragazzi, ma qua siamo tutti italiani?)


:smileywink::smileytongue:
:smileytongue:
0 Kudos

1,153 Views
Federico
Contributor I
If we are all italian we can write in italian or is forbidden!
In your code (spell) I find how to set the pib atrribute but, don't work or better when I try to set it to false I don't receive a message with state success.
You have check if when you try to set the pib the procedure really work!
Saluti federico
0 Kudos

1,153 Views
Spell
Contributor I


Federico wrote:
If we are all italian we can write in italian or is forbidden!
In your code (spell) I find how to set the pib atrribute but, don't work or better when I try to set it to false I don't receive a message with state success.
You have check if when you try to set the pib the procedure really work!
Saluti federico


Yes, it works:smileyhappy:
Try to set SO, BO and before calling MLME-Sync req
regards,
Filippo
0 Kudos

1,153 Views
lex4098
Contributor III
Hi spell,

I cannot make it work. I tried many values of StartTime.
It seems that this parameter is discarded, since beacons are always synchronized:
Code:
Seq No      Channel      Time           Time Delta      MAC Src              MAC Dest             Protocol        Packet Type                          -------------------------------------------------------------------------------------------------------------------------------------------------------2545        11           10:09:31.708   +00:00:00.983   0xcafa                                    IEEE 802.15.4   Beacon: BO: 6, SO: 0, PC: 1, AP: 1   2546        11           10:09:31.710   +00:00:00.002   0xfaffffffffffffff   0xcafa               IEEE 802.15.4   Command: Association Request         2547        11           10:09:31.712   +00:00:00.001                                             IEEE 802.15.4   Acknowledgment                       2548        11           10:09:32.691   +00:00:00.980   0xcafa                                    IEEE 802.15.4   Beacon: BO: 6, SO: 0, PC: 1, AP: 1   2549        11           10:09:33.674   +00:00:00.983   0xcafa                                    IEEE 802.15.4   Beacon: BO: 6, SO: 0, PC: 1, AP: 1   2550        11           10:09:33.679   +00:00:00.005   0xfaffffffffffffff                        IEEE 802.15.4   Command: Data Request                2551        11           10:09:33.680   +00:00:00.001                                             IEEE 802.15.4   Acknowledgment                       2552        11           10:09:33.684   +00:00:00.004   0xfaffffffffffffff   0xfaffffffffffffff   IEEE 802.15.4   Command: Association Response        2553        11           10:09:33.685   +00:00:00.001                                             IEEE 802.15.4   Acknowledgment                       2554        11           10:09:34.657   +00:00:00.972   0x0001                                    IEEE 802.15.4   Beacon: BO: 6, SO: 0, PC: 0, AP: 1   2555        11           10:09:35.641   +00:00:00.983   0x0001                                    IEEE 802.15.4   Beacon: BO: 6, SO: 0, PC: 0, AP: 1   2556        11           10:09:36.624   +00:00:00.983   0x0001                                    IEEE 802.15.4   Beacon: BO: 6, SO: 0, PC: 0, AP: 1   2557        11           10:09:37.607   +00:00:00.983   0x0001                                    IEEE 802.15.4   Beacon: BO: 6, SO: 0, PC: 0, AP: 1  

 


Did you check with a network sniffer if in your case packets have a "time delta" equal to StartTime?


Thank you again for all your help!!
Leonardo


0 Kudos

1,153 Views
Spell
Contributor I
Unfortunately I don't have a sniffer:smileysad:
However I had your same issues and the problem was that I didn't set correctly Pib Attibutes
The right order to start the router is:
- start passive scan for coordinator
- before calling MLME-sync req set SO, BO (must be equal to PAN values)and PanIdConflict for start track beacon
- send associate request
- before calling MLME-start req set start time and check if the set req return gSuccess_c
- set RxOnWhenIdle value to 0x02
- state Listen...

This is what Freescale Support said to me, but it seem doesn't work correctly.:smileymad:

best regards,
Filippo
0 Kudos

1,153 Views
lex4098
Contributor III
spell, thanks a lot!

I will check everything again as you suggest (not now... i risk madness!).

If you live/study near Padova you can take the sniffer from me for some days.
It's really useful when things don't work. I use this one:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FSL-ZB-SNF&nodeId=0109840078695970592...

It works greatly....

thanks again,
Leonardo
0 Kudos

1,153 Views
Spell
Contributor I
Thanks but I work near Rimini...
However do you think it's possible to implement a packet sniffer with an evaluation board and a specific firmware?
What software do you use?It's possible to download an evaluation version?

ciao,
Filippo
0 Kudos

1,153 Views
lex4098
Contributor III
I think that it is possible (put the modem in RX, always ON, without any synchronization and for each packet received, put it into the UART), but somewhat hard to do;

The software I use is "daintree network analyzer", it comes with the hardware sniffer.
It requires an access key (provided in the cd box) and internet registration also for the basic (free, no time limit) version.

I searched in the docs if this software can be used with general hardware. I found only this hardware support (no freescale evaluation board........ the freescale analyzer is a specific hw sniffer, not a board!!
:robotmad:
Actually: I tried but the sw can't see my boards):
  • Daintree Networks 2400E Sensor Network Adapter
  • The following 3rd party development kits:
    • Texas Instruments (Chipcon) CC2420DK Development Kit (using CC2400EB Evaluation Board with CC2420EM Module),
    • Texas Instruments (Chipcon) CC2430 Development Kits (using CC2430DB board or SmartRF04EB Evaluation Board with CC2430EM Module),
    • Texas Instruments (Chipcon) CC2431 Development Kits (using CC2431DB board or SmartRF04EB Evaluation Board with CC2431EM Module),
    • Freescale 802.15.4 Analyzer,
    • Ember EM2420 Development Kit,
    • Integration Associates (CompXS) Steeple USB Dongle,
    • Jennic JN5121-EK IEEE802.15.4 Wireless Microcontroller Evaluation Kit,
    • Jennic JN5121-EK003  IEEE802.15.4 Wireless Sensor Network Starter Kit,
    • ZMD ZMD44101DK Development Kit,
    • ZMD ZMD44102 Starter Kit,
    • Renesas ZigBee Demo Kit,
    • Atmel ZLink Development Kit,
    • NEC 78K0 UZ Stick (USB Device),
    • BM SpA SK00X Starter Kit.(using EV01X evaluation board).

Hope this helps...

Best Regards,
Leonardo


0 Kudos

1,153 Views
Spell
Contributor I
Thanks a lot Leonardo! :smileywink:

I'm finally convinced Freescale Support to take a look on my router project...:smileytongue:

Now I'm waiting in their response...

ciao,
Filippo
0 Kudos

1,153 Views
Spell
Contributor I
Hi guys,

I finally received a response from Freescale Support, they said to me that my router firmware seems ok (:smileywink:)... The only problem is set correctly the timing...

I'm tryng with these value:
Beacon Order = 5
Superframe Order = 3
Tx Offset = minValue 7742, maxValue 22978

best regards,
Filippo

P.S.Freescale sends to me an xls file for calculate the StartTime based on the SO and BO.:smileyvery-happy
If you want this file send me a request on mp...

0 Kudos

1,153 Views
lex4098
Contributor III
This is a very good piece of news!

I was fighting against my boards without result! Hope this file can help!

I wrote a PM to you.

Thanks,
Leonardo
0 Kudos

1,153 Views
Spell
Contributor I
Finally I'm a very very very happy builder of a Beaconed Tree Mode Network Topology.

I'm finally successful implement a zigbee router in a beconed network...

Thanks a lot Leo for your help :smileywink:
0 Kudos

1,153 Views
Alban
Senior Contributor II
Thread Split. Please New Question = New Subject = New Thread.
0 Kudos

1,153 Views
lex4098
Contributor III
I changed the way of updating PIB values, however the StartTime parameter always seems to be discarded.

Best Regards and thank you very much,
Leonardo




0 Kudos

1,153 Views
lex4098
Contributor III
I tried almost everything today, but with no result.

I post here my source for the router, the problem is that beacon of Coordinator are at the same time of those from PAN Coordinator.

Thank you for your help.

Leonardo
0 Kudos

1,153 Views
Spell
Contributor I


lex4098 wrote:
I tried almost everything today, but with no result.

I post here my source for the router, the problem is that beacon of Coordinator are at the same time of those from PAN Coordinator.

Thank you for your help.

Leonardo


I've check your code and I think you uncorrectly set the pibAttributeValue.

Try to set BO and SO before calling MLME-Sync req in this way:
Code:
static uint8_t macBeaconOrder;
static uint8_t macSuperFrameOrder;

.
.
.

/*Set Beacon Order PIB*/
pMsgOut->msgType = gMlmeSetReq_c;
pMsgOut->msgData.setReq.pibAttribute = gMPibBeaconOrder_c;
pMsgOut->msgData.setReq.pibAttributeValue = (uint8_t *) &macBeaconOrder;
ret = MSG_Send(NWK_MLME, pMsgOut);
UartUtil_Print("\nBO:");
UartUtil_PrintHex(pMsgOut->msgData.setReq.pibAttributeValue, 1, FALSE);
   
/*Set SuperFrame Order PIB*/
pMsgOut->msgType = gMlmeSetReq_c;
pMsgOut->msgData.setReq.pibAttribute = gMPibSuperFrameOrder_c;
pMsgOut->msgData.setReq.pibAttributeValue = (uint8_t *) &macSuperFrameOrder;
ret = MSG_Send(NWK_MLME, pMsgOut);
UartUtil_Print(", SO:");
UartUtil_PrintHex(pMsgOut->msgData.setReq.pibAttributeValue, 1, FALSE);
       
       



Try to set Start Time before calling MLME-Start req in this way:
Code:
static uint32_t macTreemodeStartTime;

.
.
.

uint8_t temp[3];    macTreemodeStartTime = 0x0005DC;  //1500 symbolstemp[0] = macTreemodeStartTime & 0xFF;temp[1] = (macTreemodeStartTime >> 8) & 0xFF;temp[2] = (macTreemodeStartTime >> 16)& 0xFF;/*Set macTreemodeStartTime Order PIB*/pMsg->msgType = gMlmeSetReq_c;pMsg->msgData.setReq.pibAttribute = gMPibTreemodeStartTime_c;pMsg->msgData.setReq.pibAttributeValue = (uint8_t *)temp;UartUtil_Print(", TxOffset:");UartUtil_PrintHex(pMsg->msgData.setReq.pibAttributeValue, 3, FALSE);/* Send the Set request to the MLME. */if(MSG_Send(NWK_MLME, pMsg) == gSuccess_c){   UartUtil_Print(" Set request Treemode done ");}else{  /* One or more parameters in the Set Request message were invalid. */  UartUtil_Print(" Invalid parameter in set request! ");  return errorInvalidParameter;}
 
best regards,
Filippo
0 Kudos

1,153 Views
lex4098
Contributor III
Thank you spell.

I have set all mac parameters (address, conflict detection, start time, association permit,
beacon & superframe order, rx when idle)

My sync works like that:

        /* Now send the MLME-Sync Request. We choose to let the MAC track
           the beacons on the logical channel obtained by the passive scan.*/
        pMsgOut->msgType = gMlmeSyncReq_c;
        pMsgOut->msgData.syncReq.trackBeacon = TRUE;
        pMsgOut->msgData.syncReq.logicalChannel = mCoordInfo.logicalChannel;
        (void)MSG_Send(NWK_MLME, pMsgOut);

So I think that the sync is OK.
It is done after the passive scan.

I tried many values of StartTime in the range: [0; 2^20], but the result doesn't change.

What is wrong? I can't understand.

PS: :smileywink:

Leonardo

0 Kudos

1,153 Views
Spell
Contributor I
Which setting are you using for SO and BO?
Are you sure that you set correctly these PIB attributes? Beacuse if these attributes aren't set correctly when you set the start time it return always INVALID PARAMETER error.
Let's try these: BO = 6, SO= 0 and start time = 1500.
this is my code:
Code:
/*Set Beacon Order PIB*/pMsgOut->msgType = gMlmeSetReq_c;pMsgOut->msgData.setReq.pibAttribute = gMPibBeaconOrder_c;pMsgOut->msgData.setReq.pibAttributeValue = (uint8_t *) &macBeaconOrder;ret = MSG_Send(NWK_MLME, pMsgOut);UartUtil_Print("\nBO:");UartUtil_PrintHex(pMsgOut->msgData.setReq.pibAttributeValue, 1, FALSE);/*Set SuperFrame Order PIB*/pMsgOut->msgType = gMlmeSetReq_c;pMsgOut->msgData.setReq.pibAttribute = gMPibSuperFrameOrder_c;pMsgOut->msgData.setReq.pibAttributeValue = (uint8_t *) &macSuperFrameOrder;ret = MSG_Send(NWK_MLME, pMsgOut);UartUtil_Print(", SO:");UartUtil_PrintHex(pMsgOut->msgData.setReq.pibAttributeValue, 1, FALSE);/*Set PAN Id Conflict PIB*/pMsgOut->msgType = gMlmeSetReq_c;pMsgOut->msgData.setReq.pibAttribute = gMPibPanIdConflictDetection_c;boolFlag = FALSE;pMsgOut->msgData.setReq.pibAttributeValue = &boolFlag;ret = MSG_Send(NWK_MLME, pMsgOut);

regards,
Filippo

 

0 Kudos