
Manage End Devices
Putting it all together
XBee/XBee-PRO® S2C ZigBee® RF Module
142
Set all router and coordinator devices on the network
SP
to match
SP
on the end device. This set the
RF packet buffering times and transmission timeouts correctly.
Since the end device wakes after each sleep period (
SP
), you can set the
SN
command to 1 on all
routers and the coordinator.
Example 2: Configure an end device to sleep for 20 seconds, send 4 I/O samples in
2 seconds, and return to sleep.
Because
SP
is measured in 10ms units, and
ST
and
IR
are measured in 1ms units, configure an end
device with the following settings:
n
SM
= 4 (cyclic sleep) or 5 (cyclic sleep, pin wake)
n
SP
= 0x7D0 (2000 decimal). This causes the end device to sleep for 20 seconds.
n
SN
= 1
n
SO
= 0
n
ST
= 0x7D0 (2000 decimal). This sets the sleep timer to 2 seconds.
n
IR
= 0x258 (600 decimal). Set
IR
to a value greater than (2 seconds / 4) to get 4 samples in 2
seconds. The end device sends an I/O sample at the
IR
rate until the sleep timer has expired.
You must enable at least one analog or digital I/O line for I/O sampling to work. To enable pin 32
(AD1/DIO1) as a digital input line, you must set the following:
D1 = 3
Set all router and coordinator devices on the network
SP
to match
SP
on the end device. This ensures
that RF packet buffering times and transmission timeouts are set correctly.
Example 3: configure a device for extended sleep: to sleep for 4 minutes.
n
SP
and
SN
must be set such that SP * SN = 4 minutes. Since
SP
is measured in 10ms units, use
the following settings to obtain 4 minute sleep.
n
SM
= 4 (cyclic sleep) or 5 (cyclic sleep, pin wake)
SP
= 0x7D0 (2000 decimal, or 20 seconds)
n
SN
= 0x0B (12 decimal)
n
SO
= 0x04 (enable extended sleep)
With these settings, the module sleeps for SP * SN time, or (20 seconds * 12) = 240 seconds = 4
minutes.
For best results, the end device should send a transmission when it wakes to inform the coordinator
(or network) when it wakes. It should also remain awake for a short time to allow devices to send
data to it. The following are recommended settings.
n
ST
= 0x7D0 (2 second wake time)
n
SO
= 0x06 (enable extended sleep and wake for ST time)
n
IR
= 0x800 (send 1 I/O sample after waking). Enable at least one analog or digital I/O sample
enabled for I/O sampling.
With these settings, the end device wakes after 4 minutes and sends 1 I/O sample. It then remains
awake for 2 seconds before returning to sleep.
Set
SP
and
SN
to the same values on all routers and coordinators that could potentially allow the end
device to join. This ensures the parent does not timeout the end device from its child table too quickly.
The
SI
command can optionally be sent to the end device to cause it to sleep before the sleep timer
expires.
Содержание XBee
Страница 1: ...XBee XBee PRO S2C ZigBee RF Module User Guide ...
Страница 259: ...AT commands Execution commands XBee XBee PRO S2C ZigBee RF Module 259 Parameter range N A Default N A ...
Страница 289: ...Regulatory information ANATEL Brazil XBee XBee PRO S2C ZigBee RF Module 289 ...
Страница 290: ...Regulatory information ANATEL Brazil XBee XBee PRO S2C ZigBee RF Module 290 ...
Страница 303: ...Load ZigBee firmware on 802 15 4 devices Background 304 Load ZB firmware 305 XBee XBee PRO S2C ZigBee RF Module 303 ...