Operation
Networking
XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
46
If
A2
bit 1 is set, the coordinator will issue an energy scan, similar to the active scan. It will listen on
each channel specified in the
SC
parameter for the time indicated by the
SD
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 done 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 network will leave and association will recur with the new
parameters. 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.
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.
Indirect addressing
The XBee/XBee-PRO S2C 802.15.4 RF Module may hold indirect messages until it runs out of buffers
and the size of those messages does not matter. A brief summary follows:
A coordinator (
CE
= 1) must have
SP
set to a non-zero value to use indirect addressing. Otherwise, all
frames will be sent directly, assuming the target device is awake. For best operation,
SP
and
ST
should be set to match the
SP
and
ST
values of the end nodes. The coordinator will hold onto an
indirect message until it receives a poll from the device to which the message is addressed, or until a
timeout, whichever occurs first. The timeout is 2.5 times the value of
SP
.
After an indirect message is sent, subsequent messages to the same address will be sent directly for
a period of time equal to the
ST
parameter. The assumption is that the end device will remain awake
for
ST
time after the last transmission or reception. Therefore, after a poll, every transmission and
reception involving that address restart the
ST
timer. After the
ST
timer expires, the coordinator will
again use indirect messaging (i.e it will hold messages awaiting a poll.)
End devices using cyclic sleep send a poll to the coordinator when they wake up unless
SO
bit 0 is
set. End devices using pin sleep may be configured to send a poll on a pin wakeup by setting bit 3 of
A1
. Also the
FP
command can be used to send a poll upon exiting command mode. However, the poll is
not sent while in command mode. Rather the poll is sent after changes are applied so that the module
is ready to receive data after the poll is sent.
It is more difficult to use indirect addressing with pin sleep than with cyclic sleep because the end
device must wake up periodically to poll for the data from the coordinator. Otherwise, the coordinator
will discard the data. Therefore, cyclic sleep is the only recommended sleep mode for indirect
addressing.
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