the Australia certification. Various specification updates.
Added New Zealand certification and firmware information.
Added Brazil certification and firmware information. Updated the CMand
P2 commands.
Trademarks and copyright
Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United
States and other countries worldwide. All other trademarks mentioned in this document are the
property of their respective owners.
Information in this document is subject to change without notice and does not represent a
commitment on the part of Digi International. Digi provides this document “as is,” without warranty of
any kind, expressed or implied, including, but not limited to, the implied warranties of fitness or
merchantability for a particular purpose. Digi may make improvements and/or changes in this manual
or in the product(s) and/or the program(s) described in this manual at any time.
Warranty
To view product warranty information, go to the following website:
www.digi.com/howtobuy/terms
Send comments
Documentation feedback: To provide feedback on this document, send your comments to
techcomm@digi.com.
Customer support
Digi Technical Support: Digi offers multiple technical support plans and service packages to help our
customers get the most out of their Digi product. For information on Technical Support plans and
pricing, contact us at +1 952.912.3444 or visit us at www.digi.com/support.
XBee®/XBee-PRO SX RF Module User Guide
2
Page 3
Contents
XBee®/XBee-PRO SX RF Module User Guide
Applicable firmware and hardware12
Technical specifications
Regulatory conformity summary14
Power requirements14
Networking specifications14
Performance specifications15
General specifications16
GPIO specifications17
Hardware
Mechanical drawings19
Pin signals20
Pin connection recommendations22
Getting started with the XBee/XBee-PRO SX RF Module Development
Kit
XBee SX Development Board24
Connect XBee-PRO SX development boards to a PC25
Connect the XBIB-U-SS development board to a PC26
Configure the device using XCTU26
Configure the devices for a range test26
Perform a range test27
Mesh network demonstration28
Modes
Transparent and API operating modes32
Transparent operating mode32
API operating mode32
Comparing Transparent and API modes32
Modes of operation33
Receive mode33
Transmit mode34
XBee®/XBee-PRO SX RF Module User Guide
3
Page 4
Sleep mode34
Command mode34
Sleep modes
About sleep modes38
Asynchronous modes38
Synchronous modes38
Normal mode38
Asynchronous pin sleep mode39
Asynchronous cyclic sleep mode39
Asynchronous cyclic sleep with pin wake up mode39
Synchronous sleep support mode39
Synchronous cyclic sleep mode40
The sleep timer40
Indirect messaging and polling40
Indirect messaging40
Polling41
Sleeping routers41
Sleep coordinator sleep modes in the DigiMesh network41
Synchronization messages42
Become a sleep coordinator44
Preferred sleep coordinator option44
Resolution criteria and selection option44
Commissioning Pushbutton option45
Auto-early wake-up sleep option46
Select sleep parameters46
Start a sleeping synchronous network46
Add a new node to an existing network47
Change sleep parameters48
Rejoin nodes that lose sync48
Diagnostics49
Query sleep cycle49
Sleep status49
Missed sync messages command50
Sleep status API messages50
Networking methods
The MAC and PHY layers52
64-bit addresses52
Make a unicast transmission53
Make a broadcast transmission53
Delivery methods53
Point to Point / Point to Multipoint (P2MP)53
Repeater/directed broadcast54
DigiMesh networking54
Serial communication
UART data flow59
Serial data59
SPI signals59
XBee®/XBee-PRO SX RF Module User Guide
4
Page 5
Signal description60
Slave mode characteristics60
Full duplex operation61
Low power operation61
Configuration considerations62
SPI and API mode62
SPI parameters62
Serial port selection62
Serial receive buffer63
Serial transmit buffer63
UART flow control63
CTS flow control63
RTS flow control63
AT commands
Special commands65
AC (Apply Changes)65
FR (Software Reset)65
RE (Restore Defaults)65
WR (Write)65
MAC/PHY commands66
AF (Available Frequencies)66
CM (Channel Mask)66
MF (Minimum Frequencies)67
HP (Preamble ID)68
ID (Network ID)68
MT(Broadcast Multi-Transmits)68
BR (RF Data Rate)68
PL (TX Power Level)69
RR (Unicast Mac Retries)70
Diagnostic commands - MAC statistics and timeouts70
BC (Bytes Transmitted)70
DB (Last Packet RSSI)70
ER (Receive Count Error)71
GD (Good Packets Received)71
EA (MAC ACK Failure Count)71
TR (Transmission Failure Count)71
UA (Unicasts Attempted Count)71
%H (MAC Unicast One Hop Time)72
%8 (MAC Broadcast One Hop Time)72
Network commands72
CE (Routing / Messaging Mode)72
BH (Broadcast Hops)73
NH (Network Hops)73
MR (Mesh Unicast Retries)73
NN (Network Delay Slots)74
Addressing commands74
SH (Serial Number High)74
SL (Serial Number Low)74
DH (Destination Address High)74
DL command75
TO (Transmit Options)75
NI (Node Identifier)76
NT (Network Discovery Back-off)76
XBee®/XBee-PRO SX RF Module User Guide
5
Page 6
NO (Network Discovery Options)76
CI (Cluster ID)77
Diagnostic - addressing commands77
XBee SX antenna options (13 dBm maximum RF power)189
Industry Canada (IC)194
Labeling requirements194
Transmitters for detachable antennas194
Detachable antennas194
ACMA (Australia)195
Power requirements195
RSM (New Zealand)195
Power requirements195
Brazil (Anatel)195
ANATEL Brazil for XBee-PRO SX radio products (XBP9X)195
SX ANATEL Brazil for XK9X-DMS-1 XBee SX RF Module Dev Kit (XK9X-DMS-1)196
ANATEL Brazil for XBee SX radio products (XB9X)197
PCB design and manufacturing
Recommended footprint and keepout200
Design notes202
Host board design202
Improve antenna performance203
XBee®/XBee-PRO SX RF Module User Guide
9
Page 10
RF pad version203
Recommended solder reflow cycle204
Flux and cleaning205
Rework205
XBee®/XBee-PRO SX RF Module User Guide
10
Page 11
XBee®/XBee-PRO SX RF Module User Guide
The XBee/XBee-PRO SX RF Module is an embedded radio frequency (RF) device that provides wireless
connectivity to end-point devices in mesh networks.
The XBee/XBee-PRO SX RF Module delivers up to 1 Watt of RF power and has excellent receive
sensitivity, low operating current, and exceptional performance in low power modes. The module’s
frequency hopping technology offers advanced interference immunity, affording long range data
throughput even in challenging RF environments. The XBee/XBee-PRO SX RF Module uses a
microprocessor that supports host communication through Serial Peripheral Interface (SPI) or
universal asynchronous receiver/transmitter (UART), as well as digital, analog, and pulse width
modulation (PWM) lines for interfacing with peripherals.
Applicable firmware and hardware12
XBee®/XBee-PRO SX RF Module User Guide
11
Page 12
XBee®/XBee-PRO SX RF Module User GuideApplicable firmware and hardware
Applicable firmware and hardware
This manual supports the following firmware:
n 0x900X USA and Canada, XBee/XBee-PRO SX
n 0x920x Australia, XBee/XBee-PRO SX
n 0x930X Brazil XBee/XBee-PRO SX
n 0x960X New Zealand, XBee SX only
Note The New Zealand firmware only works with non-PRO hardware.
n v.10xx zigbee
It supports the following hardware:
n XBee/XBee-PRO SX RF Module
XBee®/XBee-PRO SX RF Module User Guide
12
Page 13
Technical specifications
Regulatory conformity summary14
Power requirements14
Networking specifications14
Performance specifications15
General specifications16
GPIO specifications17
This table describes the agency approvals for the devices.
The Australia, New Zealand and Brazil certified devices are separate variants from the USA and
Optional 256-bit Advanced Encryption Standard (AES) cipher block chaining
(CBC) Encryption. Use the EE command to enable encryption. Use the KY
command to set the encryption key.
Performance specifications
The following table describes the performance specifications for the devices.
SpecificationConditionXBee value
Frequency rangeISM 902 to 928 MHz
RF data rate
(software selectable)
Transmit power
(software selectable)
Maximum data
throughput
Low data rate10 kb/s
Middle data rate110 kb/s
High data rate250 kb/s
New Zealand
specific
High data rate120 kb/s
XBee-PRO
value
Up to 13 dBmUp to 30
1
dBm
Up to 13 dBm, at the high data rate
(BR 2) it is capped at 7.5 dBm
Channels10 hopping sequences share 50 frequencies
Available channel
frequencies
Low/middle data
rate
101
2
High data rate50
Rural range line of
sight
Urban range line of
sight
1
30 dBm typical at 3.3 V and above. Maximum power will decrease at lower voltages. For more information on
adjustable power levels, see PL (TX Power Level).
2
The device hops on 50 channels selected using the CM command, from 101 available frequencies. For more
details, see CM (Channel Mask).
3
We estimate rural ranges based on a 14.5 km (9 mi) range test with dipole antennas.
4
Range estimated assuming that the urban noise floor is approximately 15 dB higher than rural. The actual
range depends on the setup and level of interference in your location.
Low data rateUp to 14.5 km (9 mi)Up to 105
km (65 mi)
Low data rateUp to 2.5 km (1.5 mi)Up to 18 km
4
(11 mi)
3
XBee®/XBee-PRO SX RF Module User Guide
15
Page 16
Technical specificationsGeneral specifications
XBee-PRO
SpecificationConditionXBee value
Receiver sensitivityLow data rate-113 dBm
Middle data rate-106 dBm
High data rate-103 dBm
value
Receiver IF selectivity Low data rate ± 250
kHz
Low data rate ± 500
kHz
Middle data rate ±
250 kHz
Middle data rate ±
500 kHz
High data rate ± 500
kHz
High data rate ±
1000 kHz
Receiver RF
selectivity
UARTdata rate
(software selectable)
SPI clock rateUp to 6 Mb/s
Below 900 MHz and
above 930 MHz
40 dB
50 dB
30 dB
40 dB
30 dB
45 dB
> 50 dB
1200 - 921600 baud
General specifications
The following table describes the general specifications for the devices.
SpecificationValue
Dimensions3.38 x 2.21 x 0.32 cm (1.33 x 0.87 x 0.125 in)
Weight3 g
Restriction of Hazardous Substances (RoHS)Compliant
ManufacturingISO 9001:2008 registered standards
Host interface connector37 castellated SMT pads
Antenna connector optionsU.FL or RF pad
Antenna impedance50 Ω unbalanced
Maximum input RF level at antenna port6 dBm
XBee®/XBee-PRO SX RF Module User Guide
16
Page 17
Technical specificationsGPIO specifications
SpecificationValue
Operating temperature-40 °C to 85 °C
Digital I/O13 I/O lines, 5 output lines
Analog-to-digital converter (ADC)4 10-bit analog inputs
Pulse width modulator (PWM)2 outputs
GPIO specifications
The following table provides the electrical specifications for the GPIO pads.
GPIO electrical specificationValue
Voltage - supply2.4 - 3.6 V
Low Schmitt switching threshold
High Schmitt switching threshold
Input current for logic 0-0.1 μA
Input current for logic 10.1 μA
Input pull-up resistor value40 kΩ
Input pull-down resistor value40 kΩ
Output voltage for logic 00.05 * VCC
Output voltage for logic 10.95 * VCC
Output source/sink current1 mA
Total output current (for GPIO pads)20 mA
0.3 * VCC
0.7 * VCC
XBee®/XBee-PRO SX RF Module User Guide
17
Page 18
Hardware
Mechanical drawings19
Pin signals20
XBee®/XBee-PRO SX RF Module User Guide
18
Page 19
HardwareMechanical drawings
Mechanical drawings
The following figures show the XBee/XBee-PRO SX RF Module mechanical drawings. All dimensions are
in centimeters. The XBee/XBee-PRO SX RF Module differs from other surface-mount XBee modules. It
has an additional ground pad on the underside of the module used for heat dissipation. For more
details, see PCB design and manufacturing.
XBee®/XBee-PRO SX RF Module User Guide
19
Page 20
HardwarePin signals
Pin signals
The following table describes the pin signals. Low-asserted signals are distinguished with a horizontal
line over the signal name.
Pin NameI/O
1GND--Ground
2VCCI-Power supply
3DIO13/DOUTI/O OutputGPIO / UART data out
DIN/DIO14/
4
CONFIG
XBee®/XBee-PRO SX RF Module User Guide
I/O InputGPIO / UART data in
Default
stateFunction
20
Page 21
HardwarePin signals
Default
Pin NameI/O
stateFunction
5DIO12I/O Disabled GPIO
RESET
6
I-Drive low to reset device. Do not drive pin high; pin may
only be driven open drain or low. Pin has an internal 20k
pullup resistor
7DIO10/RSSI/PWM0 I/O OutputGPIO / RX Signal Strength Indicator
GPIO / Pin Sleep Control line (DTR on the development
board)
11GND--Ground
DO19/SPI_ATTN
12
OOutputGPO / Serial Peripheral Interface (SPI)Attention or UART
Data Present indicator
13GND--Ground
14DO18/SPI_CLKI/O1InputGPO / SPI clock
DO17/SPI_SSEL
15
I/O2InputGPO / SPI not select
16DO16/SPI_MOSII/O3InputGPO / SPI Data In
17DO15/SPI_MISOOOutput
GPO/SPI Data Out Tri-stated when SPI_SSEL is high
18[Reserved]--Do not connect
19[Reserved]--Do not connect
20[Reserved]--Do not connect
21[Reserved]--Do not connect
22GND--Ground
23[Reserved]--Do not connect
24DIO4I/O Disabled GPIO
1
Pins 14-16 are inputs in SPI mode only. In general purpose I/O pin mode you can only use them as digital
outputs.
2
Pins 14-16 are inputs in SPI mode only. In general purpose I/O pin mode you can only use them as digital
outputs.
3
Pins 14-16 are inputs in SPI mode only. In general purpose I/O pin mode you can only use them as digital
outputs.
XBee®/XBee-PRO SX RF Module User Guide
21
Page 22
HardwarePin signals
Default
Pin NameI/O
DIO7/CTS
25
DIO9/ON/SLEEP
26
V
27
REF
28DIO5/ASSOCI/O OutputGPIO / Associate Indicator
DIO6/RTS
29
30DIO3/AD3I/O Disabled GPIO / Analog Input
31DIO2/AD2I/O Disabled GPIO / Analog Input
32DIO1/AD1I/O Disabled GPIO / Analog Input
33DIO0/AD0I/O InputGPIO / Analog Input / Commissioning Pushbutton
34[Reserved]--Do not connect
35GND--Ground
stateFunction
I/O OutputGPIO / UART Clear to Send Flow Control
I/O OutputGPIO / Module Sleep Status Indicator
--Feature not supported on this device. Used on other XBee
devices for analog voltage reference.
I/O Disabled GPIO / UART Request to Send Flow Control
36RF_PADI/O -RF connection for RF pad variant
37[Reserved]--Do not connect
38GND--Ground pad for heat transfer to host PCB. Located on the
underside of the XBee module.
Pin connection recommendations
The only required pin connections are VCC, GND, DOUT and DIN. To support serial firmware updates,
you should connect VCC, GND, DOUT, DIN, RTS, and SLEEP (DTR).
XBee®/XBee-PRO SX RF Module User Guide
22
Page 23
Getting started with the XBee/XBee-PRO SX RF
Module Development Kit
This section provides getting started instructions if you have an XBee/XBee-PRO SX RF Module
development kit:
n USA XK9X-DMS-0
n Australia XK9X-DMS-2
n Brazil XK9X-DMS-1
This section describes how to set up an XBee network and adjust the XBee/XBee-PRO SX RF Module
settings.
XBee SX Development Board24
Connect XBee-PRO SX development boards to a PC25
Connect the XBIB-U-SS development board to a PC26
Configure the device using XCTU26
Configure the devices for a range test26
Perform a range test27
Mesh network demonstration28
XBee®/XBee-PRO SX RF Module User Guide
23
Page 24
Getting started with the XBee/XBee-PRO SX RF Module Development KitXBee SX Development Board
XBee SX Development Board
The following figure shows the XBee SX development board with onboard XBee-PRO SXRF pad
module and the table that follows explains the callouts in the picture.
Number ItemDescription
1RSSILEDsLEDs display the fade margin present in an active wireless link. No
LEDs illuminated indicates either a weak or no signal. All three
LEDs illuminated indicates a strong link.
2StatusLEDindicators From bottom to top: Associated, Data In, Data Out
3DIO pin LED
indicators
4DC barrel plug
From bottom to top: DIO4, DIO11, DIO12
9 to 18 VDC DC supply is required for transmitting at 27 dBm or
higher.
WARNING! Do not exceed 18 VDC. Excessive voltage
will damage the device and may cause injury.
XBee®/XBee-PRO SX RF Module User Guide
24
Page 25
Getting started with the XBee/XBee-PRO SX RF Module
Development Kit
Number ItemDescription
5Do not connectDo not connect to these pins. This development board does not
support the device's self power feature.
6USB connectorConnect a mini USB cable from this port to the host PC.
7Reset buttonWhen pressed, the button switch resets the device by pulling pin 6
low.
Connect XBee-PRO SX development boards to
a PC
8Commissioning
button
9Development header0.1” pitch header corresponds to pins 1 through 34 on the
10RPSMA connectorAttach an antenna or RF cable to this jack. This connection is valid
11
XBee/XBee-PRO SX
RF Modulefootprint
When pressed, the button switch pulls the device's pin 33 low.
XBee/XBee-PRO SX RF Module. Abbreviated labels are
silkscreened to the left of the header.
only if the board has an RF pad XBee.
Connect XBee-PRO SX development boards to a PC
1. Connect both SX development boards to power supplies and plug the power supplies into an
outlet. The power supply is required when using the XBee-PRO SX because the current draw
when transmitting will exceed what a USB port can supply.
2. Connect the SX development boards to the USB port on a PC via the mini-USB cables. Separate
the SX development boards by at least 2 m (6 ft).
3. Connect the antennas to the RPSMA connector on the SX development boards.
The following table shows the XBee SX development kit contents.
DescriptionQuantity Part number
XBee surface-mount (SMT) socket development
board
SX development board with onboard XBee-PRO
SXRF pad module
Standard USB cable1N/A
Mini USB cable2N/A
12 VDC power supply2Australia and Brazil include packages
RPSMA antenna3A09-HASM-675
U.FL to RPSMA adapter cable1JF1R6-CR3-4I
XBee®/XBee-PRO SX RF Module User Guide
1XBIB-U-SS
2
USA - XBIB-XBP9XR-0
Australia - XBIB-XBP9XR-2
Brazil - XBIB-XBP9XR-1
of AC adapters
25
Page 26
Getting started with the XBee/XBee-PRO SX RF Module
Development Kit
DescriptionQuantity Part number
Connect the XBIB-U-SS development board to
a PC
XBee SX U.FL module1
USA - XB9X-DMUS-001
Australia - XB9X-DMUS-021
Brazil - XB9X-DMUS-011
Connect the XBIB-U-SS development board to a PC
This step is optional. It shows how to set up the standalone XBee SX module on the XBIB-U-SS
development board, which you can substitute as one of the range test devices or use with the other
two devices to create a DigiMesh network.
You can find reference information on the XBIB-U-SS at this link:
To connect the XBee devices to the XBIB-U-SS development boards included in the kit:
CAUTION! Make sure the board is not powered by either the USB or a battery when you
plug in the XBee module.
1. Plug one XBee SXRF Module into the XBIB-U-SS development board.
2. Once the XBee module is plugged into the board (and not before), connect the board to your
computer using the USB cable provided.
3. Connect the U.FL to RPSMA adapter cable to the XBee device and an antenna.
Configure the device using XCTU
XBee Configuration and Test Utility (XCTU) is a multi-platform program that enables users to interact
with Digi radio frequency (RF) devices through a graphical interface. The application includes built-in
tools that make it easy to set up, configure, and test Digi RF devices.
For instructions on downloading and using XCTU, see the XCTU User Guide.
Once you install XCTU, click the XCTU icon to open the program.
Click Discover devices and follow the instructions. XCTU should discover two XBee/XBee-PRO SX RF
Modules.
Click Add selected devices.The devices appear in the Radio Modules list. You can click a module to
view and configure its individual settings. For more information on these items, see AT commands.
Configure the devices for a range test
For devices to communicate with each other, you must configure them so they are in the same
network. To obtain all possible data from the remote device, you must also set the local device to API
mode. For more information on API mode, see Operate in API mode.
When you connect the development board to a PC for the first time, the PC automatically installs
drivers, which may take a few minutes to complete.
1. Add the two devices to XCTU.
2. Select the first module and click the Load default firmware settings button.
XBee®/XBee-PRO SX RF Module User Guide
26
Page 27
Getting started with the XBee/XBee-PRO SX RF Module Development KitPerform a range test
3. Configure the following parameters:
ID: 2015
NI: LOCAL_DEVICE
AP: API Mode Without Escapes [1]
4. Click the Write radio settings button.
5. Select the other module and click the Default firmware settings button.
6. Configure the following parameters:
ID: 2015
NI: REMOTE_DEVICE
AP: Transparent Mode [0]
7. Click the Write radio settings button.
After you write the radio settings for each device, their names appear in the Radio Modules
area. The Port indicates that the LOCAL_DEVICE is in API mode.
8. Disconnect REMOTE_DEVICE from your computer and remove it from XCTU; leave its power
supply connected and plugged in.
9. If you have not already done so, connect LOCAL_DEVICE to a battery. Its USB cable should still
be connected to the laptop.
Perform a range test
A range test is a simple point to point wireless demonstration that tests the devices' ability to
transmit to and receive from each other. Wireless environments vary dramatically depending on many
factors and the range test allows you to experiment with the devices in your own environment.
The range test instructions assume that you are using a laptop to configure the devices. You will need
a battery to power the device connected to the laptop (the "local device") so that you can move
around. Alternatively you can set the local device to PL: 21.5 dBm [0], and the device will run off of the
USB port exclusively. However, the achievable range will significantly decrease if you use the lower
power setting.
WARNING! Keep the boards 2 m (6 ft) apart when transmitting to protect the device's
front end.
Follow these steps to perform the range test:
Open the Tools menu within XCTU and select the Range Test option.
1.
2. Your local devices are listed on the left side of the Devices Selection section. Select the local
device and click the Discover remote devices button.
3. When the discovery process finishes, the remote device is displayed in the Discovering remote
devices... dialog. Click Add selected devices.
4. Select the remote device from the Discovered device list located on the right panel inside.
XBee®/XBee-PRO SX RF Module User Guide
27
Page 28
Getting started with the XBee/XBee-PRO SX RF Module Development KitMesh network demonstration
5. Click Start Range Test.
6. Range test data is represented in the chart. By default, 100 packets are sent for the test. XCTU
displays the instant local and remote RSSI in two separate controls, as well as the number of
packets sent and received. Remote devices only report their RSSI value when the local device
is operating in API mode (by setting AP to 1).
7. Test the wireless link by moving your laptop and local device setup away from the remote
device. Watch the range test status indicators: RSSI will decrease as you get farther away, and
eventually you will see the percentage of successful packets drop below 100%, indicating you
are approaching the limits of the range.
8. Click Stop Range Test to stop the process at any time.
Mesh network demonstration
1. Connect the two XBee PRO SX development boards and the XBIB-U-SS (with the XBee SX
installed) to your computer. Open XCTU and find the three XBee devices.
2. Configure all three devices with the following parameters and write the settings. Note that
XBee A (SENDER) should be the XBee SX device running on the XBIB-U-SS development board.
XBee C
XBee A
(XBee
Parameter
NISENDER RECEIVER BRIDGE Defines the node identifier, a human-friendly name for
ID201520152015Defines the network that a device will attach to. This
PLLowest
DH000Defines the destination address (high part) to transmit
DLFFFFFFFFFFFFDefines the destination address (low part) to transmit
SX)
[0]
XBee B
(XBee
PRO SX)
Lowest
[0]
(XBee
PRO
SX)Effect
the module.
must be the same for all devices in your network.
Lowest
[0]
Defines the transmitter output power level. Set it to
the lowest level to facilitate the execution of the
example.
the data to.
the data to. You can use
the000000000000FFFFaddress to send a broadcast
message.
CAUTION! The default NI value is a blank
space. Make sure to delete the space
when you change the value.
RP555Defines the time that the RSSI LED will be on when the
XBee®/XBee-PRO SX RF Module User Guide
device receives a packet.
5 (hexadecimal) = 5 (decimal) x 100 ms = 500 ms.
28
Page 29
Getting started with the XBee/XBee-PRO SX RF Module Development KitMesh network demonstration
To set up a DigiMesh network, you must first connect some XBee devices to a portable battery so you
can move around with them.
1. Keep SENDER connected to the computer.
2. Disconnect RECEIVER from the computer and connect to a portable battery.
3. Disconnect BRIDGE from the computer and from power.
You can now start sending messages. Use the following steps to simulate a simple DigiMesh network
by configuring SENDER and RECEIVER to communicate, moving the two devices out of range of each
other, and adding the BRIDGE node to relay the messages between SENDER and RECEIVER. You will
start by configuring SENDER to send a broadcast message every second. You can use the XCTU
console or any serial port terminal application. This tutorial uses the XCTU console.
1. Switch to the Consoles working mode using the button in the top menu.
2. Open the serial connection of the device: select the SENDER device in the Radio Modules
section, and click the Open serial connection button.
The background changes to green to indicate that the connection is open.
3. Click the plus sign in the Send Frames panel to add a new packet. Type the message "Hello!".
4. To start sending this message every second, in the Send sequence box:
a. Set 1000 ms as transmit interval.
b. Select Loop infinitely.
c. Click Start sequence.
5. Notice that the yellow Data Out LED of RECEIVER illuminates briefly every second. This means
that the device is successfully receiving the messages. The white RSSI LEDs will also light up to
indicate the strength of the signal received.
XBee®/XBee-PRO SX RF Module User Guide
29
Page 30
Getting started with the XBee/XBee-PRO SX RF Module Development KitMesh network demonstration
6. Move RECEIVER away from SENDER until the Data Out LED does not blink anymore, meaning it
has moved out of range.
7. Place BRIDGE about halfway between SENDER and RECEIVER and plug it in. BRIDGE joins the
network, creates a bridge between the other two nodes, and relays messages from SENDER to
RECEIVER.
XBee®/XBee-PRO SX RF Module User Guide
30
Page 31
Modes
Transparent and API operating modes32
Modes of operation33
XBee®/XBee-PRO SX RF Module User Guide
31
Page 32
ModesTransparent and API operating modes
Transparent and API operating modes
The firmware operates in several different modes. Two top-level modes establish how the device
communicates with other devices through its serial interface: Transparent operating mode and API
operating mode.
Transparent operating mode
Devices operate in this mode by default. The device acts as a serial line replacement when it is in
Transparent operating mode. The device queues all UART data it receives through the DIN pin for RF
transmission. When a device receives RF data, it sends the data out through the DOUT pin. You can set
the configuration parameters using the AT Command interface.
While operating in Transparent operating mode, the device uses the DH and DL parameters to
determine the destination address used for RF transmissions. Transparent operating mode is not
available when using the SPI interface.
API operating mode
API operating mode is an alternative to Transparent mode. API mode is a frame-based protocol that
allows you to direct data on a packet basis. It can be particularly useful in large networks where you
need control over the operation of the radio network or when you need to know which node a data
packet is from. The device communicates UART or SPI data in packets, also known as API frames. This
mode allows for structured communications with serial devices. It is helpful in managing larger
networks and is more appropriate for performing tasks such as collecting data from multiple locations
or controlling multiple devices remotely.
For more information, see API frame specifications.
Comparing Transparent and API modes
The XBee/XBee-PRO SX RF Module can use its serial connection in two ways:Transparent mode or API
operating mode. You can use a mixture of devices running API mode and transparent mode in a
network.
The following table compares the advantages of transparent and API modes of operation:
FeatureDescription
Transparent mode features
Simple interfaceAll received serial data is transmitted unless the device is in Command
mode
Easy to supportIt is easier for an application to support Transparent operation and
Command mode
API mode features
Easy to manage data
transmissions to
multiple destinations
Transmitting RF data to multiple remote devices only requires the
application to change the address in the API frame. This process is much
faster than in Transparent mode where the application must enter
Command mode, change the address, exit Command mode, and then
transmit data.
XBee®/XBee-PRO SX RF Module User Guide
32
Page 33
ModesModes of operation
FeatureDescription
Each API transmission
can return a transmit
status frame indicating
Because acknowledgments are sent out of the serial interface, this
provides more information about the health of the RF network and can
be used to debug issues after the network has been deployed.
the success or reason
for failure
Received data frames
All received RF data API frames indicate the source address
indicate the sender's
address
Advanced addressing
support
Advanced networking
diagnostics
API transmit and receive frames can expose addressing fields including
source and destination endpoints, cluster ID, and profile ID
API frames can provide indication of I/O samples from remote devices,
and node identification messages.
Some network diagnostic tools such as
Trace Route, NACK, and Link Testing can only be performed in API mode.
Remote ConfigurationSet/read configuration commands can be sent to remote devices to
configure them as needed using the API
We recommend API mode when a device:
n Sends RF data to multiple destinations
n Sends remote configuration commands to manage devices in the network
n Receives RF data packets from multiple devices, and the application needs to know which
device sent which packet
API mode is required when:
n Receiving I/O samples from remote devices
n Using SPI for the serial port
If the conditions listed above do not apply (for example, a sensor node, router, or a simple application),
then Transparent operation might be suitable. It is acceptable to use a mixture of devices running API
mode and Transparent mode in a network.
Modes of operation
Receive mode
This is the default mode for the XBee/XBee-PRO SX RF Module. The device is in Receive mode when it
is not transmitting data. If a destination node receives a valid RF packet, the destination node
transfers the data to its serial transmit buffer.
If a destination node receives a valid RF packet, the destination node transfers the data to its serial
transmit buffer. For the serial interface to report received data on the RF network, that data must
meet the following criteria:
n Network ID match [ID (Network ID)]
n Preamble ID match [HP (Preamble ID)]
n Address match [SH (Serial Number High) and SL (Serial Number Low)]
XBee®/XBee-PRO SX RF Module User Guide
33
Page 34
ModesModes of operation
Transmit mode
When DigiMesh data is transmitted from one node to another, the destination node transmits a
network-level acknowledgment back across the established route to the source node. This
acknowledgment packet indicates to the source node that the destination node received the data
packet. If the source node does not receive a network acknowledgment, it retransmits the data.
For more information, see Data transmission and routing.
Sleep mode
Sleep modes allow the device to enter states of low power consumption when not in use. The
XBee/XBee-PRO SX RF Module supports both pin sleep (Sleep mode entered on pin transition) and
cyclic sleep (device sleeps for a fixed time).
Sleep modes allow the device to enter states of low power consumption when not in use. The device is
almost completely off during sleep, and is incapable of sending or receiving data until it wakes up.
XBee devices support pin sleep, where the device enters sleep mode upon pin transition, and cyclic
sleep, where the device sleeps for a fixed time.
For more information, see Sleep modes.
Command mode
Command mode is a state in which the firmware interprets incoming characters as commands. It
allows you to modify the device’s firmware using parameters you can set using AT commands. When
you want to read or set any parameter of the device when operating in Transparent mode, you have
to send an AT command. Every AT command starts with the letters AT followed by the two characters
that identify the command the device issues and then by some optional configuration values.
Command mode is available on the UART interface in both Transparent and API modes. You cannot
use the SPI interface to enter Command mode.
Enter Command mode
To get a device to switch into this mode, you must issue the following sequence: GT + CC(+++) + GT.
When the device sees a full second of silence in the data stream (the guard time) followed by the
XBee®/XBee-PRO SX RF Module User Guide
34
Page 35
ModesModes of operation
string +++ (without Enter or Return) and another full second of silence, it knows to stop sending data
through and start accepting commands locally.
Note Do not press Return or Enter after typing +++ because it will interrupt the guard time silence
and prevent you from entering Command mode.
When you send the Command mode sequence, the device sends OK out the UART pin. The device may
delay sending the OK if it has not transmitted all of the serial data it received.
When the device is in Command mode, it listens for user input and is able to receive AT commands on
the UART. If CT time (default is 10 seconds) passes without any user input, the device drops out of
Command mode and returns to Receive mode.
You can customize the guard times and timeout in the device’s configuration settings. For information
on how to do this, see CC (Command Character), CT (Command Mode Timeout) and GT (Guard Times).
Troubleshooting
Failure to enter Command mode is commonly due to baud rate mismatch. Ensure that the baud rate
of the connection matches the baud rate of the device. By default, the BR parameter = 3 (9600 b/s).
There are two alternative ways to enter Command mode:
Both of these methods temporarily set the device's baud rate to 9600 and return an OK on the UART
to indicate that Command mode is active. When Command mode exits, the device returns to normal
operation at the baud rate the BR parameter is set to.
Send AT commands
Once the device enters Command mode, use the syntax in the following figure to send AT commands.
Every AT command starts with the letters AT, which stands for "attention." The AT is followed by two
characters that indicate which command is being issued, then by some optional configuration values.
To read a parameter value stored in the device’s register, omit the parameter field.
The preceding example changes the device's destination address (Low) to 0x1F.
Multiple AT commands
You can send multiple AT commands at a time when they are separated by a comma in Command
mode; for example, ATSH,SL.
Parameter format
Refer to the list of AT commands for the format of individual AT command parameters. Valid formats
for hexidecimal values include with or without a leading 0x for example FFFF or 0xFFFF.
Response to AT commands
When reading parameters, the device returns the current parameter value instead of an OK message.
XBee®/XBee-PRO SX RF Module User Guide
35
Page 36
ModesModes of operation
Apply command changes
Any changes you make to the configuration command registers using AT commands do not take effect
until you apply the changes. For example, if you send the BD command to change the baud rate, the
actual baud rate does not change until you apply the changes. To apply changes:
1. Send the AC (Apply Changes) command.
or:
2. Exit Command mode.
Exit Command mode
1. Send the CN (Exit Command Mode) command followed by a carriage return.
or:
2. If the device does not receive any valid AT commands within the time specified by CT
(Command Mode Timeout), it returns to Transparent or API mode. The default Command Mode
Timeout is 10 seconds.
For an example of programming the device using AT Commands and descriptions of each configurable
parameter, see AT commands.
XBee®/XBee-PRO SX RF Module User Guide
36
Page 37
Sleep modes
About sleep modes38
Normal mode38
Asynchronous pin sleep mode39
Asynchronous cyclic sleep mode39
Asynchronous cyclic sleep with pin wake up mode39
Synchronous sleep support mode39
Synchronous cyclic sleep mode40
The sleep timer40
Indirect messaging and polling40
Sleeping routers41
Sleep coordinator sleep modes in the DigiMesh network41
Synchronization messages42
Become a sleep coordinator44
Select sleep parameters46
Start a sleeping synchronous network46
Add a new node to an existing network47
Change sleep parameters48
Rejoin nodes that lose sync48
Diagnostics49
XBee®/XBee-PRO SX RF Module User Guide
37
Page 38
Sleep modesAbout sleep modes
About sleep modes
A number of low-power modes exist to enable devices to operate for extended periods of time on
battery power. Use the SM command to enable these sleep modes. The sleep modes are
characterized as either:
n Asynchronous (SM = 1, 4, 5).
n Synchronous (SM = 7, 8).
In DigiMesh networks, a device functions in one of three roles:
1. A sleep coordinator.
2. A potential coordinator.
3. A non-coordinator.
The difference between a potential coordinator and a non-coordinator is that a non-coordinator node
has its SO parameter set so that it will not participate in coordinator election and cannot ever be a
sleep coordinator.
Asynchronous modes
n Do not use asynchronous sleep modes in a synchronous sleeping network, and vice versa.
n Use the asynchronous sleep modes to control the sleep state on a device by device basis.
n Do not use devices operating in asynchronous sleep mode to route data.
n We strongly encourage you to set asynchronous sleeping devices as end-devices using the CE
command. This prevents the node from attempting to route data.
n Transmissions sent to an asynchronously sleeping device are not buffered and will be lost if the
receiving device is not actively awake when the transmission occurred. If you require two-way
communication, you can use Indirect Messaging for P2MP unicast messages. For more
information, see Indirect messaging and polling.
Synchronous modes
Synchronous sleep makes it possible for all nodes in the network to synchronize their sleep and wake
times. All synchronized cyclic sleep nodes enter and exit a low power state at the same time.
This forms a cyclic sleeping network.
n A device acting as a sleep coordinator sends a special RF packet called a sync message to
synchronize nodes.
n To make a device in the network a coordinator, a node uses several resolution criteria.
n The sleep coordinator sends one sync message at the beginning of each wake period. The
coordinator sends the sync message as a broadcast and every node in the network repeats it.
n You can change the sleep and wake times for the entire network by locally changing the
settings on an individual device. The network uses the most recently set sleep settings.
Normal mode
Set SM to 0 to enter Normal mode.
XBee®/XBee-PRO SX RF Module User Guide
38
Page 39
Sleep modesAsynchronous pin sleep mode
Normal mode is the default sleep mode. If a device is in this mode, it does not sleep and is always
awake.
Use mains-power for devices in Normal mode.
A device in Normal mode synchronizes to a sleeping network, but does not observe synchronization
data routing rules; it routes data at any time, regardless of the network's wake state.
When synchronized, a device in Normal mode relays sync messages that sleep-compatible nodes
generate, but does not generate sync messages itself.
Once a device in Normal mode synchronizes with a sleeping network, you can put it into a sleep-
compatible sleep mode at any time.
Asynchronous pin sleep mode
Set SM to 1 to enter asynchronous pin sleep mode.
Pin sleep allows the device to sleep and wake according to the state of the SLEEP_RQ pin (pin 10).
When you assert SLEEP_RQ (high), the device finishes any transmit or receive operations and enters a
low-power state.
When you de-assert SLEEP_RQ (low), the device wakes from pin sleep.
Asynchronous cyclic sleep mode
Set SM to 4 to enter asynchronous cyclic sleep mode.
Cyclic sleep allows the device to sleep for a specific time and wake for a short time to poll.
If the device receives serial or RF data while awake, it extends the time before it returns to sleep by
the specific amount the ST command provides. Otherwise, it enters sleep mode immediately.
The ON_SLEEP line (pin pin 26) is asserted (high) when the device wakes, and is de-asserted (low)
when the device sleeps.
If you use the D7 command to enable hardware flow control, the CTS pin asserts (low) when the
device wakes and can receive serial data, and de-asserts (high) when the device sleeps.
Asynchronous cyclic sleep with pin wake up mode
Set SM to 5 to enter asynchronous cyclic sleep with pin wake up mode.
This mode is a slight variation on asynchronous cyclic sleep mode (SM = 4) that allows you to wake a
device prematurely by asserting the SLEEP_RQ pin (pin 10).
In this mode, you can wake the device after the sleep period expires, or if a high-to-low transition
occurs on the SLEEP_RQ pin.
Synchronous sleep support mode
Set SM to 7 to enter synchronous sleep support mode.
A device in synchronous sleep support mode synchronizes itself with a sleeping network, but does not
sleep itself. At any time, the node responds to new nodes that attempt to join the sleeping network
with a sync message. A sleep support node only transmits normal data when the other nodes in the
sleeping network are awake.
Sleep support nodes are especially useful:
n When you use them as preferred sleep coordinator nodes.
n As aids in adding new nodes to a sleeping network.
XBee®/XBee-PRO SX RF Module User Guide
39
Page 40
Sleep modesSynchronous cyclic sleep mode
Note Because sleep support nodes do not sleep, they should be mains powered.
Synchronous cyclic sleep mode
Set SM to 8 to enter synchronous cyclic sleep mode.
A device in synchronous cyclic sleep mode sleeps for a programmed time, wakes in unison with other
nodes, exchanges data and sync messages, and then returns to sleep. While asleep, it cannot receive
RF messages or receive data (including commands) from the UART port.
Generally, the network’s sleep coordinator specifies the sleep and wake times based on its SP and ST
settings. The device only uses these parameters at startup until the device synchronizes with the
network.
When a device has synchronized with the network, you can query its sleep and wake times with the
OS and OW commands respectively.
If D9 = 1 (ON/SLEEP enabled) on a cyclic sleep node, the ON/SLEEP line asserts when the device is
awake and de-asserts when the device is asleep.
If D7 = 1, the device de-asserts CTS while asleep.
A newly-powered, unsynchronized, sleeping device polls for a synchronized message and then sleeps
for the period that the SP command specifies, repeating this cycle until it synchronizes by receiving a
sync message. Once it receives a sync message, the device synchronizes itself with the network.
Note Configure all nodes in a synchronous sleep network to operate in either synchronous sleep
support mode or synchronous cyclic sleep mode. asynchronous sleeping nodes are not compatible
with synchronous sleeping nodes.
The sleep timer
If the device receives serial or RF data in Asynchronous cyclic sleep mode and Asynchronous cyclic
sleep with pin wake up modes (SM = 4 or SM = 5), it starts a sleep timer (time until sleep).
n If the device receives any data serially or by RF link, the timer resets.
n Use ST (Wake Time) to set the duration of the timer.
n When the sleep timer expires the device returns to sleep.
Indirect messaging and polling
To enable reliable communication with sleeping devices, you can use the CE (Routing/Messaging
Mode) command to enable indirect messaging and polling. Indirect messaging only affects Point-toMultipoint (P2MP) unicast transmissions.
Indirect messaging
Indirect messaging is a communication mode designed for communicating with asynchronous
sleeping devices. A device can enable indirect messaging by making itself an indirect messaging
coordinator with the CE command. An indirect messaging coordinator does not immediately transmit
a P2MP unicast when it is received over the serial port. Instead the device holds onto the data until it
is requested via a poll. On receiving a poll, the indirect messaging coordinator sends a queued data
packet (if available) to the requestor.
Because it is possible for a polling device to be eliminated, a mechanism is in place to purge
unrequested data packets. If the coordinator holds an indirect data packet for an indirect messaging
XBee®/XBee-PRO SX RF Module User Guide
40
Page 41
Sleep modesSleeping routers
poller for more than 2.5 times its SP value, then the packet is purged. We suggest setting the SP of
the coordinator to the same value as the highest SP time that exists among the pollers in the
network. If the coordinator is in API mode, a TxStatus message is generated for a purged data packet
with a status of 0x75 (INDIRECT_MESSAGE_UNREQUESTED).
An indirect messaging coordinator queues up as many data packets as it has buffers available. After
the coordinator uses all of its available buffers, it holds transmission requests unprocessed on the
serial input queue. After the serial input queue is full, the device de-asserts CTS (if hardware flow
control is enabled). After receiving a poll or purging data from the indirect messaging queue the
buffers become available again.
Indirect messaging only functions with P2MP unicast messages. Indirect messaging has no effect on
P2MP broadcasts, directed broadcasts, repeater packets, or DigiMesh packets. These messages are
sent immediately when received over the serial port and are not put on the indirect messaging queue.
Polling
Polling is the automatic process by which a node can request data from an indirect messaging
coordinator. To enable polling on a device, configure it as an indirect messaging poller with the CE
command and set its DH:DL registers to match the SH:SL registers of the device that will function as
the Indirect Messaging Coordinator. When you enable polling, the device sends a P2MP poll request
regularly to the address specified by the DH:DL registers. When the device sends a P2MP unicast to
the destination specified by the DH:DL of a polling device, the data also functions as a poll.
When a polling device is also an asynchronous sleeping device, that device sends a poll shortly after
waking from sleep. After that first poll is sent, the device sends polls in the normal manner described
previously until it returns to sleep.
Sleeping routers
The Sleeping Router feature of DigiMesh makes it possible for all nodes in the network to synchronize
their sleep and wake times. All synchronized cyclic sleep nodes enter and exit a low power state at the
same time. This forms a cyclic sleeping network. For more information, see Become a sleep
coordinator.
Sleep coordinator sleep modes in the DigiMesh network
In a synchronized sleeping network, one node acts as the sleep coordinator. During normal
operations, at the beginning of a wake cycle the sleep coordinator sends a sync message as a
broadcast to all nodes in the network. This message contains synchronization information and the
wake and sleep times for the current cycle. All cyclic sleep nodes that receive a sync message remain
awake for the wake time and then sleep for the specified sleep period.
The sleep coordinator sends one sync message at the beginning of each cycle with the current wake
and sleep times. All router nodes that receive this sync message relay the message to the rest of the
network. If the sleep coordinator does not hear a rebroadcast of the sync message by one of its
immediate neighbors, then it re-sends the message one additional time.
If you change the SP or ST parameters, the network does not apply the new settings until the
beginning of the next wake time. For more information, see Change sleep parameters.
A sleeping router network is robust enough that an individual node can go several cycles without
receiving a sync message, due to RF interference, for example. As a node misses sync messages, the
time available for transmitting messages during the wake time reduces to maintain synchronization
accuracy. By default, a device reduces its active sleep time progressively as it misses sync messages.
XBee®/XBee-PRO SX RF Module User Guide
41
Page 42
Sleep modesSynchronization messages
Synchronization messages
A sleep coordinator regularly sends sync messages to keep the network in sync. Unsynchronized
nodes also send messages requesting sync information.
Sleep compatible nodes use Deployment mode when they first power up and the sync message has
not been relayed. A sleep coordinator in Deployment mode rapidly sends sync messages until it
receives a relay of one of those messages. Deployment mode:
n Allows you to effectively deploy a network.
n Allows a sleep coordinator that resets to rapidly re-synchronize with the rest of the network.
If a node exits deployment mode and then receives a sync message from a sleep coordinator that is in
Deployment mode, it rejects the sync message and sends a corrective sync to the sleep coordinator.
Use the SO (sleep options) command to disable deployment mode. This option is enabled by default.
A sleep coordinator that is not in deployment mode sends a sync message at the beginning of the
wake cycle. The sleep coordinator listens for a neighboring node to relay the sync. If it does not hear
the relay, the sleep coordinator sends the sync one additional time.
A node that is not a sleep coordinator and has never been synchronized sends a message requesting
sync information at the beginning of its wake cycle. Synchronized nodes which receive one of these
messages respond with a synchronization packet.
If you use the SOcommand to configure nodes as non-coordinators, and if the non-coordinators go six
or more sleep cycles without hearing a sync, they send a message requesting sync at the beginning of
their wake period.
The following diagram illustrates the synchronization behavior of sleep compatible devices.
XBee®/XBee-PRO SX RF Module User Guide
42
Page 43
Sleep modesSynchronization messages
XBee®/XBee-PRO SX RF Module User Guide
43
Page 44
Sleep modesBecome a sleep coordinator
Become a sleep coordinator
In DigiMesh networks, a device can become a sleep coordinator in one of four ways:
n Define a preferred sleep coordinator
n A potential sleep coordinator misses three or more sync messages
n Press the Commissioning Pushbutton twice on a potential sleep coordinator
n Change the sleep timing values on a potential sleep coordinator
Preferred sleep coordinator option
You can specify that a node always act as a sleep coordinator. To do this, set the preferred sleep
coordinator bit (bit 0) in the SO command to 1.
A node with the sleep coordinator bit set always sends a sync message at the beginning of a wake
cycle. To avoid network congestion and synchronization conflicts, do not set this bit on more than one
node in the network.
Although it is not necessary to specify a preferred sleep coordinator, doing so improves network
performance.
A node that is centrally located in the network can serve as a good sleep coordinator, because it
minimizes the number of hops a sync message takes to get across the network.
A sleep support node and/or a node that is mains powered is a good candidate to be a sleep
coordinator.
CAUTION! Use the preferred sleep coordinator bit with caution. The advantages of using
the option become weaknesses if you use it on a node that is not in the proper position
or configuration.
You can also use the preferred sleep coordinator option when you set up a network for the first time.
When you start a network, you can configure a node as a sleep coordinator so it will begin sending
sleep messages. After you set up the network, disable the preferred sleep coordinator bit.
Resolution criteria and selection option
There is an optional selection process with resolution criteria that occurs on a node if it loses contact
with the network sleep coordinator. By default, this process is disabled. Use the SO command to
enable this process. This process occurs automatically if a node loses contact with the previous sleep
coordinator.
If you enable the process on any sleep compatible node, it is eligible to become the sleep coordinator
for the network.
A sleep compatible node may become a sleep coordinator if it:
n Misses three or more sync messages.
n Is not configured as a non-coordinator (presumably because the sleep coordinator has been
disabled).
Depending on the platform and other configurable options, such a node eventually uses the selection
process after a number of sleep cycles without a sync.
A node that uses the selection process begins acting as the new network sleep coordinator.
XBee®/XBee-PRO SX RF Module User Guide
44
Page 45
Sleep modesBecome a sleep coordinator
It is possible for multiple nodes to declare themselves as the sleep coordinator. If this occurs, the
firmware uses the following resolution criteria to identify the sleep coordinator from among the nodes
using the selection process:
1. Newer sleep parameters: the network considers a node using newer sleep parameters (SP and
ST) as higher priority to a node using older sleep parameters. See Change sleep parameters.
2. Preferred sleep coordinator: a node acting as a preferred sleep coordinator is higher priority to
other nodes.
3. Sleep support node: sleep support nodes are higher priority to cyclic sleep nodes. You can
modify this behavior using the SO parameter.
4. Serial number: If the previous factors do not resolve the priority, the network considers the
node with the higher serial number to be higher priority.
Commissioning Pushbutton option
Use the Commissioning Pushbutton to select a device to act as the sleep coordinator. The
Commissioning Pushbutton is mapped to DIO0 (pin 33) and enabled by default.
If you enable the Commissioning Pushbutton functionality, you can immediately select a device as a
sleep coordinator by pressing the Commissioning Pushbutton twice or by issuing the CB2 command.
The device you select in this manner is still subject to the resolution criteria process.
Only sleep coordinator nodes honor Commissioning Pushbutton nomination requests. A node
configured as a non-sleep coordinator ignores commissioning button nomination requests.
Change sleep parameters
Any sleep compatible node in the network that does not have the non-coordinator sleep option set
can make changes to the network’s sleep and wake times. If you change a node’s SP or ST to values
different from those that the network is using, the node becomes the sleep coordinator. The node
begins sending sync messages with the new sleep parameters at the beginning of the next wake
cycle.
n For normal operations, a device uses the sleep and wake parameters it gets from the sleep
sync message, not the ones specified in its SP and ST parameters. It does not update the SP
and ST parameters with the values of the sync message. Use the OSand OW commands to
query the operating network sleep and wake times currently being used by the node.
n Changing network parameters can cause a node to become a sleep coordinator and change
the sleep settings of the network. The following commands can cause this to occur: NH, NN,
and MR.
For most applications, we recommend configuring the NH, NN, and MR network parameters during
initial deployment only. The default values of NH and NN are optimized to work for most deployments.
Sleep guard times
To compensate for variations in the timekeeping hardware of the various devices in a sleeping router
network, the network allocates sleep guard times at the beginning and end of the wake period. The
size of the sleep guard time varies based on the sleep and wake times you select and the number of
sleep cycles that elapse since receiving the last sync message. The sleep guard time guarantees that
a destination module will be awake when the source device sends a transmission. As a node misses
more and more consecutive sync messages, the sleep guard time increases in duration and decreases
the available transmission time.
XBee®/XBee-PRO SX RF Module User Guide
45
Page 46
Sleep modesSelect sleep parameters
Auto-early wake-up sleep option
If you have nodes that are missing sync messages and could be going out of sync with the rest of the
network, enabling an early wake gives the device a better chance to hear the sync messages that are
being broadcast.
Similar to the sleep guard time, the auto early wake-up option decreases the sleep period based on
the number of sync messages a node misses. This option comes at the expense of battery life.
Use the SO command to disable auto-early wake-up sleep. This option is enabled by default.
Select sleep parameters
Choosing proper sleep parameters is vital to creating a robust sleep-enabled network with a desirable
battery life. To select sleep parameters that will be good for most applications, follow these steps:
1. Choose NN and NH.
Based on the placement of the nodes in your network, select the appropriate values for
the NH (Network Hops) and NN (Network Delay Slots) parameters.
We optimize the default values of NH and NN to work for the majority of deployments.
In most cases, we suggest that you do not modify these parameters from their default
values. Decreasing these parameters for small networks can improve battery life, but
take care to not make the values too small.
2. Calculate the Sync Message Propagation Time (SMPT).
This is the maximum amount of time it takes for a sleep synchronization message to
propagate to every node in the network. You can estimate this number with the
following formula:
SMPT = NN*NH*(MT+1)*18 ms.
3. Select the duty cycle you want.
4. Choose the sleep period and wake time.
The wake time must be long enough to transmit the desired data as well as the sync message.
The ST parameter automatically adjusts upwards to its minimum value when you change other
AT commands that affect it (SP, NN, and NH).
Use a value larger than this minimum. If a device misses successive sync messages, it reduces
its available transmit time to compensate for possible clock drift. Budget a large enough ST
time to allow for the device to miss a few sync messages and still have time for normal data
transmissions.
Start a sleeping synchronous network
By default, all new nodes operate in normal (non-sleep) mode. To start a synchronous sleeping
network, follow these steps:
1. Set SO to 1 to enable the preferred sleep coordinator option on one of the nodes.
2. Set its SM to a synchronous sleep compatible mode (7 or 8) with its SP and ST set to a quick
cycle time. The purpose of a quick cycle time is to allow the network to send commands quickly
through the network during commissioning.
XBee®/XBee-PRO SX RF Module User Guide
46
Page 47
Sleep modesAdd a new node to an existing network
3. Power on the new nodes within range of the sleep coordinator. The nodes quickly receive a
sync message and synchronize themselves to the short cycle SP and ST set on the sleep
coordinator.
4. Configure the new nodes to the sleep mode you want, either cyclic sleeping modes or sleep
support modes.
5. Set the SP and ST values on the sleep coordinator to the values you want for the network.
6. Wait a sleep cycle for the sleeping nodes to sync themselves to the new SP and ST values.
7. Disable the preferred sleep coordinator option bit on the sleep coordinator unless you want a
preferred sleep coordinator.
8. Deploy the nodes to their positions.
Alternatively, prior to deploying the network you can use the WR command to set up nodes with their
sleep settings pre-configured and written to flash. If this is the case, you can use the Commissioning
Pushbutton and associate LED to aid in deployment:
1. If you are going to use a preferred sleep coordinator in the network, deploy it first.
2. If there will not be a preferred sleep coordinator, select a node for deployment, power it on and
press the Commissioning Pushbutton twice. This causes the node to begin emitting sync
messages.
3. Verify that the first node is emitting sync messages by watching its associate LED. A slow blink
indicates that the node is acting as a sleep coordinator.
4. Power on nodes in range of the sleep coordinator or other nodes that have synchronized with
the network. If the synchronized node is asleep, you can wake it by pressing the
Commissioning Pushbutton once.
5. Wait a sleep cycle for the new node to sync itself.
6. Verify that the node syncs with the network. The associate LED blinks when the device is
awake and synchronized.
7. Continue this process until you deploy all of the nodes.
Add a new node to an existing network
To add a new node to the network, the node must receive a sync message from a node already in the
network. On power-up, an unsynchronized, sleep compatible node periodically sends a broadcast
requesting a sync message and then sleeps for its SP period. Any node in the network that receives
this message responds with a sync. Because the network can be asleep for extended periods of time,
and cannot respond to requests for sync messages, there are methods you can use to sync a new
node while the network is asleep.
1. Power the new node on within range of a sleep support node. Sleep support nodes are always
awake and able to respond to sync requests promptly.
2. You can wake a sleeping cyclic sleep node in the network using the Commissioning Pushbutton.
Place the new node in range of the existing cyclic sleep node. Wake the existing node by
holding down the Commissioning Pushbutton for two seconds, or until the node wakes. The
existing node stays awake for 30 seconds and responds to sync requests while it is awake.
XBee®/XBee-PRO SX RF Module User Guide
47
Page 48
Sleep modesChange sleep parameters
If you do not use one of these two methods, you must wait for the network to wake up before adding
the new node.
Place the new node in range of the network with a sleep/wake cycle that is shorter than the wake
period of the network.
The new node periodically sends sync requests until the network wakes up and it receives a sync
message.
Change sleep parameters
To change the sleep and wake cycle of the network, select any sleep coordinator capable node in the
network and change the SP and/or ST of the node to values different than those the network
currently uses.
n If you use a preferred sleep coordinator or if you know which node acts as the sleep
coordinator, we suggest that you use this node to make changes to network settings.
n If you do not know the network sleep coordinator, you can use any node that does not have the
non-sleep coordinator sleep option bit set. For details on the bit, see SO (Sleep Options).
When you make changes to a node’s sleep parameters, that node becomes the network’s sleep
coordinator unless it has the non-sleep coordinator option selected. It sends a sync message with the
new sleep settings to the entire network at the beginning of the next wake cycle. The network
immediately begins using the new sleep parameters after it sends this sync.
Changing sleep parameters increases the chances that nodes will lose sync. If a node does not receive
the sync message with the new sleep settings, it continues to operate on its old settings. To minimize
the risk of a node losing sync and to facilitate the re-syncing of a node that does lose sync, take the
following precautions:
2. Enable the missed sync early wake up sleep option in the SO command. This option is enabled
by default. This command tells a node to wake up progressively earlier based on the number of
cycles it goes without receiving a sync. This increases the probability that the un-synced node
will be awake when the network wakes up and sends the sync message.
Note Using this sleep option increases reliability but may decrease battery life. Nodes using this sleep
option that miss sync messages increase their wake time and decrease their sleep time during cycles
where they miss the sync message. This increases power consumption.
When you are changing between two sets of sleep settings, choose settings so that the wake periods
of the two sleep settings occur at the same time. In other words, try to satisfy the following equation:
(SP1+ ST1) = N * (SP2+ ST2)
where SP1/ST1and SP2/ST2are the desired sleep settings and N is an integer.
Rejoin nodes that lose sync
DigiMesh networks get their robustness from routing redundancies which may be available. We
recommend architecting the network with redundant mesh nodes to increase robustness.
If a scenario exists where the only route connecting a subnet to the rest of the network depends on a
single node, and that node fails or the wireless link fails due to changing environmental conditions (a
catastrophic failure condition), then multiple subnets may arise using the same wake and sleep
XBee®/XBee-PRO SX RF Module User Guide
48
Page 49
Sleep modesDiagnostics
intervals. When this occurs the first task is to repair, replace, and strengthen the weak link with new
and/or redundant devices to fix the problem and prevent it from occurring in the future.
When you use the default DigiMesh sleep parameters, separated subnets do not drift out of phase
with each other. Subnets can drift out of phase with each other if you configure the network in one of
the following ways:
n If you disable the non-sleep coordinator bit in the SO command on multiple devices in the
network, they are eligible for the network to nominate them as a sleep coordinator. For more
details, see SO (Sleep Options).
n If the devices in the network do not use the auto early wake-up sleep option.
If a network has multiple subnets that drift out of phase with each other, get the subnets back in
phase with the following steps:
1. Place a sleep support node in range of both subnets.
2. Select a node in the subnet that you want the other subnet to sync with.
3. Use this node to slightly change the sleep cycle settings of the network, for example,
increment ST.
4. Wait for the subnet’s next wake cycle. During this cycle, the node you select to change the
sleep cycle parameters sends the new settings to the entire subnet it is in range of, including
the sleep support node that is in range of the other subnet.
5. Wait for the out of sync subnet to wake up and send a sync. When the sleep support node
receives this sync, it rejects it and sends a sync to the subnet with the new sleep settings.
6. The subnets will now be in sync. You can remove the sleep support node.
7. You can also change the sleep cycle settings back to the previous settings.
If you only need to replace a few nodes, you can use this method:
1. Reset the out of sync node and set its sleep mode to Synchronous Cyclic Sleep mode (SM = 8).
2. Set up a short sleep cycle.
3. Place the node in range of a sleep support node or wake a sleeping node with the
Commissioning Pushbutton.
4. The out of sync node receives a sync from the node that is synchronized to the network. It then
syncs to the network sleep settings.
Diagnostics
The following diagnostics are useful in applications that manage a sleeping router network:
Query sleep cycle
Use the OS and OW commands to query the current operational sleep and wake times that a device
uses.
Sleep status
Use the SS command to query useful information regarding the sleep status of the device. Use this
command to query if the node is currently acting as a network sleep coordinator.
XBee®/XBee-PRO SX RF Module User Guide
49
Page 50
Sleep modesDiagnostics
Missed sync messages command
Use the MS command to query the number of cycles that elapsed since the device received a sync
message.
Sleep status API messages
When you use the SOcommand to enable this option, a device that is in API operating mode outputs
modem status frames immediately after it wakes up and prior to going to sleep.
XBee®/XBee-PRO SX RF Module User Guide
50
Page 51
Networking methods
The MAC and PHY layers52
64-bit addresses52
Make a unicast transmission53
Make a broadcast transmission53
Delivery methods53
XBee®/XBee-PRO SX RF Module User Guide
51
Page 52
Networking methodsThe MAC and PHY layers
The MAC and PHY layers
Most network protocols use the concept of layers to separate different components and functions
into independent modules that developers can assemble in different ways.
The PHY layer defines the physical and electrical characteristics of the network. It is responsible for
managing the hardware that modulates and demodulates the RF bits.
The MAC layer is responsible for sending and receiving RF frames. As part of each packet, there is a
MAC layer data header that has addressing information as well as packet options. This layer
implements packet acknowledgments (ACKs), packet tracking to eliminate duplicates, and so forth.
n When a device is transmitting, it cannot receive packets.
n When a device is not sleeping, it is either receiving or transmitting.
n There are no beacons or master/slave requirements in the design of the MAC/PHY.
The XBee/XBee-PRO SX RF Module uses a patented method for scanning and finding a transmission.
When a device transmits, it sends out a repeated preamble pattern, a MAC header, optionally a
network header, followed by packet data. A receiving device is able to scan all the channels to find a
transmission during the preamble, then once it has locked into that channel it attempts to receive the
whole packet.
The following table shows the AT commands related to the MAC/PHY layers.
AT
command Function
CMThe Channel Mask is a user-defined list of channels that the device operates on.
For additional information, see CM (Channel Mask).
HPChange HP (Preamble ID) to make it so a group of devices will not interfere with
another group of devices in the same vicinity. The advantage of changing this
parameter is that a receiving device will not lock into a transmission of a transmitting
device that does not have the same Preamble ID.
IDChange ID (Network ID) to further keep devices from interfering with each other. The
device matches this ID after it matches the preamble pattern and after it receives the
MAC header.
A unique network identifier distinguishes each network. For devices to communicate,
they must be configured with the same network identifier. The ID parameter allows
multiple networks to co-exist on the same physical channel.
PLSets the transmit (TX) power level. You can reduce the power level from the maximum
to reduce current consumption or for testing. This comes at the expense of reduced
radio range.
RR
MT
Specifies the number of times a sending device attempts to get an ACK from a
destination device when it sends a unicast packet.
Specifies the number of times that a device repeatedly transmits a broadcast packet.
This adds redundancy, which improves reliability.
64-bit addresses
We assign each device a unique IEEE 64-bit address at the factory. When a device is in API operating
mode and it sends a packet, this is the source address that the receiving device returns.
XBee®/XBee-PRO SX RF Module User Guide
52
Page 53
Networking methodsMake a unicast transmission
n Use the SH and SLcommands to read this address.
n The form of the address is: 0x0013A2XXXXXXXXXX.
n The first six digits are the Digi Organizationally Unique Identifier (OUI).
n The broadcast address is 0x000000000000FFFF.
Make a unicast transmission
To transmit to a specific device in Transparent operating mode:
n Set DH:DL to the SH:SL of the destination device.
To transmit to a specific device in API operating mode:
n In the 64-bit destination address of the API frame, enter the SH:SL address of the destination
device.
Make a broadcast transmission
To transmit to all devices in Transparent operating mode:
n Set DH:DL to 0x000000000000FFFF.
To transmit to all devices in API operating mode:
n Set the 64-bit destination address to 0x000000000000FFFF.
The scope of the broadcast changes based on the delivery method you choose.
Delivery methods
The TO (Transmit Options) command sets the default delivery method that the device uses when in
Transparent mode. In API mode, the TxOptions field of the API frame overrides the TO command, if
non-zero.
The XBee/XBee-PRO SX RF Module supports three delivery methods:
n Point-to-multipoint (TO = 0x40).
n Repeater (directed broadcast) (TO = 0x80).
n DigiMesh (TO = 0xC0).
Point to Point / Point to Multipoint (P2MP)
This delivery method does not use a network header, only the MAC header.
In P2MP, the sending devices always send all messages directly to the destination. Other nodes do not
repeat the packet. The sending device only delivers a P2MP unicast directly to the destination device,
which must be in range of the sending device.
The XBee/XBee-PRO SX RF Module uses patented technology that allows the destination device to
receive unicast transmissions directed to it, even when there is a large amount of traffic. This works
best if you keep broadcast transmissions to a minimum.
A sending node repeats a P2MP broadcast transmission MT+1 times, but the receiving nodes do not
repeat it, so like a unicast transmission, the receiving device must be in range.
All devices that receive a P2MP broadcast transmission output the data through the serial port.
XBee®/XBee-PRO SX RF Module User Guide
53
Page 54
Networking methodsDelivery methods
Repeater/directed broadcast
All of the routers in a network receive and repeat directed broadcast transmissions. Because it does
not use ACKs, the originating node sends the broadcast multiple times. By default a broadcast
transmission is sent four times—the extra transmissions become automatic retries without
acknowledgments. This results in all nodes repeating the transmission four times. Sending frequent
broadcast transmissions can quickly reduce the available network bandwidth, so use broadcast
transmissions sparingly.
MAC layer
The MAC layer is the building block that is used to build repeater capability. To implement Repeater
mode, we use a network layer header that comes after the MAC layer header in each packet. In this
network layer there is additional packet tracking to eliminate duplicate broadcasts.
In this delivery method, the device sends both unicast and broadcast packets out as broadcasts that
are always repeated. All repeated packets are sent to every device. The devices that receive the
broadcast send broadcast data out their serial port.
When a device sends a unicast, it specifies a destination address in the network header. Then, only the
device that has the matching destination address sends the unicast out its serial port. This is called a
directed broadcast.
Any node that has a CE parameter set to router rebroadcasts the packet if its BH (broadcast hops) or
broadcast radius values are not depleted. If a node has already seen a repeated broadcast, it ignores
the broadcast.
The NH parameter sets the maximum number of hops that a broadcast transmission is repeated. The
device always uses the NH value unless you specify a BH value that is smaller.
By default the CE parameter is set to route all broadcasts. As such, all nodes that receive a repeated
packet will repeat it. If you change the CE parameter, you can limit which nodes repeat packets, which
helps dense networks from becoming overly congested while packets are being repeated.
Transmission timeout calculations for Repeater/directed broadcast mode are the same as for
DigiMesh broadcast transmissions.
DigiMesh networking
A mesh network is a topology in which each node in the network is connected to other nodes around
it. Each node cooperates in transmitting information. Mesh networking provides these important
benefits:
n Routing. With this technique, the message is propagated along a path by hopping from node to
node until it reaches its final destination.
n Ad-hoc network creation. This is an automated process that creates an entire network of
nodes on the fly, without any human intervention.
n Self-healing. This process automatically figures out if one or more nodes on the network is
missing and reconfigures the network to repair any broken routes.
n Peer-to-peer architecture. No hierarchy and no parent-child relationships are needed.
n Quiet protocol. Routing overhead will be reduced by using a reactive protocol similar to AODV.
n Route discovery. Rather than maintaining a network map, routes will be discovered and
created only when needed.
n Selective acknowledgments. Only the destination node will reply to route requests.
XBee®/XBee-PRO SX RF Module User Guide
54
Page 55
Networking methodsDelivery methods
n Reliable delivery. Reliable delivery of data is accomplished by means of acknowledgments.
n Sleep modes. Low power sleep modes with synchronized wake are supported with variable
sleep and wake times.
With mesh networking, the distance between two nodes does not matter as long as there are enough
nodes in between to pass the message along. When one node wants to communicate with another,
the network automatically calculates the best path.
A mesh network is also reliable and offers redundancy. For example, If a node can no longer operate
because it has been removed from the network or because a barrier blocks its ability to communicate,
the rest of the nodes can still communicate with each other, either directly or through intermediate
nodes.
Note Mesh networks use more bandwidth for administration and therefore have less available for
payloads.
Unicast addressing
When devices transmit using DigiMesh unicast, the network uses retries and acknowledgments
(ACKs)for reliable data delivery. In a retry and acknowledgment scheme, for every data packet that a
device sends, the receiving device must send an acknowledgment back to the transmitting device to
let the sender know that the data packet arrived at the receiver. If the transmitting device does not
receive an acknowledgment then it re-sends the packet. It sends the packet a finite number of times
before the system times out.
The MR (Mesh Network Retries) parameter determines the number of mesh network retries. The
sender device transmits RF data packets up to MR + 1 times across the network route, and the
receiver transmits ACKs when it receives the packet. If the sender does not receive a network ACK
within the time it takes for a packet to traverse the network twice, the sender retransmits the
packet.
To send unicast messages while in Transparent operating mode, set the DH and DL on the
transmitting device to match the corresponding SH and SL parameter values on the receiving device.
Routing
A device within a mesh network determines reliable routes using a routing algorithm and table. The
routing algorithm uses a reactive method derived from Ad-hoc On-demand Distance Vector (AODV).
The firmware uses an associative routing table to map a destination node address with its next hop. A
device sends a message to the next hop address, and the message either reaches its destination or
forwards to an intermediate router that routes the message on to its destination.
If a message has a broadcast address, it is broadcast to all neighbors, then all routers that receive the
message rebroadcast the message MT+1 times. Eventually, the message reaches the entire network.
XBee®/XBee-PRO SX RF Module User Guide
55
Page 56
Networking methodsDelivery methods
Packet tracking prevents a node from resending a broadcast message more than MT+1 times. This
means that a node that relays a broadcast will only relay it after it receives it the first time and it will
discard repeated instances of the same packet.
Route discovery
Route discovery is a process that occurs when:
1. The source node does not have a route to the requested destination.
2. A route fails. This happens when the source node uses up its network retries without receiving
an ACK.
Route discovery begins by the source node broadcasting a route request (RREQ). We call any router
that receives the RREQ and is not the ultimate destination, an intermediate node.
Intermediate nodes may either drop or forward a RREQ, depending on whether the new RREQ has a
better route back to the source node. If so, the node saves, updates and broadcasts the RREQ.
When the ultimate destination receives the RREQ, it unicasts a route reply (RREP) back to the source
node along the path of the RREQ. It does this regardless of route quality and regardless of how many
times it has seen an RREQ before.
This allows the source node to receive multiple route replies. The source node selects the route with
the best round trip route quality, which it uses for the queued packet and for subsequent packets with
the same destination address.
Transmission timeouts
When a device in API operating mode receives a Transmit Request (0x10, 0x11) frame, or a device in
Transparent operating mode meets the packetization requirements (RO, RB), the time required to
route the data to its destination depends on:
n A number of configured parameters.
n Whether the transmission is a unicast or a broadcast.
n If the route to the destination address is known.
Timeouts or timing information is provided for the following transmission types:
n Broadcast transmission
n Unicast transmission on a known route
n Unicast transmission on an unknown route
n Unicast transmission on a broken route
Note The timeouts in this documentation are theoretical timeouts and are not precisely accurate.
Your application should pad the calculated maximum timeouts by a few hundred milliseconds. When
you use API operating mode, use Transmit Status frame - 0x8B as the primary method to determine if
a transmission is complete.
Unicast one hop time
unicastOneHopTime is a building block of many of the following calculations. It represents the amount
of time it takes to send a unicast transmission between two adjacent nodes. The amount of time
depends on the %H parameter.
Transmit a broadcast
All of the routers in a network must relay a broadcast transmission.
XBee®/XBee-PRO SX RF Module User Guide
56
Page 57
Networking methodsDelivery methods
The maximum delay occurs when the sender and receiver are on the opposite ends of the network.
The NH and %H parameters define the maximum broadcast delay as follows:
BroadcastTxTime = NH * NN * %8
Unless BH < NH, in which case the formula is:
BroadcastTxTime = BH * NN * %8
Transmit a unicast with a known route
When a device knows a route to a destination node, the transmission time is largely a function of the
number of hops and retries. The timeout associated with a unicast assumes that the maximum
number of hops is necessary, as specified by the NH command.
You can estimate the timeout in the following manner:
knownRouteUnicastTime=2*NH*MR*unicastOneHopTime
Transmit a unicast with an unknown route
If the transmitting device does not know the route to the destination, it begins by sending a route
discovery. If the route discovery is successful, then the transmitting device transmits data. You can
estimate the timeout associated with the entire operation as follows:
If the route to a destination node changes after route discovery completes, a node begins by
attempting to send the data along the previous route. After it fails, it initiates route discovery and,
when the route discovery finishes, transmits the data along the new route. You can estimate the
timeout associated with the entire operation as follows:
UART data flow59
SPI signals59
Slave mode characteristics60
Full duplex operation61
Low power operation61
Configuration considerations62
SPI and API mode62
SPI parameters62
Serial port selection62
UART flow control63
XBee®/XBee-PRO SX RF Module User Guide
58
Page 59
Serial communicationUART data flow
UART data flow
Devices that have a UART interface connect directly to the pins of the XBee/XBee-PRO SX RF Module
as shown in the following figure. The figure shows system data flow in a UART-interfaced
environment. Low-asserted signals have a horizontal line over the signal name.
Serial data
A device sends data to the XBee/XBee-PRO SX RF Module's UART through pin 4 (DIN) as an
asynchronous serial signal. When the device is not transmitting data, the signals should idle high.
For serial communication to occur, you must configure the UART of both devices (the microcontroller
and the XBee/XBee-PRO SX RF Module) with compatible settings for the baud rate, parity, start bits,
stop bits, and data bits.
Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high).
The following diagram illustrates the serial bit pattern of data passing through the device. The
diagram shows UART data packet 0x1F (decimal number 31) as transmitted through the device.
SPI signals
The XBee/XBee-PRO SX RF Module supports SPI communications in slave mode. Slave mode receives
the clock signal and data from the master and returns data to the master. The SPI port uses the
following signals on the device:
SignalPin numberApplicable AT command
SPI_MOSI (Master out, Slave in)
SPI_MISO (Master in, Slave out)
XBee®/XBee-PRO SX RF Module User Guide
17
16
P5
P6
59
Page 60
Serial communicationSlave mode characteristics
SignalPin numberApplicable AT command
SPI_SCLK (Serial clock)
SPI_SSEL (Slave select)
SPI_ATTN (Attention)
By default, the inputs have pull-up resistors enabled. Use the PR command to disable the pull-up
resistors. When the SPI pins are not connected but the pins are configured for SPI operation, then the
device requires the pull-ups for proper UART operation.
15
14
12
P7
P8
P9
Signal description
SPI_MOSI:When SPI_SSEL is asserted (low) and SPI_CLK is active, the device outputs the data on this
line at the SPI_CLK rate. When SPI_SSEL is de-asserted (high), you should tri-state this output such
that another slave device can drive the line.
SPI_MISO: The SPI master outputs data on this line at the SPI_CLK rate after it selects the desired
slave. When you configure the device for SPI operations, this pin is an input.
SPI_SCLK: The SPI master outputs a low signal on this line to select the desired slave. When you
configure the device for SPI operations, this pin is an input. Thissignal clocks data transfers on MOSI
and MISO.
SPI_SSEL:The SPI master outputs a clock on this pin, and the rate must not exceed the maximum
allowed, 6 Mb/s. When you configure the device for SPI operations, this pin is an input. Thissignal
enables serial communication with the slave.
SPI_ATTN: The device asserts this pin low when it has data to send to the SPI master. When you
configure this pin for SPI operations, it is an output (not tri-stated). This signal alerts the master that
the slave has data queued to send. The device asserts this pin as soon as data is available to send to
the SPI master and it remains asserted until the SPI master has clocked out all available data.
Slave mode characteristics
In slave mode, the following apply:
n SPI Clock rates up to 6 MHz (6 Mb/s) are possible.
n Data is MSB first.
n It uses Frame Format Mode 0. This means CPOL= 0 (idle clock is low) and CPHA = 0 (data is
sampled on the clock’s leading edge). The picture below diagrams Mode 0.
n The SPI port is setup for API mode and is equivalent to AP = 1.
The following picture shows the frame format for SPI communications.
XBee®/XBee-PRO SX RF Module User Guide
60
Page 61
Serial communicationFull duplex operation
Full duplex operation
When using SPI on the XBee/XBee-PRO SX RF Module the device uses API operation (AP = 1) without
escaped characters to packetize data. SPI is a full duplex protocol, even when data is only available in
one direction. This means that whenever a device receives data, it also transmits, and that data is
normally invalid. Likewise, whenever a device transmits data, invalid data is probably received. To
determine whether or not received data is invalid, the firmware places the data in API packets.
SPI allows for valid data from the slave to begin before, at the same time, or after valid data begins
from the master. When the master sends data to the slave and the slave has valid data to send in the
middle of receiving data from the master, a full duplex operation occurs, where data is valid in both
directions for a period of time. Not only must the master and the slave both be able to keep up with
the full duplex operation, but both sides must honor the protocol.
The following figure illustrates the SPI interface while valid data is being sent in both directions.
Low power operation
Sleep modes generally work the same on SPI as they do on UART. By default, Digi configures DIO8
(SLEEP_REQUEST) as a peripheral and during pin sleep it wakes the device and puts it to sleep. This
applies to both the UART and SPI serial interfaces.
If SLEEP_REQUEST is not configured as a peripheral and SPI_SSEL is configured as a peripheral, then
pin sleep is controlled by SPI_SSEL rather than by SLEEP_REQUEST. Asserting SPI_SSEL (pin 15) by
driving it low either wakes the device or keeps it awake. Negating SPI_SSEL by driving it high puts the
device to sleep.
Using SPI_SSEL to control sleep and to indicate that the SPI master has selected a particular slave
device has the advantage of requiring one less physical pin connection to implement pin sleep on SPI.
XBee®/XBee-PRO SX RF Module User Guide
61
Page 62
Serial communicationConfiguration considerations
It has the disadvantage of putting the device to sleep whenever the SPI master negates SPI_SSEL
(meaning time is lost waiting for the device to wake), even if that was not the intent.
If the user has full control of SPI_SSEL so that it can control pin sleep, whether or not data needs to be
transmitted, then sharing the pin may be a good option in order to make the SLEEP_REQUEST pin
available for another purpose.
If the device is one of multiple slaves on the SPI, then the device sleeps while the SPI master talks to
the other slave, but this is acceptable in most cases.
If you do not configure either pin as a peripheral, then the device stays awake, being unable to sleep in
SM1 mode.
Configuration considerations
The configuration considerations are:
n How do you select the serial port? For example, should you use the UART or the SPI port?
n If you use the SPI port, what data format should you use in order to avoid processing invalid
characters while transmitting?
n What SPI options do you need to configure?
SPI and API mode
The SPI only operates in API mode 1. The SPIdoes not support Transparent mode or API mode 2 (with
escaped characters). This means that the AP configuration only applies to the UART interface and is
ignored while using the SPI.
SPI parameters
Most host processors with SPI hardware allow you to set the bit order, clock phase and polarity. For
communication with all XBee/XBee-PRO SX RF Modules, the host processor must set these options as
follows:
n Bit order: send MSB first
n Clock phase (CPHA):sample data on first (leading) edge
n Clock polarity (CPOL): first (leading) edge rises
All XBee/XBee-PRO SX RF Modules use SPI mode 0 and MSB first. Mode 0 means that data is sampled
on the leading edge and that the leading edge rises. MSB first means that bit 7 is the first bit of a byte
sent over the interface.
Serial port selection
To enable the UART port, configure DIN and DOUT (P3 and P4 parameters) as peripherals. To enable
the SPI port, enable SPI_MISO, SPI_MOSI, SPI_SSEL , and SPI_CLK (P5 through P9) as peripherals. If
you enable both ports then output goes to the UART until the first input on SPI.
When both the UART and SPI ports are enabled on power-up, all serial data goes out the UART. As
soon as input occurs on either port, that port is selected as the active port and no input or output is
allowed on the other port until the next device reset.
If you change the configuration so that only one port is configured, then that port is the only one
enabled or used. If the parameters are written with only one port enabled, then the port that is not
enabled is not used even temporarily after the next reset.
XBee®/XBee-PRO SX RF Module User Guide
62
Page 63
Serial communicationUART flow control
If both ports are disabled on reset, the device uses the UART in spite of the wrong configuration so
that at least one serial port is operational.
Serial receive buffer
When serial data enters the device through the DIN pin (or the MOSI pin), it stores the data in the
serial receive buffer until the device can process it. Under certain conditions, the device may not be
able to process data in the serial receive buffer immediately. If large amounts of serial data are sent
to the device such that the serial receive buffer would overflow, then it discards new data. If the UART
is in use, you can avoid this by the host side honoring CTS flow control.
If the SPI is the serial port, no hardware flow control is available. It is your responsibility to ensure
that the receive buffer does not overflow. One reliable strategy is to wait for a TX_STATUS response
after each frame sent to ensure that the device has had time to process it.
Serial transmit buffer
When the device receives RF data, it moves the data into the serial transmit buffer and sends it out
the UART or SPI port. If the serial transmit buffer becomes full and the system buffers are also full,
then it drops the entire RF data packet. Whenever the device receives data faster than it can process
and transmit the data out the serial port, there is a potential of dropping data.
UART flow control
You can use the RTS and CTS pins to provide RTS and/or CTS flow control. CTS flow control provides an
indication to the host to stop sending serial data to the device. RTS flow control allows the host to
signal the device to not send data in the serial transmit buffer out the UART. To enable RTS/CTS flow
control, use the D6 and D7 commands.
Note Serial port flow control is not possible when using the SPI port.
CTS flow control
If you enable CTS flow control (D7 command), when the serial receive buffer is 17 bytes away from
being full, the device de-asserts CTS (sets it high) to signal to the host device to stop sending serial
data. The device reasserts CTS after the serial receive buffer has 34 bytes of space. See FT (Flow
Control Threshold) for the buffer size.
RTS flow control
If you send the D6 command to enable RTS flow control, the device does not send data in the serial
transmit buffer out the DOUT pin as long as RTS is de-asserted (set high). Do not de-assert RTS for
long periods of time or the serial transmit buffer will fill. If the device receives an RF data packet and
the serial transmit buffer does not have enough space for all of the data bytes, it discards the entire
RF data packet.
The UART Data Present Indicator is a useful feature when using RTS flow control. When enabled, the
DIO19 line asserts (low asserted) when UART data is queued to be transmitted from the device. For
more information, see P9 (DIO19/SPI_ATTN).
If the device sends data out the UART when RTS is de-asserted (set high) the device could send up to
five characters out the UART port after RTS is de-asserted.
XBee®/XBee-PRO SX RF Module User Guide
63
Page 64
AT commands
Special commands65
MAC/PHY commands66
Diagnostic commands - MAC statistics and timeouts70
Network commands72
Addressing commands74
Diagnostic - addressing commands77
Addressing discovery/configuration commands78
Security commands80
Serial interfacing commands81
I/O settings commands84
I/O sampling commands96
I/O line passing commands98
Sleep commands103
Diagnostic - sleep status/timing commands106
Command mode options107
Firmware version/information commands108
XBee®/XBee-PRO SX RF Module User Guide
64
Page 65
AT commandsSpecial commands
Special commands
The following commands are special commands.
AC (Apply Changes)
Immediately applies new settings without exiting Command mode.
Parameter range
N/A
Default
N/A
FR (Software Reset)
Resets the device. The device responds immediately with an OK and performs a reset 100 ms later.
If you issue FR while the device is in Command Mode, the reset effectively exits Command mode.
Parameter range
N/A
Default
N/A
RE (Restore Defaults)
Restore device parameters to factory defaults.
Parameter range
N/A
Default
N/A
WR (Write)
Writes parameter values to non-volatile memory so that parameter modifications persist through
subsequent resets.
Note Once you issue a WR command, do not send any additional characters to the device until after
you receive the OK response.
Parameter range
N/A
Default
N/A
XBee®/XBee-PRO SX RF Module User Guide
65
Page 66
AT commandsMAC/PHY commands
MAC/PHY commands
The following AT commands are MAC/PHY commands.
AF (Available Frequencies)
You can query this read-only command to return a bitfield of the frequencies that are available in the
device’s region of operation. This command returns a bitfield. Each bit corresponds to a physical
channel.
Channels for these data rates are spaced 250 kHz apart.
United States/Canada0x1F FFFF FFFF FFFF FFFF FFFF FFFF902 to 928 MHz
Australia
New Zealand
Brazil
0x01FF FFFF FFFF if BR is 0/1
0x00FF FFFF if BR is 2
0x1FF FFFF FFFF if BR is 0/1
0x7FF if BR is 2
0x1F FFFF FFFF FFFF FFFF if BR is 0/1
0x07 FFFF FFFF if BR is 2
915 to 928 MHz
915 to 928 MHz
917 to 928 MHz
917 to 928 MHz
902 to 907.5MHz
915 to 928 MHz
CM (Channel Mask)
CM allows you to selectively enable or disable channels used for RF communication. This is useful to
avoid using frequencies that experience unacceptable levels of RF interference, or to operate two
networks of radios on separate frequencies.
When CM is queried, it returns the operating channel mask based on what value BR is set to. When BR
is set to 2, a fixed channel mask is used (see the defaults below). A user-defined CM value is only used
when BR is set to 0 or 1.
This command is a bitfield. Each bit in the bitfield corresponds to a frequency as defined in the AF
(Available Frequencies) command. When you set a bit in CM and the corresponding bit in AF is 1, then
the device can choose that channel as an active channel for communication.
Note For Australia and New Zealand, CM is read-only.
A minimum of MF channels must be made available for the device to communicate on. You can use the
MF command to query the minimum number of channels required for operation. If a CM setting would
result in less than MF active channels being enabled, then the device returns an error. If there are
more active channels enabled than required by MF, then the device uses the first MF frequencies;
higher active frequencies may be unused in favor of lower ones.
All devices in a network must use an identical set of active channels in order to communicate.
Separate networks that are in physical range of each other should either be configured to use
XBee®/XBee-PRO SX RF Module User Guide
66
Page 67
AT commandsMAC/PHY commands
separate channels or to use different HP (Preamble ID) and/or ID (Network IDs) to avoid receiving
data from the other network.
You may find the ED (Energy Detect) command useful when choosing what channels to enable or
disable.
The default CM mask spaces the channels across the entire 900 MHz band.
CountryDefault CM when BR is 0 or 1Default CM when BR is 2
United
States/Canada
Australia0x00 0000 0000 0000 01FF FFFF
New Zealand0x00 0000 0000 0000 01FF FFFF
Brazil0x00 0000 001F FFFF FFFF FFF8
0x05 5555 5555 5555 5555 5555
5555
FFFF
FFFF
0000
0x00 0000 0000 0003 FFFF FFFF
FFFF
0x00 0000 0000 0000 0000 00FF
FFFF
0x00 0000 0000 0000 0000 0000
07FF
0x00 0000 0000 0000 0007 FFFF
FFFF
MF (Minimum Frequencies)
This read-only command returns the number of hopping channels that the device uses to comply with
its region of operation. You can use this information to determine which available frequencies you
want to enable with the CM command. MF may vary depending on the BR setting.
Parameter range
read-only
Default
United States/Canada: 0x32 (50 channels)
The Default value of MF for the Australia/New Zealand firmware varies depending on the value you
set BR to:
BR valueAustralia defaultNew Zealand default
00x31 (49 channels)0x29 (41 channels)
10x31 (49 channels)0x29 (41 channels)
20x18 (24 channels)0x0B (11 channels)
XBee®/XBee-PRO SX RF Module User Guide
67
Page 68
AT commandsMAC/PHY commands
HP (Preamble ID)
The preamble ID for which the device communicates. Only devices with matching preamble IDs can
communicate with each other. Different preamble IDs minimize interference between multiple sets of
devices operating in the same vicinity. When receiving a packet, the device checks this before the
network ID, as it is encoded in the preamble, and the network ID is encoded in the MAC header.
Parameter range
0 - 9
Default
0
ID (Network ID)
Set or read the user network identifier.
Devices must have the same network identifier to communicate with each other.
Devices can only communicate with other devices that have the same network identifier and channel
configured.
When receiving a packet, the device check this after the preamble ID. If you are using Original
equipment manufacturer (OEM) network IDs, 0xFFFF uses the factory value.
Parameter range
0 - 0x7FFF
Default
0x7FFF
MT(Broadcast Multi-Transmits)
Set or read the number of additional MAC-level broadcast transmissions. All broadcast packets are
transmitted MT+1 times to ensure they are received.
Parameter range
0 - 5
Default
3
BR (RF Data Rate)
Sets and reads the device's RF data rate (the rate at which the device transmits and receives RF data
over-the-air).
DigiMesh and synchronized sleep are not supported when BR = 0. All devices on the network must
have the same BR value set in order to communicate. BR directly affects the range of the device. The
higher the RF data rate, the lower the receive sensitivity.
Parameter range
0 - 2
XBee®/XBee-PRO SX RF Module User Guide
68
Page 69
AT commandsMAC/PHY commands
ParameterRF data rateReceiver sensitivity
010 kb/s-113 dBm
1110 kb/s-106 dBm
2250 kb/s-103 dBm
Default
2
PL (TX Power Level)
Sets or displays the power level at which the device transmits conducted power.
For XBee, PL = 4, PM = 1 is tested at the time of manufacturing. Other power levels are approximate.
On channel 26, transmitter power will not exceed -4 dBm.
The XBee-PRO SX requires the power supply to be above 3.3 V to ensure 30 dBm output power. The
following table shows the typical values over supply voltage. If using a USB interface board with an
XBee-PRO SX module, you must supply external DC power.
Power supplyOutput power @ PL = 3
3.3 to 3.6 V30 dBm typical
3.0 V29 dBm typical
2.6 V27 dBm typical
Note The device generates heat during RF transmission. There is an additional ground pad on the
underside of the module that is used for heat dissipation. For more details, see PCB design and
manufacturing.
Parameter range
0 - 2
SettingXBee Tx power levelXBee-PRO Tx Power level
00 dBm21.5 dBm
110 dBm27 dBm
213 dBm30 dBm
New Zealand specific:
SettingLow/middle data rateHigh data rate
00 dBm0 dBm
110 dBm7.5 dBm
213 dBm7.5 dBm
XBee®/XBee-PRO SX RF Module User Guide
69
Page 70
AT commandsDiagnostic commands - MAC statistics and timeouts
Default
2
RR (Unicast Mac Retries)
Set or read the maximum number of MAC level packet delivery attempts for unicasts. If RR is nonzero, the sent unicast packets request an acknowledgment from the recipient. Unicast packets can
be retransmitted up to RR times if the transmitting device does not receive a successful
acknowledgment.
Parameter range
0 - 0xF
Default
0xA (10 retries)
Diagnostic commands - MAC statistics and timeouts
The following AT commands are MAC diagnostic commands and timeouts. Diagnostic commands are
typically volatile and will not persist across a power cycle.
BC (Bytes Transmitted)
You can reset the counter to any 32-bit value by appending a hexadecimal parameter to the
command.
Parameter range
0 - 0xFFFFFFFF
Default
N/A
N/A (0 after reset)
DB (Last Packet RSSI)
Reports the RSSI in -dBm of the last received RF data packet. DB returns a hexadecimal value for the dBm measurement.
For example, if DB returns 0x60, then the RSSI of the last packet received was -96 dBm.
The RSSImeasurement is accurate within ±2 dB from approximately -50 dBm down to sensitivity.
DB only indicates the signal strength of the last hop. It does not provide an accurate quality
measurement for a multihop link.
If the XBee/XBee-PRO SX RF Module has been reset and has not yet received a packet, DB reports 0.
This value is volatile (the value does not persist in the device's memory after a power-up sequence).
Parameter range
0x28 - 0x6E (-40 dBm to -110 dBm) [read-only]
Default
0
XBee®/XBee-PRO SX RF Module User Guide
70
Page 71
AT commandsDiagnostic commands - MAC statistics and timeouts
ER (Receive Count Error)
This count increments when a device receives a packet that contains integrity errors of some sort.
When the number reaches 0xFFFF, the firmware does not count further events.
To reset the counter to any 16-bit value, append a hexadecimal parameter to the command. This
value is volatile (the value does not persist in the device's memory after a power-up sequence).
Occasionally random noise can cause this value to increment.
The ER parameter is not reset by pin, serial port or cyclic sleep modes.
Default
N/A
GD (Good Packets Received)
This count increments when a device receives a good frame with a valid MAC header on the RF
interface. Received MAC ACK packets do not increment this counter. Once the number reaches
0xFFFF, it does not count further events.
To reset the counter to any 16-bit unsigned value, append a hexadecimal parameter to the command.
This value is volatile (the value does not persist in the device's memory after a power-up sequence).
Parameter range
0 - 0xFFFF
N/A
EA (MAC ACK Failure Count)
This count increments whenever a MAC ACK timeout occurs on a MAC-level unicast. When the number
reaches 0xFFFF, the firmware does not count further events.
To reset the counter to any 16-bit unsigned value, append a hexadecimal parameter to the command.
This value is volatile (the value does not persist in the device's memory after a power-up sequence).
Parameter range
0 - 0xFFFF
N/A
TR (Transmission Failure Count)
This value is volatile (the value does not persist in the device's memory after a power-up sequence).
Parameter range
0 - 0xFFFF
Default
N/A
UA (Unicasts Attempted Count)
The number of unicast transmissions expecting an acknowledgment (when RR > 0).
This value is volatile (the value does not persist in the device's memory after a power-up sequence).
XBee®/XBee-PRO SX RF Module User Guide
71
Page 72
AT commandsNetwork commands
Parameter range
0 - 0xFFFF
Default
N/A
%H (MAC Unicast One Hop Time)
The MAC unicast one hop time timeout in milliseconds. If you change the MAC parameters it can
change this value.
Parameter range
[read-only]
Default
N/A
%8 (MAC Broadcast One Hop Time)
The MAC broadcast one hop time timeout in milliseconds. If you change MAC parameters, it can
change this value.
Parameter range
[read-only]
Default
N/A
Network commands
The following commands are network commands.
CE (Routing / Messaging Mode)
The routing and messaging mode of the device.
A routing device repeats broadcasts. Indirect Messaging Coordinators do not transmit point-to-
multipoint unicasts until an end device requests them. Setting a device as a poller causes it to
regularly send polls to its Indirect Messaging Coordinator. Nodes can also be configured to route, or
not route, multi-hop packets.
Sets or displays the behavior (End Device versus Coordinator) of the device.
Sets or displays whether the device is a coordinator.
Parameter range
0 - 6
ParameterDescriptionRoutes packets
0Standard routerYes
XBee®/XBee-PRO SX RF Module User Guide
72
Page 73
AT commandsNetwork commands
ParameterDescriptionRoutes packets
1Indirect message coordinatorYes
2Non-routing deviceNo
3Non-routing coordinatorNo
4Indirect message pollerYes
5N/AN/A
6Non-routing pollerNo
Default
0
BH (Broadcast Hops)
The maximum transmission hops for broadcast data transmissions. This will not affect Point-toMultipoint transmissions (TO = 40).
If you set BH greater than NH, the device uses the value of NH.
Parameter range
0 - 0x20
Default
0
NH (Network Hops)
The maximum number of hops expected to be seen in a network route. This value does not limit the
number of hops allowed, but it is used to calculate timeouts waiting for network acknowledgments.
Parameter range
1 - 0x20 (1 - 32 hops)
Default
7
MR (Mesh Unicast Retries)
Set or read the maximum number of network packet delivery attempts. If MR is non-zero, the packets
a device sends request a network acknowledgment, and can be resent up to MR+1 times if the device
does not receive an acknowledgment.
Changing this value dramatically changes how long a route request takes.
We recommend that you set this value to 1.
Parameter range
0 - 7 mesh unicast retries
XBee®/XBee-PRO SX RF Module User Guide
73
Page 74
AT commandsAddressing commands
Default
1
NN (Network Delay Slots)
Set or read the maximum random number of network delay slots before rebroadcasting a network
packet.
Parameter range
1 - 0x5 network delay slots
Default
3
Addressing commands
The following AT commands are addressing commands.
SH (Serial Number High)
Displays the upper 32 bits of the unique IEEE 64-bit extended address assigned to the XBee in the
factory.
The 64-bit source address is always enabled. This value is read-only and it never changes.
Parameter range
0 - 0xFFFFFFFF [read-only]
Default
Set in the factory
SL (Serial Number Low)
Displays the lower 32 bits of the unique IEEE 64-bit RF extended address assigned to the XBee in the
factory.
The 64-bit source address is always enabled. This value is read-only and it never changes.
Parameter range
0 - 0xFFFFFFFF [read-only]
Default
Set in the factory
DH (Destination Address High)
Set or read the upper 32 bits of the 64-bit destination address. When you combine DH with DL, it
defines the destination address that the device uses for transmissions in Transparent mode.
The destination address is also used for I/O sampling in both Transparent and API modes.
To transmit using a 16-bit address, set DH to 0 and DL less than 0xFFFF.
0x000000000000FFFF is the broadcast address.
XBee®/XBee-PRO SX RF Module User Guide
74
Page 75
AT commandsAddressing commands
Parameter range
0 - 0xFFFFFFFF
Default
0
DL command
Set or display the upper 32 bits of the 64-bit destination address. When you combine DH with DL, it
defines the destination address that the device uses for transmissions in Transparent mode.
The destination address is also used for I/O sampling in both Transparent and API modes.
0x000000000000FFFF is the broadcast address.
Parameter range
0 - 0xFFFFFFFF
Default
0xFFFF
TO (Transmit Options)
The bitfield that configures the transmit options for Transparent mode.
The device's transmit options. The device uses these options for all transparent transmissions. API
transmissions can override this using the TxOptions field in the API frame.
DigiMesh is not supported if BR is set to 0, transmitted packets will be sent as point-to-
point/multipoint in this case.
Parameter range
0 - 0xFF
ParameterDescription
0x40Point to point/multipoint
0x80Repeater/Directed broadcast
0xC0
ParameterDescription
0x40Point to point/multipoint
0x80Repeater/Directed broadcast
0xC0
n Bits 6 and 7 cannot be set to DigiMesh on the 10k build.
n Bits 1, 2, and 3 cannot be set on the 10k build.
DigiMesh
Point to point/multipoint (if BR = 0)
DigiMesh
Point to point/multipoint (if BR = 0)
XBee®/XBee-PRO SX RF Module User Guide
75
Page 76
AT commandsAddressing commands
When you set BR to 0 the TO option has the DigiMesh and Repeater mode disabled automatically.
Default
0xC0
NI (Node Identifier)
Stores the node identifier string for a device, which is a user-defined name or description of the
device. This can be up to 20 ASCII characters.
n XCTU prevents you from exceeding the string limit of 20 characters for this command. If you
are using another software application to send the string, you can enter longer strings, but the
software on the device returns an error.
Parameter range
A string of case-sensitive ASCII printable characters from 0 to 20 bytes in length. The string cannot
start with the space character. A carriage return or a comma automatically ends the command.
Default
0x20 (an ASCII space character)
NT (Network Discovery Back-off)
Sets or displays the network discovery back-off parameter for a device. This sets the maximum value
for the random delay that the device uses to send network discovery responses.
Parameter range
0x20 - 0x2EE0 (x 100 ms)
Default
0x82 (13 seconds)
NO (Network Discovery Options)
Set or read the network discovery options value for the ND (Network Discovery) command on a
particular device. The options bit field value changes the behavior of the ND command and what
optional values the local device returns when it receives an ND command or API Node Identification
Indicator (0x95)frame.
Use NOto suppress or include a self-response to ND (Node Discover) commands. When NO bit 1 = 1, a
device performing a Node Discover includes a response entry for itself.
Parameter range
0x0 - 0x7 (bit field)
XBee®/XBee-PRO SX RF Module User Guide
76
Page 77
AT commandsDiagnostic - addressing commands
Bit field
Option Description
0x01
0x02
0x04
Default
Append the DD (Digi Device Identifier) value to ND responses or API node identification
frames.
Local device sends ND response frame out the serial interface when ND is issued.
Append the RSSI of the last hop to ND, FN, and responses or API node identification
frames.
0x0
CI (Cluster ID)
The application layer cluster ID value. The device uses this value as the cluster ID for all data
transmissions.
If you set this value to 0x12 (loopback Cluster ID), the destination node echoes any transmitted
packet back to the source device.
Supported Cluster IDs
0x11: Transparent data (default)
0x12: Loopback
0x14: Test Link Request
0x94: Test Link Result
0x23: Memory Access (GPM)
Parameter range
0 - 0xFFFF
Default
0x11 (Transparent data cluster ID)
Diagnostic - addressing commands
The following AT command is a Diagnostic - addressing command.
N? (Network Discovery Timeout)
The maximum response time, in milliseconds, for ND (Network Discovery) responses and DN (Discover
Node) responses. The timeout is based on the NT (Network Discovery Back-off Time) and the network
propagation time.
Parameter range
[read-only]
Default
N/A
XBee®/XBee-PRO SX RF Module User Guide
77
Page 78
AT commandsAddressing discovery/configuration commands
Addressing discovery/configuration commands
AG (Aggregator Support)
The AG command sends a broadcast through the network that has the following effects on nodes that
receive the broadcast:
n The receiving node establishes a DigiMesh route back to the originating node, if there is space
in the routing table.
n The DH and DL of the receiving node update to the address of the originating node if the AG
parameter matches the current DH/DL of the receiving node.
n API-enabled devices with updated DH and DL send an Aggregate Addressing Update frame
(0x8E) out the serial port.
Note The AG command is only available on products that support DigiMesh.
Parameter range
Any 64-bit address
Default
N/A
DN (Discover Node)
Resolves an NI (Node identifier) string to a physical address (case sensitive).
The following events occur after DN discovers the destination node:
When DN is sent in Command mode:
1. The device sets DL and DH to the extended (64-bit) address of the device with the matching NI
string.
2. The receiving device returns OK (or ERROR).
3. The device exits Command mode to allow for immediate communication. If an ERROR is
received, then Command mode does not exit.
When DN is sent as a local AT Command API frame (0x08):
1. The receiving device returns 0xFFFE followed by its 64-bit extended addresses in a Remote
Command Response frame - 0x97.
2. If there is no response from a module within (NT * 100) milliseconds or you do not specify a
parameter (by leaving it blank), the receiving device returns an ERROR message.
Parameter range
20-byte ASCII string
Default
N/A
XBee®/XBee-PRO SX RF Module User Guide
78
Page 79
AT commandsAddressing discovery/configuration commands
ND (Network Discover)
Discovers and reports all of the devices it finds on a network. The command reports the following
information after a jittered time delay.
PARENT_NETWORK ADDRESS<CR> (2 Bytes) (always 0xFFFE)
PARENT_NETWORK ADDRESS (2 Bytes) <CR>
DEVICE_TYPE<CR> (1 Byte: 0 = Coordinator, 1 = Router, 2 = End Device)
STATUS<CR> (1 Byte: Reserved)
PROFILE_ID<CR> (2 Bytes)
MANUFACTURER_ID<CR> (2 Bytes)
DIGI DEVICE TYPE<CR> (4 Bytes. Optionally included based on NO settings.)
RSSI OF LAST HOP<CR> (1 Byte. Optionally included based on NO settings.)
<CR>
After (NT * 100) milliseconds, the command ends by returning a <CR>.
If you send ND through a local AT Command (0x08) API frame, each network node returns a separate
AT Command Response (0x88) or Remote Command Response (0x97) frame, respectively. The data
consists of the bytes listed above without the carriage return delimiters. The NI string ends in a 0x00
null character.
Broadcast an ND command to the network. If the command includes an optional node identifier string
parameter, only those devices with a matching NI string respond without a random offset delay. If the
command does not include a node identifier string parameter, all devices respond with a random
offset delay.
The NT setting determines the range of the random offset delay. The NO setting sets options for the
Node Discovery.
For more information about options that affect the behavior of the ND command Refer to the
description of the NO command for options which affect the behavior of the ND command.
WARNING! If the NT setting is small relative to the number of devices on the network,
responses may be lost due to channel congestion. Regardless of the NT setting, because
the random offset only mitigates transmission collisions, getting responses from all
devices in the network is not guaranteed.
Parameter range
N/A
Default
[read-only]
N/A
ASCII space character (0x20)
FN (Find Neighbors)
Discovers and reports all devices found within immediate (1 hop) RF range. FN reports the following
information for each device it discovers:
DIGI DEVICE TYPE<CR> (4 Bytes. Optionally included based on NO settings.)
RSSI OF LAST HOP<CR> (1 Byte. Optionally included based on NO settings.)
<CR>
If you send the FN command in Command mode, after (NT*100) ms + overhead time, the command
ends by returning a carriage return, represented by <CR>.
If you send the FN command through a local AT Command (0x08) or remote AT command (0x17) API
frame, each response returns as a separate AT Command Response (0x88) or Remote Command
Response (0x97) frame, respectively. The data consists of the bytes in the previous list without the
carriage return delimiters. The NI string ends in a 0x00 null character.
Parameter range
N/A
Default
N/A
Security commands
The following AT commands are security commands.
EE (Encryption Enable)
Enable or disable 256-bit Advanced Encryption Standard (AES) encryption.
Set this command parameter the same on all devices in a network.
Parameter range
0 - 1
ParameterDescription
0Disabled
1Enabled
Default
0
KY (AES Encryption Key)
Sets the 256-bit network security key value that the device uses for encryption and decryption.
This command is write-only. If you attempt to read KY, the device returns an OK status.
Set this command parameter the same on all devices in a network.
XBee®/XBee-PRO SX RF Module User Guide
80
Page 81
AT commandsSerial interfacing commands
Parameter range
256-bit value (64 Hexadecimal digits)
Default
N/A
0
Serial interfacing commands
The following AT commands are serial interfacing commands.
BD (Interface Data Rate)
Sets and reads the serial interface data rate (baud rate) between the device and the host. The baud
rate is the rate that the host sends serial data to the device.
When you make an update to the interface data rate, the change does not take effect until the host
issues the CN command and the device returns the OK response.
The BD parameter does not affect the RF data rate. If you set the interface data rate higher than the
RF data rate, you may need to implement a flow control configuration.
The range between standard and non-standard baud rates (0x9 - 0x4B0) is invalid. The range between
0x2580 and 0x4AFF is also invalid.
Non-standard interface data rates
The firmware interprets any value within 0x4B0 - 0x2580 and 0x4B00 - 0x1C9468 as an actual baud
rate. When the host sends a value above 0x4B0, the firmware stores the closest interface data rate
represented by the number in the BD register. For example, to set a rate of 19200 b/s, send the
following command line: ATBD4B00.
Note When using XCTU, you can only set and read non-standard interface data rates using the XCTU
Serial Console tool. You cannot access non-standard rates through the configuration section of XCTU.
When you send the BD command with a non-standard interface data rate, the UART adjusts to
accommodate the interface rate you request. In most cases, the clock resolution causes the stored
BD parameter to vary from the sent parameter. Sending ATBD without an associated parameter value
returns the value actually stored in the device’s BD register.
The following table provides the parameters sent versus the parameters stored.
BD parameter sent (HEX)Interface data rate (b/s)BD parameter stored (HEX)
012000
419,2004
7115,2007
1C200115,2001B207
Parameter ranges
0 - 8 (standard rates)
0x4B0 - 0x1C9468 (non-standard rates; 0x2581 to 0x4AFF not supported)
XBee®/XBee-PRO SX RF Module User Guide
81
Page 82
AT commandsSerial interfacing commands
ParameterConfiguration (b/s)
01200
12400
24800
39600
419200
538400
657600
7115200
8230400
9460800
10921600
Default
3
NB (Parity)
Set or read the serial parity settings for UART communications.
Parameter range
0x00 - 0x02
ParameterDescription
0x00No parity
0x01Even parity
0x02Odd parity
Default
0x00
SB (Stop Bits)
Sets or displays the number of stop bits in the data packet.
Parameter range
0x00 - 0x01
XBee®/XBee-PRO SX RF Module User Guide
82
Page 83
AT commandsSerial interfacing commands
ParameterConfiguration
0x00One stop bit
0x01Two stop bits
Default
0x00
RO (Packetization Timeout)
Set or read the number of character times of inter-character silence required before transmission
begins when operating in Transparent mode.
Set RO to 0 to transmit characters as they arrive instead of buffering them into one RF packet.
Parameter range
0 - 0xFF (x character times)
Default
3
FT (Flow Control Threshold)
Set or display the flow control threshold.
De-assert CTS when FT bytes are in the UART receive buffer. Re-assert CTS when less than FT-16
bytes are in the UART receive buffer.
Parameter range
0x11 - 0x16F bytes
Default
0x13F
API Enable
Set or read the API mode setting. The device can format the RF packets it receives into API frames
and send them out the serial port.
When you enable API, you must format the serial data as API frames because Transparent operating
mode is disabled.
Enables API Mode. The device ignores this command when using SPI. API mode 1 is always used.
Parameter range
0 - 2
Parameter Description
0
XBee®/XBee-PRO SX RF Module User Guide
Transparent mode, API mode is off. All UART input and output is raw data and the
device uses the RO parameter to delineate packets.
83
Page 84
AT commandsI/O settings commands
Parameter Description
1API Mode Without Escapes. The device packetizes all UART input and output data in API
format, without escape sequences.
2API Mode With Escapes. The device is in API mode and inserts escaped sequences to
allow for control characters. The device passes XON (0x11), XOFF (0x13), Escape
(0x7D), and start delimiter 0x7E as data.
ParameterDescription
0API disabled (operate in Transparent mode)
1API enabled
2API enabled (with escaped control characters)
Default
0
AO (API Options)
The API data frame output format for RF packets received.
Use AO to enable different API output frames.
Parameter range
0 - 2
ParameterDescription
0API Rx Indicator - 0x90, this is for standard data frames.
1API Explicit Rx Indicator - 0x91, this is for Explicit Addressing data frames.
2XTend DigiMesh API Rx Indicator - 0x80
Default
0
I/O settings commands
The following AT commands are I/O settings commands.
D0 (DIO0/AD0)
Sets or displays the DIO0/AD0 configuration (pin 33).
Parameter range
0 - 5
XBee®/XBee-PRO SX RF Module User Guide
84
Page 85
AT commandsI/O settings commands
ParameterDescription
0Disabled
0Unmonitored digital input
1Commissioning Pushbutton
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
1
D1 (DIO1/AD1)
Sets or displays the DIO1/AD1 configuration (pin 32).
Parameter range
0, 2 - 5
ParameterDescription
0Disabled
1N/A
2ADC
3Digital input
4Digital output, low
5Digital output, high
6PTI_EN
Default
0
D2 (DIO2/AD2)
Sets or displays the DIO2/AD2 configuration (pin 31).
Parameter range
0, 2 - 5
XBee®/XBee-PRO SX RF Module User Guide
85
Page 86
AT commandsI/O settings commands
ParameterDescription
0Disabled
1N/A
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
D3 (DIO3/AD3)
Sets or displays the DIO3/AD3 configuration (pin 30).
Parameter range
0, 2 - 5
ParameterDescription
0Disabled
0Unmonitored digital input
1N/A
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
D4 (DIO4)
Sets or displays the DIO4 configuration (pin 24).
Parameter range
0, 2 - 5
ParameterDescription
0Disabled
XBee®/XBee-PRO SX RF Module User Guide
86
Page 87
AT commandsI/O settings commands
ParameterDescription
0Unmonitored digital input
1N/A
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
D5 (DIO5/ASSOCIATED_INDICATOR)
Sets or displays the DIO5/ASSOCIATED_INDICATOR configuration (pin 28).
Parameter range
0, 1, 3 - 5
ParameterDescription
0Disabled
1
2N/A
3Digital input
4Digital output, default low
5Digital output, default high
Default
1
Associate LED indicator - blinks when associated
D6 (DIO6/RTS)
Sets or displays the DIO6/RTS configuration (pin 29).
Parameter range
0, 1, 3 - 5
ParameterDescription
0Disabled
1
XBee®/XBee-PRO SX RF Module User Guide
RTS flow control
87
Page 88
AT commandsI/O settings commands
ParameterDescription
2N/A
3Digital input
4Digital output, low
5Digital output, high
Default
0
D7 (DIO7/CTS)
Sets or displays the DIO7/CTS configuration (pin 25).
Parameter range
0, 1, 3 - 7
ParameterDescription
0Disabled
1
2N/A
3Digital input
4Digital output, low
5Digital output, high
6RS-485 Tx enable, low Tx (0 V on transmit, high when idle)
7RS-485 Tx enable high, high Tx (high on transmit, 0 V when idle)
Default
0x1
CTSflow control
D8 (DIO8/SLEEP_REQUEST)
Sets or displays the DIO8/DTR/SLP_RQ configuration (pin 10).
This line is also used with Pin Sleep, but pin sleep ignores the D8 configuration. It is always used to
control pin sleep, regardless of configuration of D8.
Parameter range
0, 1, 3 - 5
XBee®/XBee-PRO SX RF Module User Guide
88
Page 89
AT commandsI/O settings commands
Parameter Description
0Disabled
1N/A
2N/A
3Digital input
4Digital output, low
5Digital output, high
Default
1
D9 (DIO9/ON_SLEEP)
Sets or displays the DIO9/ON_SLEEP configuration (pin 26).
Parameter range
0, 1, 3 - 5
ParameterDescription
0Disabled
1
2N/A
3Digital input
4Digital output, low
5Digital output, high
Default
1
ON/SLEEP output
P0 (DIO10/RSSI/PWM0 Configuration)
Sets or displays the PWM0/RSSI/DIO10 configuration (pin 7).
When configured as a PWM output, you can use M0 to set the PWM duty cycle.
Parameter range
0 - 5
ParameterDescription
0Disabled
XBee®/XBee-PRO SX RF Module User Guide
89
Page 90
AT commandsI/O settings commands
ParameterDescription
1RSSI PWM0 output
2PWM0 output
3Digital input
4Digital output, low
5Digital output, high
Default
1
P1 (DIO11/PWM1 Configuration)
Sets or displays the DIO11/PWM1 configuration (pin 8).
When configured as a PWM1 output, you can use M1 to set the PWM duty cycle.
Parameter range
0 - 5
0 - 6
ParameterDescription
0Disabled
132.768 kHz clock output
2PWM1 output
3Digital input
4Digital output, low
5Digital output, high
Default
0
P2 (DIO12 Configuration)
Sets or displays the DIO12 configuration (pin 5).
Parameter range
0, 3 - 6
ParameterDescription
0Disabled
XBee®/XBee-PRO SX RF Module User Guide
90
Page 91
AT commandsI/O settings commands
ParameterDescription
1N/A
2N/A
3Digital input
4Digital output, low
5Digital output, high
6RX LED
Default
0
P3 (DIO13/DOUT)
Sets or displays the DIO13/DOUT configuration (pin 3).
Parameter range
0, 1
ParameterDescription
0Disabled
1UART DOUT enabled
Default
1
P4 (DIO14/DIN)
Sets or displays the DIO14/DIN/CONFIG configuration (pin 4).
Sets or displays the DIO14/DIN configuration (pin 4).
The device enters Command mode at 9600 baud if you enable DIN and either of the following
conditions is met:
n A six second serial break is received during normal operation.
n DIN is driven low upon power up or reset.
The device sends an OK response out of the UART when it enters Command mode in this way.
Parameter range
0 - 1
ParameterDescription
0Disabled
1
XBee®/XBee-PRO SX RF Module User Guide
UART DIN/CONFIG enabled
91
Page 92
AT commandsI/O settings commands
Default
1
P5 (DIO15/SPI_MISO)
Sets or displays the DIO15/SPI_MISO configuration (pin 17).
Parameter range
0, 1
0, 1, 4, 5
ParameterDescription
0Disabled
1SPI_MISO
2N/A
3N/A
4Digital output low
5Digital output high
Default
1
P6 (SPI_MOSI Configuration)
Sets or displays the DIO16/SPI_MOSI configuration (pin 16).
Parameter range
1, 2, 4, 5
ParameterDescription
0Disabled
1SPI_MOSI
2N/A
3N/A
4Digital output low
5Digital output, high
Default
1
XBee®/XBee-PRO SX RF Module User Guide
92
Page 93
AT commandsI/O settings commands
P7 (DIO17/SPI_SSEL )
Sets or displays the DIO17/SPI_SSEL configuration (pin 15).
Parameter range
1, 2
1, 2, 4, 5
ParameterDescription
0Disabled
1SPI_SSEL
2N/A
3N/A
4Digital output low
5Digital output, high
Default
1
P8 (DIO18/SPI_SCLK)
Sets or displays the DIO18/SPI_SCLK configuration (pin 14).
Parameter range
1, 2, 4, 5
ParameterDescription
0Disabled
1SPI_SCLK
2N/A
3N/A
4Digital output low
5Digital output high
Default
1
P9 (DIO19/SPI_ATTN)
Sets or displays the DIO19/SPI_ATTN configuration (pin 12).
XBee®/XBee-PRO SX RF Module User Guide
93
Page 94
AT commandsI/O settings commands
Parameter range
1, 2, 4 - 6
ParameterDescription
0Disabled
1
2N/A
3N/A
4Digital output low
5Digital output high
6UART data present indicator
Default
1
SPI_ATTN
PD (Pull Direction)
The resistor pull direction bit field (1 = pull-up, 0 = pull-down) for corresponding I/O lines that are set
by the PR command.
Parameter range
0x0 - 0xFFFFF
Default
0xFFFFF
PR (Pull-up/Down Resistor Enable)
PR and PD only affect lines that are configured as digital inputs or disabled.
The following table defines the bit-field map for PR and PD commands.
The bit field that configures internal pull-up/down resistors status for I/O lines. If you set a PR bit to 1,
it enables the internal pull-up/down resistor, 0 specifies no internal pull-up/down. The following table
defines the bit-field map for both the PR and PD commands.
BitI/O lineModule pin
0DIO4/AD424
1DIO3/AD330
2DIO2/AD231
3DIO1/AD132
4DIO0/AD033
XBee®/XBee-PRO SX RF Module User Guide
94
Page 95
AT commandsI/O settings commands
BitI/O lineModule pin
DIO6/RTS
5
6DIO8/SLEEP_REQUEST9
DIO14/DIN/CONFIG
7
8DIO5/ASSOCIATE28
DIO9/On/SLEEP
9
10DIO125
11DIO10/RSSI/PWM07
12DIO11/PWM18
DIO7/CTS
13
14DIO13/DOUT3
15DIO15/SPI_MISO17
16DIO16/SPI_MOSI16
29
4
26
25
17DIO17/SPI_
18DIO18/SPI_SCLK14
DIO19/SPI_ATTN
19
Parameter range
0 - 0xFFFFF (bit field)
Default
0xFFFFF
SSEL
15
12
M0 (PWM0 Duty Cycle)
The duty cycle of the PWM0 line (pin 7).
Use the P0 command to configure the line as a PWM output.
Parameter range
0 - 0x3FF
Default
0
M1 (PWM1 Duty Cycle)
The duty cycle of the PWM1 line (pin 8).
Use the P1 command to configure the line as a PWM output.
Parameter range
0 - 0x3FF
XBee®/XBee-PRO SX RF Module User Guide
95
Page 96
AT commandsI/O sampling commands
Default
0
LT (Associate LED Blink Time)
Set or read the Associate LED blink time. If you use the D5 command to enable the Associate LED
functionality (DIO5/Associate pin), this value determines the on and off blink times for the LED when
the device has joined the network.
If LT = 0, the device uses the default blink rate: 500 ms for a sleep coordinator, 250ms for all other
nodes.
Parameter range
0x14 - 0xFF (x 10 ms)
Default
0
RP(RSSI PWM Timer)
The PWM timer expiration in 0.1 seconds. RP sets the duration of pulse width modulation (PWM) signal
output on the RSSI pin. The signal duty cycle updates with each received packet and shuts off when
the timer expires.
When RP = 0xFF, the output is always on.
Parameter range
0 - 0xFF (x 100 ms)
Default
0x28 (four seconds)
I/O sampling commands
The following AT commands configure I/O sampling parameters.
AV (Analog Voltage Reference)
The analog voltage reference used for A/D sampling.
Parameter range
0, 1
ParameterDescription
01.25 V reference
12.5 V reference
Default
1
XBee®/XBee-PRO SX RF Module User Guide
96
Page 97
AT commandsI/O sampling commands
IC (DIO Change Detect)
Set or read the digital I/O pins to monitor for changes in the I/O state.
IC works with the individual pin configuration commands (D0 - D9, P0 - P2). If you enable a pin as a
digital I/O, use the IC command to force an immediate I/O sample transmission when the DIO state
changes. If sleep is enabled, the edge transition must occur during a wake period to trigger a change
detect.
IC is a bitmask you can use to enable or disable edge detection on individual digital I/O lines. Only
DIO0 through DIO12 can be sampled using a Change Detect.
Set unused bits to 0.
BitI/O lineModule pin
0DIO033
1DIO132
2DIO231
3DIO330
4DIO424
5DIO528
6DIO629
7DIO725
8DIO810
9DIO926
10DIO107
11DIO118
12DIO125
Parameter range
0 - 0xFFFF (bit field)
Default
0
IF (Sleep Sample Rate)
Set or read the number of sleep cycles that must elapse between periodic I/O samples. This allows
the firmware to take I/O samples only during some wake cycles. During those cycles, the firmware
takes I/O samples at the rate specified by IR.
Parameter range
1 - 0xFF
XBee®/XBee-PRO SX RF Module User Guide
97
Page 98
AT commandsI/O line passing commands
Default
1
IR (Sample Rate)
Set or read the I/O sample rate to enable periodic sampling. When set, this parameter causes the
device to sample all enabled DIO and ADC at a specified interval.
If you set the I/O sample rate to greater than 0, the device samples and transmits all enabled digital
I/O and analog inputs every IR milliseconds. I/O Samples transmit to the address specified by DT.
To enable periodic sampling, set IR to a non-zero value, and enable the analog or digital I/O
functionality of at least one device pin (see D0 (DIO0/AD0)-D9 (DIO9/ON_SLEEP), P0
WARNING! If you set IR to 1 or 2, the device will not keep up and many samples will be
lost.
Parameter range
0 - 0xFFFF (x 1 ms)
Default
0
TP (Board Temperature)
The current module temperature in degrees Celsius in 8-bit two’s compliment format. For example
0x1A = 26 °C, and 0xF6 = -10 °C.
Parameter range
This is a read-only parameter
Default
N/A
%V (Voltage Supply Monitoring)
Displays the supply voltage of the device in mV units.
Parameter range
This is a read-only parameter
Default
N/A
I/O line passing commands
The following AT commands are I/O line passing commands.
I/O Line Passing allows the digital and analog inputs of a remote device to affect the corresponding
outputs of the local device.
XBee®/XBee-PRO SX RF Module User Guide
98
Page 99
AT commandsI/O line passing commands
You can perform Digital Line Passing on any of the Digital I/O lines. Digital Inputs directly map to
Digital Outputs of each digital pin.
Analog Line Passing can be performed only on the first two ADC lines:
n ADC0 corresponds with PWM0
n ADC1 corresponds with PWM1
IU (I/O Output Enable)
Enable or disable I/O data received to be sent out UART/SPI using an API frame when AP = 1 or 2 and
when I/O line passing is enabled.
Parameter range
0 - 1
ParameterDescription
0Disabled
1Enabled
Default
1
IA (I/O Input Address)
The source address of the device to which outputs are bound. Setting all bytes to 0xFF disables I/O
line passing. Setting IA to 0xFFFF allows any I/O packet addressed to this device (including
broadcasts) to change the outputs.
Parameter range
0 - 0xFFFF FFFF FFFF FFFF
Default
0xFFFFFFFFFFFFFFFF (I/O line passing disabled)
T0 (D0 Timeout)
Specifies how long pin D0 holds a given value before it reverts to configured value. If set to 0, there is
no timeout.
Parameter range
0 - 0x1770 (x 100 ms)
Default
0
T1 (D1 Output Timeout)
Specifies how long pin D1 holds a given value before it reverts to configured value. If set to 0, there is
no timeout.
XBee®/XBee-PRO SX RF Module User Guide
99
Page 100
AT commandsI/O line passing commands
Parameter range
0 - 0x1770 (x 100 ms)
Default
0
T2 (D2 Output Timeout)
Specifies how long pin D2 holds a given value before it reverts to configured value. If set to 0, there is
no timeout.
Parameter range
0 - 0x1770 (x 100 ms)
Default
0
T3 (D3 Output Timeout)
Specifies how long pin D3 holds a given value before it reverts to configured value. If set to 0, there is
no timeout.
Parameter range
0 - 0x1770 (x 100 ms)
Default
0
T4 (D4 Output Timeout)
Specifies how long pin D4 holds a given value before it reverts to configured value. If set to 0, there is
no timeout.
Parameter range
0 - 0x1770 (x 100 ms)
Default
0
T5 (D5 Output Timeout)
Specifies how long pin D5 holds a given value before it reverts to configured value. If set to 0, there is
no timeout.
Parameter range
0 - 0x1770 (x 100 ms)
Default
0
XBee®/XBee-PRO SX RF Module User Guide
100
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.