XBee®/XBee‐PRO® ZB SMT RF Modules
Note: II is the initial 16-bit PAN ID. Under certain conditions, the ZigBee stack can change the 16-bit PAN ID of
the network. For this reason, the II command cannot be saved using the WR command. Once II is set, the
coordinator leaves the network and starts on the 16-bit PAN ID specified by II.
Example: Starting a Coordinator
1. Set CE (Coordinator Enable) to 1, and use the WR command to save the changes.
2. Set SC and ID to the desired scan channels and PAN ID values. (The defaults should suffice.)
3. If SC or ID is changed from the default, issue the WR command to save the changes.
4. If SC or ID is changed from the default, apply changes (make SC and ID changes take effect)
either by sending the AC command or by exiting AT command mode.
5. The Associate LED will start blinking once the coordinator has selected a channel and PAN ID.
6. The API Modem Status frame ("Coordinator Started") is sent out the serial port when using API
mode.
7. Reading the AI command (association status) will return a value of 0, indicating a successful
startup.
8. Reading the MY command (16-bit address) will return a value of 0, the ZigBee-defined 16-bit
address of the coordinator.
After startup, the coordinator will allow joining based on its NJ value.
Example: Replacing a Coordinator (Security Disabled)
1. Read the OP, OI, CH, and ZS commands on the running coordinator.
2. Set the CE, ID, SC, and ZS parameters on the new coordinator, followed by WR command to
save these parameter values.
3. Turn off the running coordinator.
4. Set the II parameter on the new coordinator to match the read OI value on the old coordinator.
5. Wait for the new coordinator to start (AI=0).
Router Operation
Routers must discover and join a valid ZigBee network before they can participate in a ZigBee network. After a
router has joined a network, it can allow new devices to join the network. It can also route data packets and
communicate with other devices on the network.
Discovering ZigBee Networks
To discover nearby ZigBee networks, the router performs a PAN (or active) scan, just like the coordinator does
when it starts a network. During the PAN scan, the router sends a beacon request (broadcast) transmission on
the first channel in its scan channels list. All nearby coordinators and routers operating on that channel (that are
already part of a ZigBee network) respond to the beacon request by sending a beacon back to the router. The
beacon contains information about the PAN the nearby device is on, including the PAN identifier (PAN ID), and
whether or not joining is allowed. The router evaluates each beacon received on the channel to determine if a
valid PAN is found. A router 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.
If a valid PAN is not found, the router performs the PAN scan on the next channel in its scan channels list and
continues scanning 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, all channels will be scanned again.
The ZigBee Alliance requires that certified solutions not send beacon request messages too frequently. To meet
certification requirements, the XBee firmware attempts 9 scans per minute for the first 5 minutes, and 3 scans
per minute thereafter. If a valid PAN is within range of a joining router, it should typically be discovered within a
few seconds.
© 2010 Digi International, Inc.
40