Configure the sleep coordinator for synchronous sleep support
These instructions show you how to configure XBEE_A as the preferred sleep coordinator so it stays awake while the other XBee devices sleep. You then configure XBEE_B and XBEE_C so one of them assumes the role of sleep coordinator when you disconnect XBEE_A. This allows the network to remain in sync with minimal impact on battery life.
Note If you have only two USB cables: After you configure XBEE_B, disconnect it from your computer and remove it from XCTU. Then connect it to a power supply (or laptop or portable battery). Next, use the available USB cable to connect and configure XBEE_C.
- Add three devices to XCTU. See Add devices to XCTU.
- For each device, click the Load default firmware settings button
and then the Write radio settings button
.
- Configure the three XBee devices in either Transparent or API mode. This example configures the XBee devices in Transparent mode.
- Select XBEE_A and configure the following parameters:
SM: 7
SO: 1 (preferred sleep coordinator)
SP: 1F4 (hexidecimal) = 500 (decimal) x 10 ms = 5 seconds
ST: 1388 (hexidecimal) = 5000 (decimal) x 1ms = 5 seconds - Click the Write radio settings button
.
Note The SP (sleep time) and ST (wake time) are set to five seconds to make it easy to observe synchronous sleep support. To simulate a sensor system such as water monitoring, you might set SP to 30 minutes and ST to 10 seconds, depending on the number of devices and amount of data that is transferred.
- Select XBEE_B and configure the following sleep parameters:
SM: 8
SO: 0 (allows the XBee module to take over the role of sleep coordinator if the preferred sleep coordinator fails)
SP: 1E (hexidecimal) = 30 (decimal) x 10 ms = 300 ms
ST: BB8 (hexidecimal) = 3000 (decimal) x 1 ms = 3 seconds - Click the Write radio settings button
.
- Configure the sleep parameters for XBEE_C as you did for XBEE_B. Click
when you are done.
Note Once XBEE_B and XBEE_C sync up to the network, their wake and sleep times are controlled by the OS and OW settings on the sleep support node (XBEE_A). If you want to change the wake and sleep times, change the SP and ST values for XBEE_A.
- The LED lights on the three devices appear as follows:
XBee module Wake period Sleep period XBEE_A (sleep coordinator) Flashing red light Solid red light XBEE_B and XBEE_C Flashing red light No light - Change the role of sleep coordinator:
- Disconnect XBEE_A from your computer.
- Observe XBEE_B or XBEE_C taking over the role of sleep coordinator by looking at the behavior of the LED lights. It could take three cycles for the new sleep coordinator to take effect.
- Re-connect XBEE_A to your computer.
- Observe XBEE_A re-assuming the role of sleep coordinator.
Note If a device gets out of sync, it goes through a re-synchronization process.