O'Reilly logo

Building Wireless Sensor Networks by Robert Faludi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Sleep

There are six AT commands associated with sleeping (see Table 6-1). These commands work together to configure the specific behaviors that are most appropriate for your particular project. In many cases, you’ll only really need to set three of them: Sleep Mode, Sleep Period, and Time Before Sleep. The other three commands are for more unusual configurations so they are less commonly needed.

Sleep Mode

The XBee ZigBee End Device radios have four basic sleep behaviors. These are set with the ATSM command:

ATSM 0: Disables sleep mode

The radio will always be awake and using power, but because it is running the end device firmware it will not route for other radios and it still requires a parent device.

ATSM 1: Pin wake mode

In this mode the XBee module will sleep when its sleep control pin—physical pin 9—is asserted or pulled high by connecting it to 3.3 volts (Figure 6-1). The radio will finish transmitting or receiving before it goes to sleep. When the sleep control pin is brought low by connecting it to ground, the radio will wake from sleep and be able to transmit and receive again. When asleep in this mode, the radio uses less than 10 microamps, a minuscule amount of power. Waking it up takes about 13 milliseconds. You use pin wake mode when there’s another device—most commonly some kind of microcontroller—available to assert and de-assert the signal going to pin 9.

ATSM 2 and 3

These modes are currently undefined.

ATSM 4: Cyclic sleep mode

When an XBee radio ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required