Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     39
These behaviors are configurable using the following commands:
If any of the command values in the network formation commands table changes, the coordinator will leave its 
current network and start a new network, possibly on a different channel. Note that command changes must be 
applied (AC or CN command) before taking effect.
Permit Joining
The permit joining attribute on the coordinator is configurable with the NJ command. NJ can be configured to 
always allow joining, or to allow joining for a short time.
Joining Always Enabled
If NJ=0xFF (default), joining is permanently enabled. This mode should be used carefully. Once a network 
has been deployed, the application should strongly consider disabling joining to prevent unwanted joins 
from occurring.
Joining Temporarily Enabled
If NJ < 0xFF, joining will be enabled only for a number of seconds, based on the NJ parameter. The timer is 
started once the XBee joins a network. Joining will not be re-enabled if the module is power cycled or reset. 
The following mechanisms can restart the permit-joining timer:
•Changing NJ to a different value (and applying changes with the AC or CN commands)
•Pressing the commissioning button twice (enables joining for 1 minute)
•Issuing the CB command with a parameter of 2 (software emulation of a 2 button press - enables 
joining for 1 minute).
Resetting the Coordinator
When the coordinator is reset or power cycled, it checks its PAN ID, operating channel and stack profile against 
the network configuration settings (ID, CH, ZS). It also verifies the saved security policy against the security 
configuration settings (EE, NK, KY). If the coordinator's PAN ID, operating channel, stack profile, or security 
policy is not valid based on its network and security configuration settings, then the coordinator will leave the 
network and attempt to form a new network based on its network formation command values.
To prevent the coordinator from leaving an existing network, the WR command should be issued after all 
network formation 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 coordinator to leave its current PAN and start a new 
network based on its network formation parameter values. These include the following:
•Change the ID command such that the current 64-bit PAN ID is invalid.
•Change the SC command such that the current channel (CH) is not included in the channel mask.
•Change the ZS or any of the security command values (excluding NK).
•Issue the NR0 command to cause the coordinator to leave.
•Issue the NR1 command to send a broadcast transmission, causing all devices in the network to leave and 
migrate to a different channel.
•Press the commissioning button 4 times or issue the CB command with a parameter of 4.
•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).
Command
Description
NJ
Sets the permit-join time on the coordinator, 
measured in seconds.
D5
Enables the Associate LED functionality.
LT
Sets the Associate LED blink time when 
joined. Default is 1 blink per second.