User's Manual

Table Of Contents
XBee®/XBeePRO®ZBRFModules
©2009DigiInternational,Inc. 31
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 SC and ID to the desired scan channels and PAN ID values. (The defaults should suffice.)
2. If SC or ID is changed from the default, issue the WR command to save the changes.
3. 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.
4. The Associate LED will start blinking once the coordinator has selected a channel and PAN ID.
5. The API Modem Status frame ("Coordinator Started") is sent out the UART (API firmware only).
6. Reading the AI command (association status) will return a value of 0, indicating a successful
startup.
7. 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 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
ZS Set the stack profile to match the
read ZS value.