XBee®/XBee-PRO SX Guide Datasheet by Digi

View All Related Products | Download PDF Datasheet
DIGI.’
XBee®/XBee-PRO SX
Radio Frequency (RF) Module
User Guide
Revision history—90001477
Revision Date Description
F May 2018 Added note on range estimation. Changed ICto ISED.
G June 2018 Added the KZ command. Added status code 4 to the 0x97 frame. Added
the 0x18 frame.
H November
2018
Updated the AF command frequency ranges.
J January
2019
Updated the Brazilian certifications.
K May 2019 Added FCC publication 996369 related information.
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.
© 2018 Digi International Inc. All rights reserved.
Disclaimers
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
Customer support
Gather support information: Before contacting Digi technical support for help, gather the following
information:
Product name and model
Product serial number (s)
Firmware version
Operating system/browser (if applicable)
Logs (from time of reported issue)
Trace (if possible)
XBee®/XBee-PRO SX RF Module User Guide 2
Description of issue
Steps to reproduce
Contact Digi technical support: Digi offers multiple technical support plans and service packages.
Contact us at +1 952.912.3444 or visit us at www.digi.com/support.
Feedback
To provide feedback on this document, email your comments to
techcomm@digi.com
Include the document title and part number (XBee®/XBee-PRO SX RF Module User Guide, 90001477 C)
in the subject line of your email.
XBee®/XBee-PRO SX RF Module User Guide 3
Contents
XBee®/XBee-PRO SX RF Module User Guide
Applicable firmware and hardware 13
Technical specifications
Regulatory conformity summary 15
Power requirements 15
Networking specifications 15
Performance specifications 16
General specifications 17
GPIO specifications 18
Hardware
Mechanical drawings 20
Pin signals 21
Pin connection recommendations 23
Getting started with the XBee/XBee-PRO SX RF Module Development
Kit
XBee SX Development Board 25
Connect XBee-PRO SX development boards to a PC 26
Connect the XBIB-U-SS development board to a PC 27
Configure the device using XCTU 27
Configure the devices for a range test 27
Perform a range test 28
Mesh network demonstration 29
Software libraries 31
XBee Network Assistant 31
XBee Multi Programmer 32
Modes
Transparent and API operating modes 34
Transparent operating mode 34
API operating mode 34
Comparing Transparent and API modes 34
XBee®/XBee-PRO SX RF Module User Guide 4
XBee®/XBee-PRO SX RF Module User Guide 5
Modes of operation 35
Receive mode 35
Transmit mode 36
Sleep mode 36
Command mode 36
Sleep modes
About sleep modes 40
Asynchronous modes 40
Synchronous modes 40
Normal mode 40
Asynchronous pin sleep mode 41
Asynchronous cyclic sleep mode 41
Asynchronous cyclic sleep with pin wake up mode 41
Synchronous sleep support mode 41
Synchronous cyclic sleep mode 42
The sleep timer 42
Indirect messaging and polling 42
Indirect messaging 42
Polling 43
Sleeping routers 43
Sleep coordinator sleep modes in the DigiMesh network 43
Synchronization messages 44
Become a sleep coordinator 46
Preferred sleep coordinator option 46
Resolution criteria and selection option 46
Commissioning Pushbutton option 47
Auto-early wake-up sleep option 48
Select sleep parameters 48
Start a sleeping synchronous network 48
Add a new node to an existing network 49
Change sleep parameters 50
Rejoin nodes that lose sync 50
Diagnostics 51
Query sleep cycle 51
Sleep status 51
Missed sync messages command 51
Sleep status API messages 51
Networking methods
The MAC and PHY layers 53
64-bit addresses 53
Make a unicast transmission 54
Make a broadcast transmission 54
Delivery methods 54
Point to Point / Point to Multipoint (P2MP) 54
Repeater/directed broadcast 55
DigiMesh networking 55
XBee®/XBee-PRO SX RF Module User Guide 6
Serial communication
UART data flow 60
Serial data 60
SPI signals 60
Signal description 61
Slave mode characteristics 61
Full duplex operation 62
Low power operation 62
Configuration considerations 63
SPI and API mode 63
SPI parameters 63
Serial port selection 63
Serial receive buffer 64
Serial transmit buffer 64
UART flow control 64
CTS flow control 64
RTS flow control 64
AT commands
Special commands 67
AC (Apply Changes) 67
FR (Software Reset) 67
RE (Restore Defaults) 67
WR (Write) 67
MAC/PHY commands 68
AF (Available Frequencies) 68
CM (Channel Mask) 68
MF (Minimum Frequencies) 69
HP (Preamble ID) 70
ID (Network ID) 70
MT(Broadcast Multi-Transmits) 70
BR (RF Data Rate) 70
PL (TX Power Level) 71
RR (Unicast Mac Retries) 72
Diagnostic commands - MAC statistics and timeouts 72
BC (Bytes Transmitted) 72
DB (Last Packet RSSI) 72
ER (Receive Count Error) 73
GD (Good Packets Received) 73
EA (MAC ACK Failure Count) 73
TR (Transmission Failure Count) 73
UA (Unicasts Attempted Count) 74
%H (MAC Unicast One Hop Time) 74
%8 (MAC Broadcast One Hop Time) 74
Network commands 74
CE (Routing / Messaging Mode) 74
BH (Broadcast Hops) 75
NH (Network Hops) 75
MR (Mesh Unicast Retries) 75
NN (Network Delay Slots) 76
Addressing commands 76
SH (Serial Number High) 76
XBee®/XBee-PRO SX RF Module User Guide 7
SL (Serial Number Low) 76
DH (Destination Address High) 77
DL (Destination Address Low) 77
TO (Transmit Options) 77
NI (Node Identifier) 78
NT (Network Discovery Back-off) 78
NO (Network Discovery Options) 78
CI (Cluster ID) 79
Diagnostic - addressing commands 79
N? (Network Discovery Timeout) 79
Addressing discovery/configuration commands 80
AG (Aggregator Support) 80
DN (Discover Node) 80
ND (Network Discover) 81
FN (Find Neighbors) 81
Security commands 82
EE (Encryption Enable) 82
KY (AES Encryption Key) 82
KZ (Remote AT Command Password) 83
Serial interfacing commands 83
BD (Interface Data Rate) 83
NB (Parity) 85
SB (Stop Bits) 85
RO (Packetization Timeout) 85
FT (Flow Control Threshold) 86
AP (API Enable) 86
AO (API Options) 86
I/O settings commands 87
D0 (DIO0/AD0) 87
D1 (DIO1/AD1) 87
D2 (DIO2/AD2) 88
D3 (DIO3/AD3) 88
D4 (DIO4) 89
D5 (DIO5/ASSOCIATED_INDICATOR) 89
D6 (DIO6/RTS) 90
D7 (DIO7/CTS) 90
D8 (DIO8/SLEEP_REQUEST) 91
D9 (DIO9/ON_SLEEP) 91
P0 (DIO10/RSSI/PWM0 Configuration) 92
P1 (DIO11/PWM1 Configuration) 92
P2 (DIO12 Configuration) 93
P3 (DIO13/DOUT) 93
P4 (DIO14/DIN) 94
P5 (DIO15/SPI_MISO) 94
P6 (SPI_MOSI) 95
P7 (DIO17/SPI_SSEL ) 95
P8 (DIO18/SPI_SCLK) 95
P9 (DIO19/SPI_ATTN) 96
PD (Pull Direction) 96
PR (Pull-up/Down Resistor Enable) 97
M0 (PWM0 Duty Cycle) 98
M1 (PWM1 Duty Cycle) 98
LT (Associated LED Blink Time) 98
RP (RSSI PWM Timer) 98
I/O sampling commands 99
XBee®/XBee-PRO SX RF Module User Guide 8
AV (Analog Voltage Reference) 99
IC (DIO Change Detect) 99
IF (Sleep Sample Rate) 100
IR (Sample Rate) 100
IS (Immediate Sample) 101
TP (Board Temperature) 101
%V (Voltage Supply Monitoring) 101
I/O line passing commands 101
IU (I/O Output Enable) 102
IA (I/O Input Address) 102
T0 (D0 Timeout) 102
T1 (D1 Output Timeout) 103
T2 (D2 Output Timeout) 103
T3 (D3 Output Timeout) 103
T4 (D4 Output Timeout) 103
T5 (D5 Output Timeout) 103
T6 (D6 Output Timeout) 104
T7 (D7 Output Timeout) 104
T8 (D8 Timeout) 104
T9 (D9 Timeout) 104
Q0 (P0 Timeout) 105
Q1 (P1 Timeout) 105
Q2 (P2 Timeout) 105
Q3 (P3 Timeout) 105
Q4 (P4 Timeout) 105
PT (PWM Output Timeout) 106
Sleep commands 106
SM (Sleep Mode) 106
SO (Sleep Options) 107
SN (Number of Cycles Between ON_SLEEP) 108
SP (Sleep Time) 108
ST (Wake Time) 108
WH (Wake Host Delay) 109
Diagnostic - sleep status/timing commands 109
SS (Sleep Status) 109
OS (Operating Sleep Time) 110
OW (Operating Wake Time) 110
MS (Missed Sync Messages) 110
SQ (Missed Sleep Sync Count) 110
Command mode options 111
CC (Command Sequence Character) 111
CT (Command Mode Timeout) 111
GT (Guard Times) 111
Firmware version/information commands 111
VR (Firmware Version) 111
HV (Hardware Version) 112
HS (Hardware Series) 112
DD (Device Type Identifier) 112
NP (Maximum Packet Payload Bytes) 112
CK (Configuration CRC) 113
Operate in API mode
API mode overview 115
Use the AP command to set the operation mode 115
XBee®/XBee-PRO SX RF Module User Guide 9
API frame format 115
API operation (AP parameter = 1) 115
API operation with escaped characters (AP parameter = 2) 116
Length field 117
Frame data 117
Calculate and verify checksums 117
API frames
API frame exchanges 120
AT commands 120
Transmit and Receive RF data 120
Remote AT commands 121
Device Registration 121
Code to support future API frames 122
Legacy TX Request frame - 0x00 123
AT Command frame - 0x08 125
AT Command - Queue Parameter Value frame - 0x09 127
Transmit Request frame - 0x10 129
Explicit Addressing Command frame - 0x11 132
Remote AT Command Request frame - 0x17 135
Secure Remote AT Command Request frame - 0x18 137
Modem Status frame - 0x8A 140
Transmit Status frame - 0x8B 141
Route Information Packet frame - 0x8D 143
Aggregate Addressing Update frame - 0x8E 146
Legacy RX Indicator frame - 0x80 148
AT Command Response frame - 0x88 150
Legacy TX Status frame - 0x89 152
RX Indicator frame - 0x90 153
Explicit Rx Indicator frame - 0x91 155
Node Identification Indicator frame - 0x95 157
Remote Command Response frame - 0x97 160
Work with networked devices
Network commissioning and diagnostics 163
Local configuration 163
Remote configuration 163
Send a remote command 163
Apply changes on remote devices 163
Remote command response 163
Secure remote AT commands 164
How secure remote AT commands protect the network 164
Password protection 164
Password recovery 164
Secure remote command control 165
Security protections 165
Secure a network 165
Software downgrades 166
Establish and maintain network links 166
Build aggregate routes 166
DigiMesh routing examples 167
Replace nodes 167
XBee®/XBee-PRO SX RF Module User Guide 10
Test links in a network - loopback cluster 168
Test links between adjacent devices 168
Example 169
RSSI indicators 170
Discover all the devices on a network 170
Trace route option 171
NACK messages 172
The Commissioning Pushbutton 172
Associate LED 174
Monitor I/O lines
Pin configurations 175
Queried sampling 176
Periodic I/O sampling 177
Detect digital I/O changes 177
I/O line passing
Configuration example 179
General Purpose Flash Memory
General Purpose Flash Memory 183
Access General Purpose Flash Memory 183
General Purpose Flash Memory commands 184
PLATFORM_INFO_REQUEST (0x00) 184
PLATFORM_INFO (0x80) 184
ERASE (0x01) 185
ERASE_RESPONSE (0x81) 185
WRITE (0x02) and ERASE_THEN_WRITE (0x03) 186
WRITE _RESPONSE (0x82) and ERASE_THEN_WRITE_RESPONSE (0x83) 187
READ (0x04) 187
READ_RESPONSE (0x84) 188
FIRMWARE_VERIFY (0x05) and FIRMWARE_VERIFY_AND_INSTALL(0x06) 188
FIRMWARE_VERIFY_RESPONSE (0x85) 189
FIRMWARE_VERIFY _AND_INSTALL_RESPONSE (0x86) 189
Update the firmware over-the-air
Over-the-air firmware updates 192
Distribute the new application 192
Example 192
Verify the new application 193
Install the application 193
Important considerations 193
Regulatory information
FCC (United States) 195
OEM labeling requirements 195
FCC notices 195
XBee®/XBee-PRO SX RF Module User Guide 11
RF exposure statement 197
FCC antenna certifications 197
XBee-PRO SX antenna options (30 dBm maximum RF power) 198
XBee SX antenna options (13 dBm maximum RF power) 203
FCC publication 996369 related information 208
ISED (Innovation, Science and Economic Development Canada) 210
Labeling requirements 210
Transmitters for detachable antennas 210
Detachable antennas 210
ACMA (Australia) 211
Power requirements 211
RSM (New Zealand) 211
Power requirements 211
Brazil (Anatel) 212
ANATEL Brazil for XBee-PRO SX radio products (XBPSX) 212
SX ANATEL Brazil for XK9X-DMS-1 XBee SX RF Module Dev Kit (XK9X-DMS-1) 213
ANATEL Brazil for XBee SX radio products (XBSX) 214
PCB design and manufacturing
Recommended footprint and keepout 216
Design notes 218
Host board design 218
Improve antenna performance 219
RF pad version 219
Recommended solder reflow cycle 220
Flux and cleaning 221
Rework 221
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 modules
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 hardware 13
XBee®/XBee-PRO SX RF Module User Guide 12
XBee®/XBee-PRO SX RF Module User Guide Applicable firmware and hardware
XBee®/XBee-PRO SX RF Module User Guide 13
Applicable firmware and hardware
This manual supports the following firmware:
n0x900X USA and Canada, XBee/XBee-PRO SX
n0x920x Australia, XBee/XBee-PRO SX
n0x930X Brazil XBee/XBee-PRO SX
n0x960X New Zealand, XBee SX only
Note The New Zealand firmware only works with non-PRO hardware.
It supports the following hardware:
nXBee/XBee-PRO SX RF Module
Technical specifications
Regulatory conformity summary 15
Power requirements 15
Networking specifications 15
Performance specifications 16
General specifications 17
GPIO specifications 18
XBee®/XBee-PRO SX RF Module User Guide 14
Technical specifications Regulatory conformity summary
XBee®/XBee-PRO SX RF Module User Guide 15
Regulatory conformity summary
This table describes the agency approvals for the devices.
The Australia, New Zealand and Brazil certified devices are separate variants from the USA and
Canada approved device.
Country Approval
XBee-PRO SX XBee SX
United States FCC ID: MCQ-XBPSX FCC ID: MCQ-XBSX
Canada IC: 1846A-XBPSX IC: 1846A-XBSX
Australia RCM RCM
New Zealand R-NZ
Brazil ANATEL: 05774-16-01209 ANATEL: 05776-16-01209
Power requirements
The following table describes the power requirements for the XBee/XBee-PRO SX RF Module.
Specification Condition XBee SX value XBee-PRO SX value
Supply voltage range 2.4 to 3.6 VDC 2.6 to 3.6 VDC
Typical supply voltage 3.3 V
Receive current VCC = 3.3 V 40 mA 40 mA
Transmit current VCC = 3.3 V 55 mA @ 13 dBm 900 mA @ 30 dBm
VCC = 3.3 V 45 mA @ 10 dBm 640 mA @ 27 dBm
VCC = 3.3 V 35 mA @ 0 dBm 350 mA @ 21.5 dBm
Sleep current VCC 3.3 V, temperature = 25 °C 2.5 µA 2.5 µA
Networking specifications
The following table provides the networking specifications for the device.
Specification Value
Modulation Gaussian Frequency Shift Keying (GFSK)
Spreading
technology
Frequency Hopping Spread Spectrum (FHSS)
Supported network
topologies (software
selectable)
Peer-to-peer (master/slave relationship not required), point-to-point/point-
to-multipoint, mesh
Technical specifications Performance specifications
XBee®/XBee-PRO SX RF Module User Guide 16
Specification Value
Encryption 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.
Note Range figure estimates are based on free-air terrain with limited sources of interference. Actual
range will vary based on transmitting power, orientation of transmitter and receiver, height of
transmitting antenna, height of receiving antenna, weather conditions, interference sources in the
area, and terrain between receiver and transmitter, including indoor and outdoor structures such as
walls, trees, buildings, hills, and mountains.
Specification Condition XBee value
XBee-PRO
value
Frequency range ISM 902 to 928 MHz
RF data rate
(software selectable)
Low data rate 10 kb/s
Middle data rate 110 kb/s
High data rate 250 kb/s
Transmit power
(software selectable)
Up to 13 dBm Up to 30
dBm1
New Zealand
specific
Up to 13 dBm, at the high data rate
(BR 2) it is capped at 7.5 dBm
Maximum data
throughput
High data rate 120 kb/s
Channels 10 hopping sequences share 50 frequencies
Available channel
frequencies
Low/middle data
rate
1012
High data rate 50
Rural range line of
sight
Low data rate Up to 14.5 km (9 mi) Up to 105
km (65 mi)3
130 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).
2The device hops on 50 channels selected using the CM command, from 101 available frequencies. For more
details, see CM (Channel Mask).
3We estimate rural ranges based on a 14.5 km (9 mi) range test with dipole antennas.
Technical specifications General specifications
XBee®/XBee-PRO SX RF Module User Guide 17
Specification Condition XBee value
XBee-PRO
value
Urban range line of
sight
Low data rate Up to 2.5 km (1.5 mi) Up to 18 km
(11 mi)1
Receiver sensitivity Low data rate -113 dBm
Middle data rate -106 dBm
High data rate -103 dBm
Receiver IF selectivity Low data rate ± 250
kHz
40 dB
Low data rate ± 500
kHz
50 dB
Middle data rate ±
250 kHz
30 dB
Middle data rate ±
500 kHz
40 dB
High data rate ± 500
kHz
30 dB
High data rate ±
1000 kHz
45 dB
Receiver RF
selectivity
Below 900 MHz and
above 930 MHz
> 50 dB
UARTdata rate
(software selectable)
1200 - 921600 baud
SPI clock rate Up to 6 Mb/s
General specifications
The following table describes the general specifications for the devices.
Specification Value
Dimensions 3.38 x 2.21 x 0.32 cm (1.33 x 0.87 x 0.125 in)
Weight 3 g
Restriction of Hazardous Substances (RoHS) Compliant
Manufacturing ISO 9001:2008 registered standards
Host interface connector 37 castellated SMT pads
1Range 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.
Technical specifications GPIO specifications
XBee®/XBee-PRO SX RF Module User Guide 18
Specification Value
Antenna connector options U.FL or RF pad
Antenna impedance 50 Ωunbalanced
Maximum input RF level at antenna port 6 dBm
Operating temperature -40 °C to 85 °C
Digital I/O 13 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 specification Value
Voltage - supply 2.4 - 3.6 V
Low Schmitt switching threshold 0.3 * VCC
High Schmitt switching threshold 0.7 * VCC
Input current for logic 0 -0.1 μA
Input current for logic 1 0.1 μA
Input pull-up resistor value 40 kΩ
Input pull-down resistor value 40 kΩ
Output voltage for logic 0 0.05 * VCC
Output voltage for logic 1 0.95 * VCC
Output source/sink current 1 mA
Total output current (for GPIO pads) 20 mA
Hardware
Mechanical drawings 20
Pin signals 21
XBee®/XBee-PRO SX RF Module User Guide 19
0.65 PIN 1 (0.17 ) 0.87 TOP VIEW P|N37 0.040 [ ‘NOMINAL .125" ) +0005 . 0.005 IIHIHIII (“MAXIMUM .140“ ) l 'INCLU DES LABEL *001 ( 0,05 70.01 ) rIIHIIIIIHI SIDE VIEW
Hardware Mechanical drawings
XBee®/XBee-PRO SX RF Module User Guide 20
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.
0.9398 (0,4826) El [I [I Ground pad 3 Tspin38 ( 0.1397) (0.2463D ) 3.3782 . 0.05 0.1524 Bottom View DIN/DIO
Hardware Pin signals
XBee®/XBee-PRO SX RF Module User Guide 21
Pin signals
The following table describes the pin signals. Low-asserted signals are distinguished with a horizontal
line over the signal name.
Pin Name I/O
Default
state Function
1 GND - - Ground
2 VCC I - Power supply
3 DIO13/DOUT I/O Output GPIO / UART data out
4DIN/DIO14/
CONFIG
I/O Input GPIO / UART data in
Hardware Pin signals
XBee®/XBee-PRO SX RF Module User Guide 22
Pin Name I/O
Default
state Function
5 DIO12 I/O Disabled GPIO
6RESET 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. The minimum reset pulse time is 100 ns.
7 DIO10/RSSI/PWM0 I/O Output GPIO / RX Signal Strength Indicator
8 DIO11/PWM1 I/O Disabled GPIO / Pulse Width Modulator
9 [Reserved] - - Do not connect
10 DIO8/DTR /SLEEP_
RQ
I/O Input GPIO / Pin Sleep Control line (DTR on the development
board)
11 GND - - Ground
12 DO19/SPI_ATTN O Output GPO / Serial Peripheral Interface (SPI)Attention or UART
Data Present indicator
13 GND - - Ground
14 DO18/SPI_CLK I/O
1
Input GPO / SPI clock
15 DO17/SPI_SSEL I/O
2
Input GPO / SPI not select
16 DO16/SPI_MOSI I/O
3
Input GPO / SPI Data In
17 DO15/SPI_MISO O Output 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
22 GND - - Ground
23 [Reserved] - - Do not connect
24 DIO4 I/O Disabled GPIO
1Pins 14-16 are inputs in SPI mode only. In general purpose I/O pin mode you can only use them as digital
outputs.
2Pins 14-16 are inputs in SPI mode only. In general purpose I/O pin mode you can only use them as digital
outputs.
3Pins 14-16 are inputs in SPI mode only. In general purpose I/O pin mode you can only use them as digital
outputs.
Hardware Pin signals
XBee®/XBee-PRO SX RF Module User Guide 23
Pin Name I/O
Default
state Function
25 DIO7/CTS I/O Output GPIO / UART Clear to Send Flow Control
26 DIO9/ON/SLEEP I/O Output GPIO / Module Sleep Status Indicator
27 VREF - - Feature not supported on this device. Used on other XBee
devices for analog voltage reference.
28 DIO5/ASSOC I/O Output GPIO / Associate Indicator
29 DIO6/RTS I/O Disabled GPIO / UART Request to Send Flow Control
30 DIO3/AD3 I/O Disabled GPIO / Analog Input
31 DIO2/AD2 I/O Disabled GPIO / Analog Input
32 DIO1/AD1 I/O Disabled GPIO / Analog Input
33 DIO0/AD0 I/O Input GPIO / Analog Input / Commissioning Pushbutton
34 [Reserved] - - Do not connect
35 GND - - Ground
36 RF_PAD I/O - RF connection for RF pad variant
37 [Reserved] - - Do not connect
38 GND - - 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).
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:
nUSA XK9X-DMS-0
nAustralia XK9X-DMS-2
nBrazil XK9X-DMS-1
This section describes how to set up an XBee network and adjust the XBee/XBee-PRO SX RF Module
settings.
This section provides information on the Development Board for the XBee/XBee-PRO SX RF Module
and getting started instructions if you have an XBee/XBee-PRO SX RF Module Development Kit.
XBee SX Development Board 25
Connect XBee-PRO SX development boards to a PC 26
Connect the XBIB-U-SS development board to a PC 27
Configure the device using XCTU 27
Configure the devices for a range test 27
Perform a range test 28
Mesh network demonstration 29
Software libraries 31
XBee Network Assistant 31
XBee Multi Programmer 32
XBee®/XBee-PRO SX RF Module User Guide 24
nssl Laos LED: msmmn: m: margnn Draent m HHHLQWE wwzlm \mk No LED; \Humnated mdmma ether 5 .mk DMD ngnm AU 3 LED: Mummatm mdmma a mug lmk RPSMAwIIKdM Afiazh antenna M; :ublda tnmm m; mnnedmn 5 ma 0an WM: mm nmn RF and XEee Sizing m Mum; rmm Mm in (up Amm-kd» m. m. n.“ om Dcvelownent mm a 1- mm mm mmpana; to mns nnnwgn a; onthz XEee madu‘e Rbbrswfled labelsaresxlksneened mne lefl Dung may um pin m: mm”; From Mom in (up mm. mm mom Eomrmsxvoumg Mon wnen WM, buttm moon Ms XBee pm 33 mm m: mm plug 9m mvnc DCsuppl)‘ n5 reqmred m «nansnnnmng aumann or mgher Warning Donut azeed 1.: van Exnswe volrage WM damagemedewu andmuy Reselhuflon when pnm, buttw man nm on: xae: b, pullmg pm 6 low muse \mury n.) m (ouncd usa mm." Dunx (unnuibihu pm Cunntd .nnnnn usa (ubl: xamac mm mm: not (rwmkms ponumnz hut PC supporkd anon: dzvdnpmmk hm:
Getting started with the XBee/XBee-PRO SX RF Module Development Kit XBee SX Development Board
XBee®/XBee-PRO SX RF Module User Guide 25
XBee SX Development Board
The following figure shows the XBee SX development board with onboard XBee-PRO SXRF pad
module and the table that follows explains the callouts in the picture.
Number Item Description
1 RSSILEDs LEDs 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.
2 StatusLEDindicators From bottom to top: Associated, Data In, Data Out
3 DIO pin LED
indicators
From bottom to top: DIO4, DIO11, DIO12
4 DC barrel plug 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.
5 Do not connect Do not connect to these pins. This development board does not
support the device's self power feature.
Getting started with the XBee/XBee-PRO SX RF Module
Development Kit
Connect XBee-PRO SX development boards to
a PC
XBee®/XBee-PRO SX RF Module User Guide 26
Number Item Description
6 USB connector Connect a mini USB cable from this port to the host PC.
7 Reset button When pressed, the button switch resets the device by pulling pin 6
low.
8 Commissioning
button
When pressed, the button switch pulls the device's pin 33 low.
9 Development header 0.1 pitch header corresponds to pins 1 through 34 on the
XBee/XBee-PRO SX RF Module. Abbreviated labels are
silkscreened to the left of the header.
10 RPSMA connector Attach an antenna or RF cable to this jack. This connection is valid
only if the board has an RF pad XBee.
11 XBee/XBee-PRO SX
RF Modulefootprint
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.
Description Quantity Part number
XBee surface-mount (SMT) socket development
board
1 XBIB-U-SS
SX development board with onboard XBee-PRO
SXRF pad module
2USA - XBIB-XBP9XR-0
Australia - XBIB-XBP9XR-2
Brazil - XBIB-XBP9XR-1
Standard USB cable 1 N/A
Mini USB cable 2 N/A
12 VDC power supply 2 Australia and Brazil include packages
of AC adapters
RPSMA antenna 3 A09-HASM-675
U.FL to RPSMA adapter cable 1 JF1R6-CR3-4I
XBee SX U.FL module 1 USA - XB9X-DMUS-001
Australia - XB9X-DMUS-021
Brazil - XB9X-DMUS-011
Getting started with the XBee/XBee-PRO SX RF Module
Development Kit
Connect the XBIB-U-SS development board to
a PC
XBee®/XBee-PRO SX RF Module User Guide 27
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:
http://ftp1.digi.com/support/documentation/xbibuss_referenceguide.pdf.
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 SXRF 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 the connected XBee/XBee-
PRO SX RF Modules using the provided settings.
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.
For devices to communicate with each other, you configure them so they are in the same network.
You also set the local device to API mode to obtain all possible data of the remote device.
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.
3. Configure the following parameters:
ID: 2015
NI: LOCAL_DEVICE
AP: API Mode Without Escapes [1]
4. Click the Write radio settings button.
ion. '
Getting started with the XBee/XBee-PRO SX RF Module Development Kit Perform a range test
XBee®/XBee-PRO SX RF Module User Guide 28
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. Place REMOTE_DEVICE at the testing location and connect its power supply.
10. 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:
1. Open the Tools menu within XCTU and select the Range Test option.
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.
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).
Getting started with the XBee/XBee-PRO SX RF Module Development Kit Mesh network demonstration
XBee®/XBee-PRO SX RF Module User Guide 29
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.
Watch the range test status indicators: RSSI will decrease the further away you are, and if you
continue to move the setup further away, 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.
Parameter
XBee A
(XBee
SX)
XBee B
(XBee
PRO SX)
XBee C
(XBee
PRO
SX) Effect
NI SENDER RECEIVER BRIDGE Defines the node identifier, a human-friendly name for
the module.
CAUTION! The default NI value is a blank
space. Make sure to delete the space when
you change the value.
ID 2015 2015 2015 Defines the network that a device will attach to. This
must be the same for all devices in your network.
PL Lowest
[0]
Lowest
[0]
Lowest
[0]
Defines the transmitter output power level. Set it to
the lowest level to facilitate the execution of the
example.
DH 0 0 0 Defines the destination address (high part) to transmit
the data to.
DL FFFF FFFF FFFF Defines the destination address (low part) to transmit
the data to. You can use
the000000000000FFFFaddress to send a broadcast
message.
RP 5 5 5 Defines the time that the RSSI LED will be on when the
device receives a packet.
5 (hexadecimal) = 5 (decimal) x 100 ms = 500 ms.
To set up a DigiMesh network, you must first connect some XBee devices to a portable battery so you
can move around with them.
on Receiver
Getting started with the XBee/XBee-PRO SX RF Module Development Kit Mesh network demonstration
XBee®/XBee-PRO SX RF Module User Guide 30
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.
6. Move RECEIVER away from SENDER until the Data Out LED does not blink anymore, meaning it
has moved out of range.
Receiver
Getting started with the XBee/XBee-PRO SX RF Module Development Kit Software libraries
XBee®/XBee-PRO SX RF Module User Guide 31
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.
Software libraries
One way to communicate with the XBee/XBee-PRO SX RF Module is by using a software library. The
libraries available for use with the XBee/XBee-PRO SX RF Module include:
nXBee Java library
nXBee Python library
The XBee Java Library is a Java API. The package includes the XBee library, its source code and a
collection of samples that help you develop Java applications to communicate with your XBee devices.
The XBee Python Library is a Python API that dramatically reduces the time to market of XBee
projects developed in Python and facilitates the development of these types of applications, making it
an easy process.
XBee Network Assistant
The XBee Network Assistant is an application designed to inspect and manage RF networks created
by Digi XBee devices. Features include:
nJoin and inspect any nearby XBee network to get detailed information about all the nodes it
contains.
nUpdate the configuration of all the nodes of the network, specific groups, or single devices
based on configuration profiles.
nGeo-locate your network devices or place them in custom maps and get information about the
connections between them.
Getting started with the XBee/XBee-PRO SX RF Module Development Kit XBee Multi Programmer
XBee®/XBee-PRO SX RF Module User Guide 32
nExport the network you are inspecting and import it later to continue working or work offline.
nUse automatic application updates to keep you up to date with the latest version of the tool.
See the XBee Network Assistant User Guide for more information.
To install the XBee Network Assistant:
1. Navigate to digi.com/xbeenetworkassistant.
2. Click General Diagnostics, Utilities and MIBs.
3. Click the XBee Network Assistant - Windows x86 link.
4. When the file finishes downloading, run the executable file and follow the steps in the XBee
Network Assistant Setup Wizard.
XBee Multi Programmer
The XBee Multi Programmer is a combination of hardware and software that enables partners and
distributors to program multiple Digi Radio frequency (RF) devices simultaneously. It provides a fast
and easy way to prepare devices for distribution or large networks deployment.
The XBee Multi Programmer board is an enclosed hardware component that allows you to program up
to six RF modules thanks to its six external XBee sockets. The XBee Multi Programmer application
communicates with the boards and allows you to set up and execute programming sessions. Some of
the features include:
nEach XBee Multi Programmer board allows you to program up to six devices simultaneously.
Connect more boards to increase the programming concurrency.
nDifferent board variants cover all the XBee form factors to program almost any Digi RF device.
Download the XBee Multi Programmer application from:digi.com/support/productdetail?pid=5641
See the XBee Multi Programmer User Guide for more information.
Modes
Transparent and API operating modes 34
Modes of operation 35
XBee®/XBee-PRO SX RF Module User Guide 33
Modes Transparent and API operating modes
XBee®/XBee-PRO SX RF Module User Guide 34
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:
Feature Description
Transparent mode features
Simple interface All received serial data is transmitted unless the device is in Command
mode
Easy to support It 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.
Modes Modes of operation
XBee®/XBee-PRO SX RF Module User Guide 35
Feature Description
Each API transmission
can return a transmit
status frame indicating
the success or reason
for failure
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.
Received data frames
indicate the sender's
address
All received RF data API frames indicate the source address
Advanced addressing
support
API transmit and receive frames can expose addressing fields including
source and destination endpoints, cluster ID, and profile ID
Advanced networking
diagnostics
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 Configuration Set/read configuration commands can be sent to remote devices to
configure them as needed using the API
We recommend API mode when a device:
nSends RF data to multiple destinations
nSends remote configuration commands to manage devices in the network
nReceives RF data packets from multiple devices, and the application needs to know which
device sent which packet
API mode is required when:
nReceiving I/O samples from remote devices
nUsing 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:
nNetwork ID match [ID (Network ID)]
nPreamble ID match [HP (Preamble ID)]
nAddress match [SH (Serial Number High) and SL (Serial Number Low)]
Newlransmission
Modes Modes of operation
XBee®/XBee-PRO SX RF Module User Guide 36
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.
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 devices configuration using parameters you can set using AT
commands.When you want to read or set any parameter of the XBee/XBee-PRO SX RF Module using
this mode, you have to send an AT command.Every AT command starts with the lettersATfollowed by
the two characters that identify the command and then by some optional configuration values.
The operating modes of the XBee/XBee-PRO SX RF Module are controlled by the AP (API Enable)
setting, butCommand mode is always available as a mode thedevice can enter while configured for
any of the operating modes.
Command mode is available on the UART interface for all operating modes. You cannot use the SPI
interface to enter Command mode.
“AT” + ASCII + Space + Parameter + Carriage prefix command (optional) (optional, HEX) return IIJJ—hl—l Example: AT NI 2
Modes Modes of operation
XBee®/XBee-PRO SX RF Module User Guide 37
Enter Command mode
To get a device to switch into Command mode, you must issue the following sequence:+++within one
second. There must be at least one second preceding and following the+++sequence. Both the
command character (CC) and the silence before and after the sequence (GT) are configurable. When
the entrance criteria are met the device responds with OK\r on UART signifying that it has entered
Command mode successfully and is ready to start processing AT commands.
If configured to operate in Transparent operating mode, when entering Command mode the
XBee/XBee-PRO SX RF Module knows to stop sending data and start accepting commands locally.
Note Do not press Return or Enter after typing+++because it interrupts the guard time silence and
prevents you from entering Command mode.
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 the previous operating mode. You can force the device to leave
Command mode by sending CN command.
You can customize the command character, the guard times and the timeout in the device’s
configuration settings. For more information, seeCC (Command Sequence Character),CT (Command
Mode Timeout)andGT (Guard Times).
Troubleshooting
Failure to enter Command mode is often due to baud rate mismatch. Ensure that the baud rate of the
connection matches the baud rate of the device. By default, BD (Interface Data Rate) =3(9600 b/s).
There are two alternative ways to enter Command mode:
nA serial break for six seconds enters Command mode. You can issue the "break" command
from a serial console, it is often a button or menu item.
nAsserting DIN (serial break) upon power up or reset enters Command mode. XCTU guides you
through a reset and automatically issues the break when needed.
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 that BD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 lettersAT, 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 NI (Node Identifier) to My XBee.
Modes Modes of operation
XBee®/XBee-PRO SX RF Module User Guide 38
Multiple AT commands
You can send multiple AT commands at a time when they are separated by a comma in Command
mode; for example,ATNIMy XBee,AC<cr>.
The preceding example changes theNI (Node Identifier) to My XBeeand makes the setting active
through AC (Apply Changes).
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 exampleFFFFor0xFFFF.
Response to AT commands
When using AT commands to set parameters the XBee/XBee-PRO SX RF Module responds with OK<cr>
if successful and ERROR<cr> if not.
For devices with a file system:
ATAP1<cr>
OK<cr>
When reading parameters, the device returns the current parameter value instead of anOKmessage.
ATAP<cr>
1<cr>
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BDcommand to change the baud rate, the
actual baud rate does not change until you apply the changes. To apply changes:
1. Send AC (Apply Changes).
2. Send WR (Write).
or:
3. Exit Command mode.
Make command changes permanent
Send a WR (Write) command to save the changes. WR writes parameter values to non-volatile memory
so that parameter modifications persist through subsequent resets.
Send as RE (Restore Defaults) to wipe settings saved using WR back to their factory defaults.
Note You still have to use WR to save the changes enacted with RE.
Exit Command mode
1. Send CN command followed by a carriage return.
or:
2. If the device does not receive any valid AT commands within the time specified byCT
(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.
Sleep modes
About sleep modes 40
Normal mode 40
Asynchronous pin sleep mode 41
Asynchronous cyclic sleep mode 41
Asynchronous cyclic sleep with pin wake up mode 41
Synchronous sleep support mode 41
Synchronous cyclic sleep mode 42
The sleep timer 42
Indirect messaging and polling 42
Sleeping routers 43
Sleep coordinator sleep modes in the DigiMesh network 43
Synchronization messages 44
Become a sleep coordinator 46
Select sleep parameters 48
Start a sleeping synchronous network 48
Add a new node to an existing network 49
Change sleep parameters 50
Rejoin nodes that lose sync 50
Diagnostics 51
XBee®/XBee-PRO SX RF Module User Guide 39
Sleep modes About sleep modes
XBee®/XBee-PRO SX RF Module User Guide 40
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:
nAsynchronous (SM = 1, 4, 5).
nSynchronous (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
nDo not use asynchronous sleep modes in a synchronous sleeping network, and vice versa.
nUse the asynchronous sleep modes to control the sleep state on a device by device basis.
nDo not use devices operating in asynchronous sleep mode to route data.
nWe strongly encourage you to set asynchronous sleeping devices as end-devices using the CE
command. This prevents the node from attempting to route data.
nTransmissions 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.
nA device acting as a sleep coordinator sends a special RF packet called a sync message to
synchronize nodes.
nTo make a device in the network a coordinator, a node uses several resolution criteria.
nThe 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.
nYou 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.
Normal mode is the default sleep mode. If a device is in this mode, it does not sleep and is always
awake.
Sleep modes Asynchronous pin sleep mode
XBee®/XBee-PRO SX RF Module User Guide 41
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:
nWhen you use them as preferred sleep coordinator nodes.
nAs aids in adding new nodes to a sleeping network.
Note Because sleep support nodes do not sleep, they should be mains powered.
Sleep modes Synchronous cyclic sleep mode
XBee®/XBee-PRO SX RF Module User Guide 42
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).
nIf the device receives any data serially or by RF link, the timer resets.
nUse ST (Wake Time) to set the duration of the timer.
nWhen 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-to-
Multipoint (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
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
sts u
Sleep modes Sleeping routers
XBee®/XBee-PRO SX RF Module User Guide 43
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.
Sleep modes Synchronization messages
XBee®/XBee-PRO SX RF Module User Guide 44
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:
nAllows you to effectively deploy a network.
nAllows 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.
Sleep modes Synchronization messages
XBee®/XBee-PRO SX RF Module User Guide 45
Sleep modes Become a sleep coordinator
XBee®/XBee-PRO SX RF Module User Guide 46
Become a sleep coordinator
In DigiMesh networks, a device can become a sleep coordinator in one of four ways:
nDefine a preferred sleep coordinator
nA potential sleep coordinator misses three or more sync messages
nPress the Commissioning Pushbutton twice on a potential sleep coordinator
nChange 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 coordi