
Networking
Master/slave networks
Digi XBee® 3 802.15.4 RF Module User Guide
112
If none of the beacons received during the active scan process match the ID parameter of the
coordinator, then its ID parameter will be the PAN ID of the new network it forms. However, if a
beacon response matches the PAN ID of the coordinator, the coordinator forms a PAN with a unique
PAN ID.
If
A2
bit 0 is clear, then the coordinator forms a network on the PAN ID identified by the
ID
parameter,
without regard to another network that might have the same PAN ID.
If
A2
bit 1 is set, the coordinator performs an energy scan, similar to the active scan. It will listen on
each channel specified in the
SC
parameter. After the scan is complete, the channel with the least
energy is selected to form the new network.
If
A2
bit 1 is clear, then no energy scan is performed and the
CH
parameter is used to select the
channel of the new network.
If bits 0 and 1 of
A2
are both set, then an active scan is performed followed by an energy scan.
However, the channels on which the active scan finds a coordinator are eliminated as possible
channels for the energy scan, unless such an action would eliminate all channels. If beacons are found
on all channels in the channel mask, then then the energy scan behaves the same as it would if
beacons are not found on any of those channels. Therefore, the active scan will be performed on all
channels in the channel mask. Then, an energy scan will be performed on the channels in the channel
mask that did not find a coordinator.
Depending on the result of the active scan, the set of channels for the energy scan varies. If a PAN ID
is found on all the channels in the channel mask, then the energy scan operates on all the channels in
the channel mask. If at least one of the channels in the channel mask did not find a PAN ID, then the
channels with PAN IDs are eliminated from consideration for the energy scan. After the energy scan
completes, the channel with the least energy is selected for forming the new network.
Whenever
CE
,
ID
,
A2
, or
MY
changes, the coordinator will re-form the network. Any end devices
associated to the coordinator prior to changing one of these parameters will lose association. For this
reason, it is important not to change these parameters on a coordinator unless needed, or configure
end devices to be flexible about what network they associate with the
A1
command.
Before the Coordinator forms a network, the Associate LED will be on solid. After it forms a network,
the Associate LED will blink once per second.
Association indicators
There are two types of association indicators: Asynchronous device status messages, and on demand
queries. Asynchronous device status messages occur whenever a change occurs and API mode is
enabled. On demand queries occur when the
AI
command is issued, which can occur in Command
mode, in API mode, or as a remote command.
Modem status messages
Not all device status messages are related with association, but for completeness all device status
types reported by XBee 3 802.15.4 RF Module are listed in the following table.
Type Meaning
0x00
Hardware reset.
0x01
Watchdog reset.
0x02
End device successfully associated with a coordinator.
0x03
End device disassociated from coordinator or coordinator failed to form a new network.