Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     47
•Issue a network leave command.
Note that changes to ID, SC, ZS, and security command values only take effect when changes are applied (AC 
or CN commands).
Resetting the Router
When the router is reset or power cycled, it 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 router's PAN ID, operating channel, stack profile, or security 
policy is invalid, the router will leave the network and attempt to join a new network based on its network 
joining command values.
To prevent the router 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.
Example: Joining a Network
After starting a coordinator (that is allowing joins), the following steps will cause a router 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.
3. If SC or ID is changed from the default, apply changes (make SC and ID changes take effect) 
by issuing the AC or CN command.
4. The Associate LED will start blinking once the router has joined a PAN.
5. If the Associate LED is not blinking, the AI command can be read to determine the cause of join 
failure.
6. Once the router has joined, the OP and CH commands will indicate the operating 64-bit PAN ID 
and channel the router joined.
7. The MY command will reflect the 16-bit address the router received when it joined.
8. The API Modem Status frame ("Associated") is sent out the UART (API firmware only).
9. The joined router will allow other devices to join for a time based on its NJ setting.
End Device Operation
Similar to routers, end devices must also discover and join a valid ZigBee network before they can participate in 
a network. After an end device has joined a network, it can communicate with other devices on the network. 
Since end devices are intended to be battery powered and therefore support low power (sleep) modes, end 
devices cannot allow other devices to join, nor can they route data packets.
Discovering ZigBee Networks
End devices go through the same process as routers to discover networks by issuing a PAN scan. After sending 
the broadcast beacon request transmission, the end device listens for a short time in order to receive beacons 
sent by nearby routers and coordinators on the same channel. The end device evaluates each beacon received 
on the channel to determine if a valid PAN is found. An end device considers a PAN to be valid if the PAN:
•Has a valid 64-bit PAN ID (PAN ID matches ID if ID > 0)
•Has the correct stack profile (ZS command)
•Is allowing joining
•Has capacity for additional end devices (see End Device Capacity section below).
If a valid PAN is not found, the end device performs the PAN scan on the next channel in its scan channels list 
and continues this process until a valid network is found, or until all channels have been scanned. If all channels 
have been scanned and a valid PAN was not discovered, the end device may enter a low power sleep state and 
scan again later.
If scanning all SC channels fails to discover a valid PAN, XBee ZB modules will attempt to enter a low power 
state and will retry scanning all SC channels after the module wakes from sleeping. If the module cannot enter 
a low power state, it will retry scanning all channels, similar to the router. To meet ZigBee Alliance