Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     92
The value of these timeouts depends on the sleep time used by the end devices. Each of these timeouts are 
discussed below.
RF Packet Buffering Timeout
When a router or coordinator receives an RF data packet intended for one of its end device children, it buffers 
the packet until the end device wakes and polls for the data, or until a packet buffering timeout occurs. This 
timeout is settable using the SP command. The actual timeout is (1.2 * SP), with a minimum timeout of 1.2 
seconds and a maximum of 30 seconds. Since the packet buffering timeout is set slightly larger than the SP 
setting, SP should be set the same on routers and coordinators as it is on cyclic sleep end devices. For pin sleep 
devices, SP should be set as long as the pin sleep device can sleep, up to 30 seconds.
Note: In pin sleep and extended cyclic sleep, end devices can sleep longer than 30 seconds. If end devices sleep 
longer than 30 seconds, parent and non-parent devices must know when the end device is awake in order to 
reliably send data. For applications that require sleeping longer than 30 seconds, end devices should transmit 
an IO sample or other data when they wake to alert other devices that they can send data to the end device. 
Child Poll Timeout
Router and coordinator devices maintain a timestamp for each end device child indicating when the end device 
sent its last poll request to check for buffered data packets. If an end device does not send a poll request to its 
parent for a certain period of time, the parent will assume the end device has moved out of range and will 
remove the end device from its child table. This allows routers and coordinators to be responsive to changing 
network conditions. The NC command can be issued at any time to read the number of remaining (unused) child 
table entries on a router or coordinator.
The child poll timeout is settable with the SP and SN commands. SP and SN should be set such that SP * SN 
matches the longest expected sleep time of any end devices in the network. The actual timeout is calculated as 
(3 * SP * SN), with a minimum of 5 seconds. For networks consisting of pin sleep end devices, the SP and SN 
values on the coordinator and routers should be set such that SP * SN matches the longest expected sleep 
period of any pin sleep device. The 3 multiplier ensures the end device will not be removed unless 3 sleep cycles 
pass without receiving a poll request. The poll timeout is settable up to a couple of months.
Adaptive Polling
The PO command determines the regular polling rate.  However, if RF data has been recently received by an end 
device, it is likely that yet more RF data could be on the way.  Therefore, the end device will poll at a faster rate, 
gradually decreasing its adaptive poll rate until polling resumes at the regular rate as defined by the PO 
command.
Transmission Timeout
As mentioned in chapter 4, when sending RF data to a remote router, since routers are always on, the timeout 
is based on the number of hops the transmission may traverse. This timeout it settable using the NH command. 
(See chapter 4 for details.)
Since end devices may sleep for lengthy periods of time, the transmission timeout to end devices also includes 
some allowance for the sleep period of the end device. When sending data to a remote end device, the 
transmission timeout is calculated using the SP and NH commands. If the timeout occurs and an 
acknowledgment has not been received, the source device will resend the transmission until an 
acknowledgment is received, up to two more times.
The transmission timeout per attempt is:
3 * ((unicast router timeout) + (end device sleep time)), or
3 * ((50 * NH) + (1.2 * SP)), where SP is measured in 10ms units.