Specifications
XBee®/XBee‐PRO®SERFModules
©2009DigiInternational,Inc. 34
Permit Joining
The permit joining attribute on the router is configurable with the NJ command. Joining cannot be
permanently enabled in a smart energy network.
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)
• Causing the router to leave and rejoin the network.
Router Network Connectivity
Once a router joins a ZigBee network, it remains connected to the network on the same channel
and PAN ID as long as it is not forced to leave. (See Leaving a Network section for details.) If the
scan channels (SC), PAN ID (ID) and security settings (KY) do not change after a power cycle, the
router will remain connected to the network after a power cycle.
If a router may physically move out of range of the network it initially joined, the application
should include provisions to detect if the router can still communicate with the original network. If
communication with the original network is lost, the application may choose to force the router to
leave the network (see Leaving a Network section for details).
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:
• 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 KY command value.
• Issue the NR0 command to cause the router to leave.
• Press the commissioning button 4 times or issue the CB command with a parameter of 4.
Note that changes to ID, SC, 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). If the router's PAN ID or operating channel 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.