Hi,
I want to ask how to make the Zigbee module (XBee-ZB) go into cyclic sleep?
First, I tried to change the modules parameters and write in the SM command (4) , in the router module, using the X-CTU program (I read in the X-CTU that when I change the SM into anything other than 0 it automatically changes the module into an end device). I also made sure that the SP in the coordinator equal to that in the end device. However, when I did that the Zigbees couldn’t communicate and no packets were received when the coordinator was sending to the sleeping “router”. Even when I tried to return the Zigbee module to the No Sleep mode (SM0) it didn’t work and the router never returned to receive any packets from the coordinator. It only can send to the coordinator. I tried to reload the firmware again, sometimes it worked but the last time it didn’t.
Second, I left these two modules and worked on another two, but this time I didn’t play in their parameters or change the SM commands (No play in the X-CTU) I tried to give the zigbee the command for cyclic sleep through the waspmote program I used this function:
Quote:
xbeeZB.setSleepMode(1);
And I put (4) instead of (1). But when I came to the sleeping period and tried to use this fuction:
Quote:
uint8_t asleep[3]={0xAF,0x00,0x00};
xbeeZB.setSleepTime(asleep); // Set Sleep period to 0,32 seconds
I couldn’t understand many stuff:
1-How ‘AF’ produced a sleeping period of 32 seconds! Or even 0.32 seconds. I mean what’s the coding here? How to make it 1 second or 2…?
2- do I put this same line code in the coordinator’s waspmote and it automatically would mean that it has to buffer the packet for this amount of time? Or it has another code?
3- I don’t really get the job of these functions: “Time Before Sleep” - “Number of Sleep Periods” - “Sleep options”. I read their parts in the guide but I still can’t fully understand what they exactly do. Are they obligatory and necessary functions to make cyclic sleep mode work correctly, or they are just extra options?
Thank You for your help.