Specifications
XBee®/XBee‐PRO®SERFModules
©2009DigiInternational,Inc. 39
5. If the Associate LED is not blinking, the AI command can be read to determine the cause of join
failure.
6. Once the end device has joined, the OP and CH commands will indicate the operating 64-bit
PAN ID and channel the end device joined.
7. The MY command will reflect the 16-bit address the end device received when it joined.
8. The API Modem Status frame ("Associated") is sent out the UART (API firmware only).
9. The joined end device will attempt to enter low power sleep modes based on its sleep
configuration commands (SM, SP, SN, ST, SO).
Channel Scanning
As mentioned previously, routers and end devices must scan one or more channels to discover a
valid network to join. When a join attempt begins, the XBee sends a beacon request transmission
on the lowest channel specified in the SC (scan channels) command bitmask. If a valid PAN is
found on the channel, the XBee will attempt to join the PAN on that channel. Otherwise, if a valid
PAN is not found on the channel, it will attempt scanning on the next higher channel in the SC
command bitmask. The XBee will continue to scan each channel (from lowest to highest) in the SC
bitmask until a valid PAN is found or all channels have been scanned. Once all channels have been
scanned, the next join attempt will start scanning on the lowest channel specified in the SC
command bitmask.
For example, if the SC command is set to 0x400F, the XBee would start scanning on channel 11
(0x0B) and scan until a valid beacon is found, or until channels 11, 12, 13, 14, and 25 have been
scanned (in that order).
Once an XBee router or end device joins a network on a given channel, if the XBee is told to leave
(see "Leaving a Network" section), it will leave the channel it joined on and continue scanning on
the next higher channel in the SC bitmask.
For example, if the SC command is set to 0x400F, and the XBee joins a PAN on channel 12 (0x0C),
if the XBee leaves the channel, it will start scanning on channel 13, followed by channels 14 and
25 if a valid network is not found. Once all channels have been scanned, the next join attempt will
start scanning on the lowest channel specified in the SC command bitmask.
ZigBee and Smart Energy: Creating a Network
Network Formation
The ESP, acting as the Coordinator in a ZigBee network, selects a channel and PAN ID for the
network. Configuring an ESP for network creation involves the following AT commands: ID, SC,
SD, NK, and KY.
Joining the Network
Details of what follows appears in the ZigBee Smart Energy Profile Specification ([1], section 5.4,
Annex C, and Annex F). A more proprietary description may be found in the ZB RF Module manual.
Joining a network involves the following AT commands: ID, SC, SD, KY, and NJ.
Configuration
There are two ways to prepare for a new node to join a Smart Energy network. Both involve the
use of a link key which acts as a recognizable signature for authenticating identity. Both methods
are referred to as "Out-of-band" link key configuration. "Out-of-band" means the link key is not
transmitted across a radio band, or otherwise ever displayed publicly. It is important that the link
key be kept private and secure. Otherwise, the security of the network could be compromised.
Preferred Method
Register the 64-bit extended address (MAC address) and the 16 byte link key (or installation code)
of the joining device with the Trust Center on the ESP. This is done with the ZigBee Register
Joining Device (0x24) API frame which is sent through the UART port to the Smart Energy module.