Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     50
Parent Connectivity
The XBee ZB end device sends regular poll transmissions to its parent when it is awake. These poll 
transmissions query the parent for any new received data packets. The parent always sends a MAC layer 
acknowledgment back to the end device. The acknowledgment indicates whether the parent has data for the 
end device or not.
If the end device does not receive an acknowledgment for 3 consecutive poll requests, it considers itself 
disconnected from its parent and will attempt to discover and join a valid ZigBee network. See "Managing End 
Devices" chapter for details.
Resetting the End Device
When the end device is reset or power cycled, if the orphan scan successfully locates a parent, the end device 
then checks its PAN ID, operating channel and stack profile against the network configuration settings (ID, SC, 
ZS). It also verifies the saved security policy is valid based on the security configuration commands (EE, KY). If 
the end device's PAN ID, operating channel, stack profile, or security policy is invalid, the end device will leave 
the network and attempt to join a new network based on its network joining command values.
To prevent the end device from leaving an existing network, the WR command should be issued after all 
network joining commands have been configured in order to retain these settings through power cycle or reset 
events.
Leaving a Network
There are a couple of mechanisms that will cause the router to leave its current PAN and attempt to discover 
and join a new network based on its network joining parameter values. These include the following:
•The ID command changes such that the current 64-bit PAN ID is invalid.
•The SC command changes such that the current operating channel (CH) is not included in the channel 
mask.
•The ZS or any of the security command values change.
•The NR0 command is issued to cause the end device to leave.
•The NR1 command is issued to send a broadcast transmission, causing all devices in the network to leave 
and migrate to a different channel.
•The commissioning button is pressed 4 times or the CB command is issued with a parameter of 4.
•The end device's parent is powered down or the end device is moved out of range of the parent such that 
the end device fails to receive poll acknowledgment messages.
Note that changes to command values only take effect when changes are applied (AC or CN commands).
Example: Joining a Network
After starting a coordinator (that is allowing joins), the following steps will cause an XBee end device to join the 
network:
1. Set ID to the desired 64-bit PAN ID, or to 0 to join any PAN.
2. Set SC to the list of channels to scan to find a valid network.
Command
Description
D5
Enables the Associate LED functionality.
LT
Sets the Associate LED blink time when joined. Default is 2 blinks per 
second (end devices).
SM, SP, ST, SN, 
SO
Parameters that configure the sleep mode characteristics. (See 
Managing End Devices chapter for details.)