Issues with the Cyclic Sleeping Network in digimesh

Hello,

i am using xbeePRO modules with waspmote v1.1 platforms.
I have to questions to pose.
Firstly,
my problem is with Cyclic sleeping network. The following code is executed in the setup{}:

// PARAMETERS FOR A CYCLIC SLEEPING NETWORK
  // Set Operation Mode: Synchronous Sleep Support Mode
  // Don't fall asleep untill the NET is synched.
  if(!xbeeDM.setSleepMode(7)) USB.println("Normal mode stored OK");
  else USB.println("Error while storing Sleep mode");  
    
  // Set Sleep Options
  // bit 0: Preferred sleep coordinator. The node always acts as sleep coordinator
  if(!xbeeDM.setSleepOptions(0x01)) USB.println("Sleep Options stored OK");
  else USB.println("Error while storing Sleep OPtions"); 
  
  // Set Sleep period  -> 10 secs
  if(!xbeeDM.setSleepTime(asleep)) USB.println("Sleep Time stored OK");
  else USB.println("Error while storing Sleep Time"); 

  // Set time the module remains awake -> 20 secs
  if(!xbeeDM.setAwakeTime(awake)) USB.println("Awake Time stored OK");
  else USB.println("Error while storing Awake Time");
  
  delay(2000);
  
   // Set Operation Mode: Cyclic Sleep
  if(!xbeeDM.setSleepMode(8)) USB.println("Cyclic Sleep mode stored OK");
  else USB.println("Error while storing Sleep mode"); 
  
  delay(1000);

In the loop{} i check if the xbee is available or not so i can verify the sleep and awake times of the module.

The problem is that if i don;t have another node listening to sync messages from this sleep coordinator node and send back relays then this sleep coordinator will not follow the cyclic sleeping routine defined (10 secs sleep and 20 secs awake). In fact it stays awake for about a minute and then sleeps for ever,

On the other hand, if i power another node (being in the same network and the same channel) that operates in a cyclic sleep network mode then everything works fine, with the sleep coordinator node synchronizing it and both follow the sleeping routine defined in the ‘xbeeDM.sleepTime’ and ’ xbeeDM.awakeTime’ variables of the sleep coordinator.
What is wrong here?

Secondly, again in a cyclic sleeping network, after synchronization, if i turn one xbee of the network OFF and then turn it ON again, does the sync remain or is it lost for this xbee?

Thanks,
Best regards

1 Like