Synchronizing the Network
Last updated
Last updated
End Devices rely on a parent (router or coordinator) to remain awake and receive any data packets addressed to them. When the end device wakes up from sleep, it sends a transmission (poll request) to its parent asking if the parent has received any RF data addressed to the end device. The parent, upon receipt of the poll request, will send an RF response and the buffered data (if present). If the parent has no data for the end device, the end device may return to sleep, depending on its sleep mode configuration settings.
If the end device is awake, it will send poll requests every 100ms to ensure it receives any new RF data from its parent. When RF data is sent to a sleeping end device, its parent buffers the data until the end device polls for the data or a timeout occurs.
When an end device joins a network, it becomes a child of the device it joined to, and the device that allowed the join becomes the end device’s parent. Thereafter, the parent will manage RF data packets for the end device. The actual storage time is computed as (‘Sleep Period * 2.5), not exceeding 30 seconds. If end devices implement cyclic sleep, ‘Sleep Period’ should be set the same on a parent as it is on their sleeping end device children. In the case of pin sleep, where RF data could be received, the end device should wake within ‘Sleep Period’ time to ensure incoming RF data is not lost. The parent can only store one broadcast packet (the most recently received) for its end device children. If the parent receives an RF packet addressed to the end device, it will store the data packet until one of the following events occurs:
• The parent runs out of storage space and cannot store a new packet. • A packet has been stored for a long period of time (timeout). • The destination end device child sends a poll request transmission to request the data packet.
When the parent stores a packet addressed to an end device child, it stores the packet for a maximum time set by ‘Sleep Period’ parameter. The parent is also responsible for performing any route or address discoveries to forward data sent by its end device children into the mesh network.
In cyclic sleep, the time the module sleeps depends on several configuration parameters as ‘Sleep Period’, ‘Number of Sleep Periods’ or ‘Sleep Options’.
A parent can only buffer data for30 seconds and an end device can only sleep a maximum of 28 seconds. When it wakes up, it sends a poll request to check if there is data available. This working mode ensures data is not lost even if an end device is slept the maximum time.
In many cases, the On/Sleep pin can be used to wake up an external microprocessor or peripheral device when the module wakes up from sleep. If the end device wakes up and finds that its parent has no data, there will be no need to wake up the external device. The ‘Number of Sleep Periods’ parameter is a multiplier of ‘Sleep Period’ parameter that determines how often to set the On/Sleep pin when waking.
In some applications, the end device may transmit data at a very slow rate (once an hour, once a day, etc) and will only receive data in response to its transmission. In such cases, the ‘Sleep Options’ parameter can be used to cause an end device sleeping for the entire ‘Sleep Period’ * ‘Number of Sleep Periods’ time.
Since a parent can only buffer data for 30 seconds, an end device should not sleep more than 30 seconds unless it does not have to receive any data.