
ZigBee networks
End device operation
XBee/XBee-PRO® S2C ZigBee® RF Module
70
In ZigBee firmware, use the
NC
command (number of remaining end device children) to determine
how many additional end devices can join a router or coordinator. If
NC
returns 0, then the router or
coordinator device has no more end device capacity.
Note
Because routers cannot sleep, there is no equivalent need for routers or coordinators to track
joined routers. There is no limit to the number of routers that can join a given router or coordinator
device and no “router capacity” metric.
Authentication
In a network where security is enabled, the end device must then go through an authentication
process. For more information, see
Persistent data
The end device can retain its PAN ID, operating channel, and security policy information through a
power cycle. However, since end devices rely heavily on a parent, the end device does an orphan scan
to try and contact its parent. If the end device does not receive an orphan scan response (coordinator
realignment command), it leaves the network and tries to discover and join a new network. When the
end device leaves a network, it loses the previous PAN ID and operating channel settings.
Orphan scans
When an end device comes up from a power cycle, it performs an orphan scan to verify it still has a
valid parent. The device sends the orphan scan as a broadcast transmission and contains the 64-bit
address of the end device. Nearby routers and coordinator devices that receive the broadcast check
their child tables for an entry that contains the end device's 64-bit address. If the devices find an entry
with a matching 64-bit address, they send a coordinator realignment command to the end device that
includes the 16-bit address of the end device, 16-bit PAN ID, operating channel, and the parent's 64-bit
and 16-bit addresses.
If the orphaned end device receives a coordinator realignment command, it joins the network.
Otherwise, it attempts to discover and join a valid network.
End device joining
When you power on an end device, if it is not joined to a valid ZigBee network, or if the orphan scan
fails to find a parent, the device attempts to find and join a valid ZigBee network.
Note
Set the
DJ
command to 1 to disable joining. You cannot write the
DJ
parameter with
WR
, so a
power cycle always clears the
DJ
setting.
Similar to a router, the following commands control the end device joining process.
Command Description
ID
Sets the 64-bit PAN ID to join. Setting
ID
=
0
allows the router to join any 64-bit PAN ID.
SC
Set the scan channels bitmask that determines which channels an end device will scan
to find a valid network.
SC
on the end device should be set to match SC on the
coordinator and routers in the desired network. For example, setting
SC
to
0x281
enables scanning on channels 0x0B, 0x12, and 0x14, in that order.