VJune 2017Modified regulatory and certification information as required by RED (Radio
WMay 2018Added note on range estimation. Changed ICto ISED.
Updated several AT commands.
Editorial revision to ATcommands.
Removed the 1S command. Fixed an error in the 0x90 frame table. Clarified
the routing table size.
Equipment Directive).
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
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)
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
2
Page 3
Trace (if possible)
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
Include the document title and part number (XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide,
90000991 W) in the subject line of your email.
techcomm@digi.com
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
3
Page 4
Contents
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
Worldwide acceptance12
Antenna options12
Part numbers12
Technical specifications
Performance specifications14
Power requirements14
General specifications15
Networking and security specifications15
Regulatory conformity summary15
Power supply design22
Board layout22
Antenna performance23
Keepout area23
DC characteristics25
ADC operating characteristics25
ADC timing and performance characteristics26
Modes
Transparent and API operating modes28
Transparent operating mode28
API operating mode28
Comparing Transparent and API modes28
Additional modes30
Command mode30
Idle mode30
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
4
Page 5
Receive mode30
Sleep modes30
Transmit mode31
Command mode31
Enter Command mode31
Troubleshooting31
Send AT commands32
Response to AT commands32
Apply command changes32
Make command changes permanent33
Exit Command mode33
Configure the XBee/XBee-PRO DigiMesh 2.4
Software libraries35
Configure the device using XCTU35
XBee Network Assistant35
Serial communication
Serial interface38
UART data flow38
Serial data38
Serial buffers39
Serial buffer issues39
Serial flow control40
CTS flow control40
RTS flow control40
Work with networked devices
Network commissioning and diagnostics42
Local configuration42
Remote configuration42
Establish and maintain network links43
Build aggregate routes43
DigiMesh routing examples43
Replace nodes44
Test links in a network - loopback cluster44
Test links between adjacent devices45
Example46
RSSI indicators47
Discover all the devices on a network47
Trace route option47
NACK messages49
The Commissioning Pushbutton49
Associate LED50
Monitor I/O lines52
Queried sampling52
Periodic I/O sampling54
Detect digital I/O changes54
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
5
Page 6
Network configurations
DigiMesh networking57
Routers and end devices58
Network identifiers58
Operating channels58
Unicast addressing58
Broadcast addressing59
Routing59
Route discovery59
DigiMesh throughput60
Transmission timeouts60
Sleep modes
About sleep modes64
Asynchronous modes64
Synchronous modes64
Normal mode64
Asynchronous pin sleep mode65
Asynchronous cyclic sleep mode65
Asynchronous cyclic sleep with pin wake up mode65
Synchronous sleep support mode65
Synchronous cyclic sleep mode66
The sleep timer66
Sleep coordinator sleep modes in the DigiMesh network66
Synchronization messages67
Become a sleep coordinator69
Preferred sleep coordinator option69
Resolution criteria and selection option69
Commissioning Pushbutton option70
Auto-early wake-up sleep option72
Select sleep parameters72
Start a sleeping synchronous network72
Add a new node to an existing network73
Change sleep parameters74
Rejoin nodes that lose sync74
Diagnostics75
Query sleep cycle75
Sleep status75
Missed sync messages command75
Sleep status API messages76
AT commands
Special commands78
AC (Apply Changes)78
FR (Software Reset)78
RE (Restore Defaults)78
WR (Write)78
MAC/PHY commands79
CH (Operating Channel)79
ID (Network ID)79
MT(Broadcast Multi-Transmits)79
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
6
Page 7
CA (CCA Threshold)80
PL (TX Power Level)80
RR (Unicast Mac Retries)81
ED (Energy Detect)81
BC (Bytes Transmitted)81
DB (Last Packet RSSI)82
GD (Good Packets Received)82
EA (MAC ACK Failure Count)82
TR (Transmission Failure Count)83
UA (Unicasts Attempted Count)83
%H (MAC Unicast One Hop Time)83
%8 (MAC Broadcast One Hop Time)83
Network commands83
CE (Routing / Messaging Mode)84
BH (Broadcast Hops)84
NH (Network Hops)84
DM (DigiMesh Options)84
NN (Network Delay Slots)85
MR (Mesh Unicast Retries)85
Addressing commands85
SH (Serial Number High)85
SL (Serial Number Low)86
DH (Destination Address High)86
DL (Destination Address Low)86
NI (Node Identifier)86
NT (Network Discovery Back-off)87
NO (Network Discovery Options)87
CI (Cluster ID)87
DE (Destination Endpoint)88
SE (Source Endpoint)88
Diagnostic - addressing commands88
FCC-approved antennas (2.4 GHz)162
Australia (C-Tick)168
Labeling requirements168
Brazil ANATEL168
Modelo XBee-Pro S3B:169
ISED (Innovation, Science and Economic Development Canada)169
Labeling requirements169
Europe169
Maximum power and frequency specifications170
OEM labeling requirements170
Restrictions170
Declarations of conformity170
Approved antennas171
Japan171
Labeling requirements172
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
10
Page 11
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
The XBee/XBee-PRO DigiMesh 2.4 supports the unique needs of low-cost, low-power, wireless sensor
networks. The devices require minimal power and provide reliable data delivery between remote
devices. The devices operate within the ISM 2.4 MHz frequency band.
These devices support routing table sizes of 32 nodes. Networks larger than this send a route
discovery before each transmission. For larger networks this can be bandwidth expensive, so we offer
RF optimization services to help you properly configure a network.
Worldwide acceptance12
Antenna options12
Part numbers12
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
11
Page 12
XBee/XBee-PRO DigiMesh 2.4 RF Module User GuideWorldwide acceptance
Worldwide acceptance
We manufacture and certify the XBee/XBee-PRO DigiMesh 2.4s to certain industry standards. These
standards enable you to understand what the devices can do and where you can use them.
The Federal Communications Commission (FCC) approves the devices for use in the United States. For
details, see United States (FCC). If a system contains XBee/XBee-PRO DigiMesh 2.4s, the system
inherits Digi’s certifications.
The devices are certified to operate in the industrial, scientific, and medical (ISM) 2.4 GHz frequency
band.
We manufacture the devices under International Organization for Standardization (ISO) 9001:2000
registered standards.
We optimize the devices for use in the United States and Canada. For a complete list of agency
approvals, see Regulatory information.
Antenna options
Digi devices come in a variety of antenna options. The options that allow you to connect an external
antenna are reverse polarity standard subminiature assembly (RPSMA) and U.FL. Typically, you make
connections with either a dipole antenna with a U.FL connection, or a U.FL to RPSMA antenna adapter
cable.
RPSMA is the more traditional antenna connector, however, if the device is going to be inside of an
enclosure, you would need to locate the device near the edge of the enclosure to allow the connector
to pass through an available bulkhead. The RPSMA connector uses the same body as a regular SMA
connector, but changes the gender of the center conductor. The female RPSMA actually has a male
center conductor. We equip the XBee devices with an RPSMA female plug, while the antenna is an
RPSMA male jack.
The U.FL connection allows for connectivity to an external antenna. U.FL is a small antenna connection
for use with a pigtail connector. A pigtail is a short (typically 4 - 6 in) cable that either terminates into
an external antenna port such as an RPSMA, N or TNC connection or an antenna. You would attach the
RPSMA connector to a bulkhead. These options allow you to mount the device away from the edge of
the enclosure in your product and centrally locate the radio. U.FL is fragile and is not designed for
multiple insertions without a specialized tool to separate the pigtail without damaging the connector;
for more information, see http://www.digikey.com/product-detail/en/U.FL-LP(V)-N-2/HR5017-
ND/513034.
The other available antenna options are printed circuit board (PCB) and wire antennas. We form the
PCB antenna directly on the device with conductive traces. A PCB antenna performs about the same
as a wire antenna.
An integrated wire antenna consists of a small wire (about 80 mm) sticking up perpendicular to the
PCB. It uses a 1/4-wave wire that we solder directly to the PCB of the OEM device.
All Digi devices with antenna connectors have less than 0.1 dB loss; we do not consider one to be
"better" than the other in terms of reliability or insertion loss. RF device specifications such as -110
dBm receiver sensitivity, +3 0 dBm TX power, and so forth, already include any insertion loss due to
the soldered RF connector.
Part numbers
The part numbers for these devices are available at the following link:
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.
SpecificationXBeeXBee-PRO
Indoor / urban range Up to 100 ft (30 m)Up to 300 ft (90 m) standard or up to 200 ft
(60 m) international variant
Outdoor RF line of
sight range
Transmit power
output
RF data rate250 kb/s250 kb/s
Serial interface data
rate (software
selectable)
Receiver sensitivity-92 dBm (1% packet error
Power requirements
The following table describes the power requirements for the XBee/XBee-PRO DigiMesh 2.4.
SpecificationXBeeXBee-PRO
Supply voltage2.8 - 3.4
Transmit current45 mA (@
Up to 300 ft (90 m)Up to 1 mile (1.5 km), with a 2.0 dB dipole
antenna. Up to 6 miles (10 km) with a high
gain antenna.
1 mW (0 dBm)63 mW (18 dBm) standard or 10 mW (10
dBm) for the international variant
1200 bps - 250 kb/s (devices
also support non-standard
baud rates)
rate)
2.8 - 3.4 VDC
VDC
250 mA (@ 3.3 V) (150 mA for the international variant)
3.3 V)
RPSMA device only: 340 mA (@ 3.3 V) (180 mA for the
international variant)
1200 bps - 250 kb/s (devices also support
non-standard baud rates)
-100 dBm (1% packet error rate)
Idle / receive current50 mA (@
3.3 V)
Power down current (pin
sleep)
Power down current
(cyclic sleep)
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
<10 µA<10 µA
<50 µA<50 µA
55 mA (@ 3.3 V)
14
Page 15
Technical specificationsGeneral specifications
General specifications
The following table describes the general specifications for the devices.
SpecificationXBeeXBee-PRO
Operating frequency
band
Dimensions2.438 cm x 2.761 cm (0.960 in x 1.087 in)2.438 cm x 3.294 cm (0.960 in
Operatingtemperature -40 to 85 °C (industrial)-40 to 85 °C (industrial)
Relative humidity0 to 95% non-condensing0 to 95% non-condensing
See Regulatory information for region-specific certification requirements.
ANATEL 0378-15-1209
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
16
Page 17
Hardware
Mechanical drawings18
Mounting considerations19
Hardware diagram20
Pin signals21
Design notes22
DC characteristics25
ADC operating characteristics25
ADC timing and performance characteristics26
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
17
Page 18
HardwareMechanical drawings
Mechanical drawings
The following figures show the mechanical drawings for the XBee/XBee-PRO DigiMesh 2.4. The
drawings do not show antenna options.
The following drawings show the RPSMA device.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
18
Page 19
HardwareMounting considerations
Mounting considerations
We design the through-hole module to mount into a receptacle so that you do not have to solder the
module when you mount it to a board. The development kits may contain RS-232 and USB interface
boards that use two 20-pin receptacles to receive modules.
The following illustration shows the module mounting into the receptacle on the RS-232 interface
board.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
19
Page 20
HardwareHardware diagram
n Through-hole single-row receptacles: Samtec part number: MMS-110-01-L-SV (or equivalent)
n Surface-mount double-row receptacles: Century Interconnect part number: CPRMSL20-D-0-1
(or equivalent)
n Surface-mount single-row receptacles: Samtec part number: SMM-110-02-SM-S
Note We recommend that you print an outline of the module on the board to indicate the
correct orientation for mounting the module.
Hardware diagram
The following diagram shows a simplified view of XBee/XBee-PRO DigiMesh 2.4 hardware.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
20
Page 21
HardwarePin signals
Pin signals
The following table shows the pin signals and their descriptions.
Pin
#Pin nameDirectionDescription
1Vcc-Power supply
2DOUTOutputUART data out
3DIN/CONFIGInputUART data in
4DIO12EitherDigital I/O 12
5RESETInput/open
drain
output
6PWM0/RSSI/DIO10EitherPWM output 0 / RX signal strength indicator / Digital I/O
7PWM/DIO11EitherPWM output 1 / Digital I/O 11
8Reserved-Do not connect
DTR/SLEEP_
9
RQ/DIO8
10GND-Ground
11AD4/ DIO4EitherAnalog input 4 or Digital I/O 4
CTS/ DIO7
12
13ON/SLEEPOutputDevice Status Indicator or Digital I/O 9
14VREF-You must connect this line if you want to use analog I/O
EitherPin sleep control line or Digital I/O 8
EitherClear-to-send flow control or Digital I/O 7
Device reset. The reset pulse must be at least 100 µs.
Drive this line as an open drain/collector. The device
drives this line low when a reset occurs. Never drive this
line high.
sampling. Must be between 2.6 V and Vcc.
15Associate/DIO5/AD5 EitherAssociated indicator, Digital I/O 5
RTS/ DIO6
16
17AD3 / DIO3EitherAnalog input 3 or Digital I/O 3
18AD2 / DIO2EitherAnalog input 2 or Digital I/O 2
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
EitherRequest-to-send flow control, Digital I/O 6
21
Page 22
HardwareDesign notes
Pin
#Pin nameDirectionDescription
19AD1 / DIO1EitherAnalog input 1 or Digital I/O 1
20AD0 / DIO0 /
Commissioning
Pushbutton
EitherAnalog input 0, Digital I/O 0, or Commissioning
Pushbutton
Notes
The table specifies signal direction with respect to the device.
The device includes a 50 kΩ pull-up resistor attached to RESET.
You can configure several of the input pull-ups using the PR command.
Leave any unused pins disconnected.
Recommended pin connections
The only required pin connections for two-way communication are VCC, GND, DOUT and DIN. To
support serial firmware updates, you must connect VCC, GND, DOUT, DIN, RTS, and DTR.
Do not connect any pins that are not in use. Use the PR command to pull all inputs on the radio high
with internal pull-up resistors. Unused outputs do not require any specific treatment.
For applications that need to ensure the lowest sleep current, never leave unconnected inputs
floating. Use internal or external pull-up or pull-down resistors, or set the unused I/O lines to outputs.
You can connect other pins to external circuitry for convenience of operation including the Associate
LED pin (pin 15) and the Commissioning pin (pin 20). The Associate LED pin flashes differently
depending on the state of the module, and a pushbutton attached to pin 20 can enable various
deployment and troubleshooting functions without you sending UART commands. For more
information, see The Commissioning Pushbutton.
For analog sampling, attach the VREF pin (pin 14) to a voltage reference.
Design notes
The following guidelines help to ensure a robust design.
Power supply design
A poor power supply can lead to poor device performance, especially if you do not keep the supply
voltage within tolerance or if it is excessively noisy. To help reduce noise, place a 1.0 μF and 8.2 pF
capacitor as near as possible to pin 1 on the PCB. If you are using a switching regulator for the power
supply, switch the frequencies above 500 kHz. Limit the power supply ripple to a maximum 100 mV
peak to peak.
Board layout
We design XBee devices to be self sufficient and have minimal sensitivity to nearby processors,
crystals or other printed circuit board (PCB) components. Keep power and ground traces thicker than
signal traces and make sure that they are able to comfortably support the maximum current
specifications. There are no other special PCB design considerations to integrate XBee devices, with
the exception of antennas.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
22
Page 23
HardwareDesign notes
Antenna performance
Antenna location is important for optimal performance. The following suggestions help you achieve
optimal antenna performance. Point the antenna up vertically (upright). Antennas radiate and receive
the best signal perpendicular to the direction they point, so a vertical antenna's omnidirectional
radiation pattern is strongest across the horizon.
Position the antennas away from metal objects whenever possible. Metal objects between the
transmitter and receiver can block the radiation path or reduce the transmission distance. Objects
that are often overlooked include:
n metal poles
n metal studs
n structure beams
n concrete, which is usually reinforced with metal rods
If you place the device inside a metal enclosure, use an external antenna. Common objects that have
metal enclosures include:
n vehicles
n elevators
n ventilation ducts
n refrigerators
n microwave ovens
n batteries
n tall electrolytic capacitors
Do not place XBee devices with the chip or integrated PCB antenna inside a metal enclosure.
Do not place any ground planes or metal objects above or below the antenna.
For the best results, mount the device at the edge of the host PCB. Ensure that the ground, power,
and signal planes are vacant immediately below the antenna section.
Keepout area
We recommend that you allow a “keepout” area, as shown in the following drawing.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
23
Page 24
HardwareDesign notes
Through-hole keepout
Notes
1. We recommend non-metal enclosures. For metal enclosures, use an external antenna.
2. Keep metal chassis or mounting structures in the keepout area at least 2.54 cm (1 in) from the
antenna.
3. Maximize the distance between the antenna and metal objects that might be mounted in the
keepout area.
4. These keepout area guidelines do not apply for wire whip antennas or external RFconnectors.
Wire whip antennas radiate best over the center of a ground plane.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
24
Page 25
HardwareDC characteristics
DC characteristics
The following table displays the DC characteristics (VCC = 2.8 - 3.4 VDC).
Symbols ParameterConditionMinTypical MaxUnits
VCC
VCC
1
V
3
V
V
IL
V
IH
Input low voltageAll digital inputs--0.2
Input high voltageAll digital inputs0.8
2
--V
VCC
V
OL
Output low
IOL= 2 mA, VCC >= 3.0 V--0.18
voltage
VCC
4
--V
V
OH
Output high
IOH= 2 mA, VCC >= 3.0 V0.82
voltage
II
IN
Input leakage
current
VIN= VCC or GND, all inputs,
per pin
ADC operating characteristics
The following table displays the ADC timing and performance characteristics.
Symbols ParameterConditionMinTypical MaxUnits
V
I
V
REF
REFH
INDC
VREF-analog-to-digital converter
reference range
VREF-reference supply currentEnabled-200-μA
5
Analog input voltageV
Disabled or
sleep mode
--0.5μA
2.08-V
DDAD
V
-< 0.010.02μA
-
SSAD
0.3
-V
SSAD
0.3
+
V
1
Maximum electrical operating range, not valid conversion range.
2
Maximum electrical operating range, not valid conversion range.
3
Maximum electrical operating range, not valid conversion range.
4
Maximum electrical operating range, not valid conversion range.
5
Analog input must be between V
$3FF.
REFL
and V
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
for valid conversion. Values greater than V
REFH
will convert to
REFH
25
Page 26
HardwareADC timing and performance characteristics
ADC timing and performance characteristics
The following table displays the ADC timing and performance characteristics.
SymbolsParameterConditionMinTypicalMaxUnits
R
AS
Source impedance at input
2
--10kΩ
1
RES
Ideal resolution (1 LSB)
DNLDifferential non-linearity
INLIntegral non-linearity
E
ZS
F
FS
E
IL
E
TU
1
All Accuracy numbers are based on processor and system being in WAIT state (very little activity and no I/O
switching) and that adequate low-pass filtering is present on analog input pins (filter with 0.01 µF to 0.1 µF
capacitor between analog input and V
microcontroller noise causing accuracy errors which will vary based on board layout and the type and
magnitude of the activity. Data transmission and reception during data conversion may cause some
degradation of these specifications, depending on the number and timing of packets. It is advisable to test the
ADCs in your installation if best accuracy is required.
2
RAS is the real portion of the impedance of the network driving the analog input pin. Values greater than this
amount may not fully charge the input circuitry of the ATD resulting in accuracy error.
3
The resolution is the ideal step size or 1LSB = (V
4
Differential non-linearity is the difference between the current code width and the ideal code width (1LSB).
The current code width is the difference in the transition voltages to and from the current code.
5
Integral non-linearity is the difference between the transition voltage to the current code and the adjusted
ideal transition voltage for the current code. The adjusted ideal transition voltage is (Current Code.1/2)*(1/
((V
REFH+EFS
6
Zero-scale error is the difference between the transition to the first valid code and the ideal transition to that
code. The Ideal transition voltage to a given code is (Code.1/2)*(1/(V
7
Full-scale error is the difference between the transition to the last valid code and the ideal transition to that
code. The ideal transition voltage to a given code is (Code.1/2)*(1/(V
8
Input leakage error is error due to input leakage across the real portion of the impedance of the network
driving the analog pin. Reducing the impedance of the network reduces this error.
9
Total unadjusted error is the difference between the transition voltage to the current code and the ideal
straight-line transfer function. This measure of error includes inherent quantization error (1/2 LSB) and circuit
error (differential, integral, zero-scale, and full-scale) error. The specified value of ETUassumes zero EIL(no
leakage or zero real source impedance).
Zero-scale error
Full-scale error
7
Input leakage error
Total unadjusted error
).(V
REFL+EZS
))).
3
4
5
6
2.08V > V
> 3.6V2.0313.516mV
DDAD
-±0.5±1.0LSB
-±0.5±1.0LSB
-±0.4±1.0LSB
-±0.4±1.0LSB
8
9
). Failure to observe these guidelines may result in system or
REFL
REFH–VREFL
)/1024.
-±0.05±5.0LSB
-±1.1±2.5LSB
REFH·VREFL
REFH·VREFL
)).
)).
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
26
Page 27
Modes
The XBee/XBee-PRO DigiMesh 2.4 is in Receive Mode when it is not transmitting data. The device
shifts into the other modes of operation under the following conditions:
n Transmit mode (Serial data in the serial receive buffer is ready to be packetized)
n Sleep mode
n Command Mode (Command mode sequence is issued (not available when using the SPI port))
Transparent and API operating modes28
Additional modes30
Command mode31
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
27
Page 28
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.
API operating mode
API operating mode is an alternative to Transparent operating mode. API mode is a frame-based
protocol that allows you to direct data on a packet basis. The device communicates UART data in
packets, also known as API frames. This mode allows for structured communications with computers
and microcontrollers.
The advantages of APIoperating mode include:
n It is easier to send information to multiple destinations
n The host receives the source address for each received data frame
n You can change parameters without entering Command mode
n You can query or set a configuration parameter while a pending command—for example ND—is
in progress. This cannot be done in Command mode.
For more information, see API frame specifications.
Comparing Transparent and API modes
The XBee/XBee-PRO DigiMesh 2.4 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 provides a comparison of the two modes.
Transparent operating modeAPI operating mode
When to use:
n The conditions for using API mode
do not apply.
When to use:
n The device sends wireless data to multiple
destinations.
n The device configures remote devices in the
network.
n The device receives wireless data packets from
multiple XBee devices, and the application needs
to identify which devices send each packet.
n The device receives I/O samples from remote
XBee devices.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
28
Page 29
ModesTransparent and API operating modes
Transparent operating modeAPI operating mode
Advantages:
n Provides a simple interface.
n It is easy for an application to
support; what you send is exactly
what other modules get, and vice
versa.
n Works very well for two-way
communication between XBee
devices.
Disadvantages:
n You cannot set or read the
configuration of remote XBee
devices in the network.
n You must first update the
configuration to establish a new
destination and transmit data.
n You cannot identify the source of
received data, as it does not
include the sender's address.
n Received data does not include
transmission details or the
reasons for success or failure.
n This mode does not offer the
advanced features of API mode,
including advanced networking
diagnostics, and firmware
upgrades.
Advantages:
n You can set or read the configuration of remote
XBee devices in the network.
n You can transmit data to one or multiple
destinations; this is much faster than
Transparent mode where the configuration must
be updated to establish a new destination.
n Received data includes the sender's address.
n Received data includes transmission details and
reasons for success or failure.
n This mode has several advanced features, such
as advanced networking diagnostics, and
firmware upgrades.
Disadvantages:
n The interface is more complex; data is
structured in packets with a specific format.
n This mode is more difficult to support;
transmissions are structured in packets that
need to be parsed (to get data) or created (to
transmit data).
n Sent data and received data are not identical;
received packets include some control data and
XTend vB information.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
29
Page 30
ModesAdditional modes
Additional modes
In addition to the serial communication modes, several modes apply to how devices communicate
with each other.
Command mode
Command mode is a state in which the firmware interprets incoming characters as commands.
Command mode allows you to modify the device’s firmware using parameters you can set using AT
commands. When you want to read or set any setting of the device, you have to send it an AT
command. Every AT command starts with the letters "AT", followed by the two characters that
identify the command that is being sent and then by some optional configuration values. For more
details, see Enter Command mode.
Idle mode
The device is in Idle mode when it is not receiving or transmitting data. During Idle mode, the device
listens for valid data on both the RF and serial ports.
Receive mode
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 receive data on the RF network, that data must
meet the following criteria:
n ID match
n Channel match
n Address match
Sleep modes
Sleep modes allows 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 both pin sleep, where the module enters sleep mode upon pin transition, and
cyclic sleep, where the module sleeps for a fixed time. While asleep, nodes cannot receive RF
messages or read commands from the UART port.
The sleep modes are:
n Normal mode. Normal mode is the default for a newly powered-on node. In this mode, a node
does not sleep. Normal mode nodes should be mains-powered.
n Asynchronous Pin Sleep mode. This mode allows the device to sleep and wake according to the
state of the Sleep_RQ pin (pin 9).
n Asynchronous Cyclic Sleep Mode. This mode allows the device to sleep for a specified time and
wake for a short time to poll.
n Asynchronous Cyclic Sleep with Pin Wake Up mode. In this mode you can wake the device up
prematurely using the Sleep_RQ pin.
n Synchronous Sleep Support mode. A node in this 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 using a sync message.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
30
Page 31
ModesCommand mode
n Synchronous Cyclic Sleep mode. A node 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.
Transmit mode
When the device receives serial data and is ready to packetize it, it exits Idle mode and attempts to
transmit the serial data.
Command mode
Command mode is a state in which the firmware interprets incoming characters as commands. It
allows you to modify the device’s configuration using parameters you can set using AT
commands.When you want to read or set any parameter of the XBee/XBee-PRO DigiMesh 2.4 using
this mode, you have to send an AT command.Every AT command starts with the lettersATfollowed by
the two characters that identify the command and then by some optional configuration values.
The operating modes of the XBee/XBee-PRO DigiMesh 2.4 are controlled by the AP (API Mode) setting,
butCommand mode is always available as a mode thedevice 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.
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 DigiMesh 2.4 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. IfCTtime (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 (Exit Command Mode).
You can customize the command character, the guard times and the timeout in the device’s
configuration settings. For more information, seeCC (Command 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 (Baud Rate) = 3 (9600 b/s).
There are two alternative ways to enter Command mode:
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
31
Page 32
ModesCommand mode
n A 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.
n Asserting 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 anOKon the UART
to indicate that Command mode is active. When Command mode exits, the device returns to normal
operation at the baud rate that BDis 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." TheATis 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.
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 theNI (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 leading0xfor exampleFFFFor0xFFFF.
Response to AT commands
When using AT commands to set parameters the XBee/XBee-PRO DigiMesh 2.4 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 anOKmessage.
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 theBDcommand to change the baud rate, the
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
32
Page 33
ModesCommand mode
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 (Exit Command Mode) 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 is10seconds.
For an example of programming the device using AT Commands and descriptions of each configurable
parameter, see AT commands.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
33
Page 34
Configure the XBee/XBee-PRO DigiMesh 2.4
Software libraries35
Configure the device using XCTU35
XBee Network Assistant35
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
34
Page 35
Configure the XBee/XBee-PRO DigiMesh 2.4Software libraries
Software libraries
One way to communicate with the XBee/XBee-PRO DigiMesh 2.4 is by using a software library. The
libraries available for use with the XBee/XBee-PRO DigiMesh 2.4 include:
n XBee Java library
n XBee Python library
n XBee ANSI C 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.
The XBee ANSI C Library project is a collection of portable ANSI C code for communicating with the
devices in API mode.
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.
Click Discover devices and follow the instructions. XCTU should discover the connected XBee/XBee-
PRO DigiMesh 2.4s 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.
XBee Network Assistant
The XBee Network Assistant is an application designed to inspect and manage RF networks created
by Digi XBee devices. Features include:
n Join and inspect any nearby XBee network to get detailed information about all the nodes it
contains.
n Update the configuration of all the nodes of the network, specific groups, or single devices
based on configuration profiles.
n Geo-locate your network devices or place them in custom maps and get information about the
connections between them.
n Export the network you are inspecting and import it later to continue working or work offline.
n Use 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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
35
Page 36
Configure the XBee/XBee-PRO DigiMesh 2.4XBee Network Assistant
4. When the file finishes downloading, run the executable file and follow the steps in the XBee
Network Assistant Setup Wizard.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
36
Page 37
Serial communication
Serial interface38
UART data flow38
Serial buffers39
Serial flow control40
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
37
Page 38
Serial communicationSerial interface
Serial interface
The XBee/XBee-PRO DigiMesh 2.4 provides a serial interface to an RF link. The XBee/XBee-PRO
DigiMesh 2.4 converts serial data to RF data and sends that data to any device in an RF network. The
device can communicate through its serial port with any logic and voltage compatible universal
asynchronous receiver/transmitter (UART) or through a level translator to any serial device.
UART data flow
The XBee/XBee-PRO DigiMesh 2.4 device’s UART performs tasks such as checking timing and parity,
which is required for data communications.
Devices that have a UART interface connect directly to the pins of the XBee/XBee-PRO DigiMesh 2.4 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 DigiMesh 2.4's UART through pin 3 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 DigiMesh 2.4) 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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
38
Page 39
Serial communicationSerial buffers
Serial buffers
The XBee/XBee-PRO DigiMesh 2.4 maintains internal buffers to collect serial and RF data that it
receives. The serial receive buffer collects incoming serial characters and holds them until the device
can process them. The serial transmit buffer collects the data it receives via the RF link until it
transmits that data out the serial port. The following figure shows the process of device buffers
collecting received serial data.
Serial buffer issues
There are potential overflow and dropped packet issues, which the following section describes.
Serial receive buffer
Under certain conditions, the device may not be able to process data in the serial receive buffer
immediately. If a host sends large amounts of serial data to the device, the device may require CTS
flow control to avoid overflowing the serial receive buffer.
Cases in which the serial receive buffer may become full and possibly overflow:
1. If the device receives a continuous stream of RF data, it does not transmit the data in the
serial receive buffer until the device stops receiving RF data.
2. For mesh networking firmware, if the device transmits an RF data packet, the device may need
to discover the destination address or establish a route to the destination. After transmitting
the data, the device may need to retransmit the data if it does not receive an
acknowledgment, or if the transmission is a broadcast. These issues could delay the processing
of data in the serial receive buffer.
Serial transmit buffer
If the serial transmit buffer becomes full enough that all of the data in a received RF packet will not fit
in the serial transmit buffer, it drops the entire RF data packet.
Cases in which the serial transmit buffer may become full, resulting in dropped RF packets:
1. If the RF data rate is set higher than the interface data rate of the device, the device may
receive data faster than it can send the data to the host. Even occasional transmissions from a
large number of devices can quickly accumulate and overflow the transmit buffer.
2. If the host does not allow the device to transmit data out from the serial transmit buffer due to
being held off by hardware flow control.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
39
Page 40
Serial communicationSerial flow control
Serial flow control
The RTS and CTS device pins provide RTS and/or CTS flow control. CTS flow control signals the host to
stop sending serial data to the device. RTS flow control lets the host signal the device so it will not
send the data in the serial transmit buffer out the UART. Use the D6 and D7 commands to enable RTS
and CTS flow control.
CTS flow control
CTS flow control is enabled by default; you can disable it with the D7 command. When the serial
receive buffer fills with the number of bytes specified by the FT parameter, the device de-asserts CTS
(sets it high) to signal the host device to stop sending serial data. The device re-asserts CTS when less
than FT-16 bytes are in the UART receive buffer; for more information, see FT (Flow Control
Threshold).
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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
40
Page 41
Work with networked devices
Network commissioning and diagnostics42
Establish and maintain network links43
Test links in a network - loopback cluster44
Test links between adjacent devices45
Monitor I/O lines52
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
41
Page 42
Work with networked devicesNetwork commissioning and diagnostics
Network commissioning and diagnostics
We call the process of discovering and configuring devices in a network for operation, "network
commissioning." Devices include several device discovery and configuration features. In addition to
configuring devices, you must develop a strategy to place devices to ensure reliable routes. To
accommodate these requirements, modules include features to aid in placing devices, configuring
devices, and network diagnostics.
Local configuration
You can configure devices locally using serial commands in Transparent or API mode, or remotely
using remote API commands. Devices that are in API mode can send configuration commands to set
or read the configuration settings of any device in the network.
Remote configuration
When you do not have access to the device's serial port, you can use a separate device in API mode to
remotely configure it. To remotely configure devices, use the following steps.
Send a remote command
To send a remote command, populate the Remote AT Command Request - 0x17 with:
1. The 64-bit address of the remote device.
2. The correct command options value.
3. Optionally, the command and parameter data.
4. If you want a command response, set the Frame ID field to a non-zero value.
The firmware only supports unicasts of remote commands. You cannot broadcast remote commands.
XCTU has a Frames Generator tool that can assist you with building and sending a remote AT frame;
see Frames generator tool in the XCTU User Guide.
Apply changes on remote devices
When you use remote commands to change the command parameter settings on a remote device,
you must apply the parameter changes or they do not take effect. For example, if you change the BD
parameter, the actual serial interface rate does not change on the remote device until you apply the
changes. You can apply the changes using remote commands in one of three ways:
1. Set the apply changes option bit in the API frame.
2. Send an AC command to the remote device.
3. Send the WR command followed by the FR command to the remote device to save the changes
and reset the device.
Remote command response
If a local device sends a command request to a remote device, and the API frame ID is non-zero, the
remote device sends a remote command response transmission back to the local device.
When the local device receives a remote command response transmission, it sends a remote
command response API frame out its UART. The remote command response indicates:
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
42
Page 43
Work with networked devicesEstablish and maintain network links
1. The status of the command, which is either success or the reason for failure.
2. In the case of a command query, it includes the register value.
The device that sends a remote command does not receive a remote command response frame if:
1. It could not reach the destination device.
2. You set the frame ID to 0 in the remote command request.
Establish and maintain network links
Build aggregate routes
In many applications, many or all of the nodes in the network must transmit data to a central
aggregator node. In a new DigiMesh network, the overhead of these nodes discovering routes to the
aggregator node can be extensive and taxing on the network. To eliminate this overhead, you can use
the AG command to automatically build routes to an aggregate node in a DigiMesh network.
To send a unicast, devices configured for Transparent mode (AP = 0) must set their DH/DL registers to
the MAC address of the node that they need to transmit to. In networks of Transparent mode devices
that transmit to an aggregator node it is necessary to set every device's DH/DL registers to the MAC
address of the aggregator node. This can be a tedious process. A simple and effective method is to use
the AG command to set the DH/DL registers of all the nodes in a DigiMesh network to that of the
aggregator node.
Upon deploying a DigiMesh network, you can send the AG command on the desired aggregator node
to cause all nodes in the network to build routes to the aggregator node. You can optionally use the
AG command to automatically update the DH/DL registers to match the MAC address of the
aggregator node.
The AG command requires a 64-bit parameter. The parameter indicates the current value of the
DH/DL registers on a device; typically you should replace this value with the 64-bit address of the node
sending the AG broadcast. However, if you do not want to update the DH/DL of the device receiving
the AG broadcast you can use the invalid address of 0xFFFE. The receiving nodes that are configured
in API mode output an Aggregator Update API frame (0x8E) if they update their DH/DL address; for a
description of the frame, see Aggregate Addressing Update- 0x8E.
All devices that receive an AG broadcast update their routing table information to build a route to the
sending device, regardless of whether or not their DH/DL address is updated. The devices use this
routing information for future DigiMesh unicast transmissions.
DigiMesh routing examples
Example one:
In a scenario where you deploy a network, and then you want to update the DH and DL registers of all
the devices in the network so that they use the MAC address of the aggregator node, which has the
MAC address 0x0013A200 4052C507, you could use the following technique.
1. Deploy all devices in the network with the default DH/DL of 0xFFFF.
2. Serially, send an ATAGFFFF command to the aggregator node so it sends the broadcast
transmission to the rest of the nodes.
All the nodes in the network that receive the AG broadcast set their DH to 0x0013A200 and their DL to
0x4052C507. These nodes automatically build a route to the aggregator node.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
43
Page 44
Work with networked devicesTest links in a network - loopback cluster
Example two:
If you want all of the nodes in the network to build routes to an aggregator node with a MAC address
of 0x0013A200 4052C507 without affecting the DH and DL registers of any nodes in the network:
1. Send the ATAGFFFE command to the aggregator node. This sends an AG broadcast to all of the
nodes in the network.
2. All of the nodes internally update only their routing table information to contain a route to the
aggregator node.
3. None of the nodes update their DH and DL registers because none of the registers are set to
the 0xFFFE address.
Replace nodes
You can use the AG command to update the routing table and DH/DL registers in the network after
you replace a device. To update only the routing table information without affecting the DH and DL
registers, use the process in example two, above.
To update the DH and DL registers of the network, use example three, below.
Example three:
This example shows how to cause all devices to update their DH and DL registers to the MAC address
of the sending device. In this case, assume you are using a device with a serial number of 0x0013A200
4052C507 as a network aggregator, and the sending device has a MAC address of 0x0013A200
F5E4D3B2 To update the DH and DL registers to the sending device's MAC address:
1. Replace the aggregator with 0x0013A200 F5E4D3B2.
2. Send the ATAG0013A200 4052C507 command to the new device.
Test links in a network - loopback cluster
To measure the performance of a network, you can send unicast data through the network from one
device to another to determine the success rate of several transmissions. To simplify link testing, the
devices support a Loopback cluster ID (0x12) on the data endpoint (0xE8). The cluster ID on the data
endpoint sends any data transmitted to it back to the sender.
The following figure demonstrates how you can use the Loopback cluster ID and data endpoint to
measure the link quality in a mesh network.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
44
Page 45
Work with networked devicesTest links between adjacent devices
The configuration steps for sending data to the loopback cluster ID depend on what mode the device
is in. For details on setting the mode, see AP (API Mode). The following sections list the steps based on
the device's mode.
Transparent operating mode configuration (AP = 0)
To send data to the loopback cluster ID on the data endpoint of a remote device:
1. Set the CI command to 0x12.
2. Set the DH and DL commands to the address of the remote device.
After exiting Command mode, the device transmits any serial characters it received to the remote
device, which returns those characters to the sending device.
API operating mode configuration (AP = 1 or AP = 2)
Send an Explicit Addressing Command Request - 0x11 using 0x12 as the cluster ID and 0xE8 as both
the source and destination endpoint.
The remote device echoes back the data packets it receives to the sending device.
Test links between adjacent devices
It often helps to test the quality of a link between two adjacent modules in a network. You can use the
Test Link Request Cluster ID to send a number of test packets between any two devices in a network.
To clarify the example, we refer to "device A" and "device B" in this section.
To request that device B perform a link test against device A:
1. Use device A in API mode (AP= 1) to send an Explicit Addressing Command (0x11) frame to
device B.
2. Address the frame to the Test Link Request Cluster ID (0x0014) and destination endpoint: 0xE6.
3. Include a 12-byte payload in the Explicit Addressing Command frame with the following format:
Number of
bytesField nameDescription
8Destination
address
2Payload sizeThe size of the test packet. Use the NPcommand to query the
2IterationsThe number of packets to send. This must be a number between 1 and
4. Device B should transmit test link packets.
5. When device B completes transmitting the test link packets, it sends the following data packet
to device A's Test Link Result Cluster (0x0094) on endpoint (0xE6).
6. Device A outputs the following information as an API Explicit RX Indicator (0x91) frame:
The address the device uses to test its link. For this example, use the
device A address.
maximum payload size for the device.
4000.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
45
Page 46
Work with networked devicesTest links between adjacent devices
Number of
bytesField nameDescription
8
Destination
The address the device used to test its link.
address
2Payload sizeThe size of the test packet device A sent to test the link.
2IterationsThe number of packets that device A sent.
2SuccessThe number of packets that were successfully
acknowledged.
2RetriesThe number of MAC retries used to transfer all the packets.
1Result0x00 - the command was successful.
0x03 - invalid parameter used.
1RRThe maximum number of MAC retries allowed.
1maxRSSIThe strongest RSSI reading observed during the test.
1minRSSIThe weakest RSSI reading observed during the test.
1avgRSSIThe average RSSI reading observed during the test.
Example
Suppose that you want to test the link between device A (SH/SL = 0x0013A200 40521234) and device
B (SH/SL=0x0013A 200 4052ABCD) by transmitting 1000 40-byte packets:
Send the following API packet to the serial interface of device A.
In the following example packet, whitespace marks fields, bold text is the payload portion of the
packet:
If the Result field does not equal zero, an error has occurred. Ignore the other fields in the packet.
If the Success field equals zero, ignore the RSSI fields.
The device that sends the request for initiating the Test link and outputs the result does not need to
be the sender or receiver of the test. It is possible for a third node, "device C", to request device A to
perform a test link against device B and send the results back to device C to be output. It is also
possible for device B to request device A to perform the previously mentioned test. In other words, the
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
46
Page 47
Work with networked devicesTest links between adjacent devices
frames can be sent by either device A, device B or device C and in all cases the test is the same: device
A sends data to device B and reports the results.
RSSI indicators
The received signal strength indicator (RSSI) measures the amount of power present in a radio signal.
It is an approximate value for signal strength received on an antenna.
You can use the DB command to measure the RSSI on a device. DB returns the RSSI value measured in
-dBm of the last packet the device received. This number can be misleading in multi-hop DigiMesh
networks. The DB value only indicates the received signal strength of the last hop. If a transmission
spans multiple hops, the DB value provides no indication of the overall transmission path, or the
quality of the worst link, it only indicates the quality of the last link.
To determine the DB value in hardware:
1. Use the PO command to enable the RSSI pulse-width modulation (PWM) functionality.
2. Use the RSSI/PWM module pin (pin 6). When the device receives data, it sets the RSSI PWM
duty cycle to a value based on the RSSI of the packet it receives.
This value only indicates the quality of the last hop of a multi-hop transmission. You could connect this
pin to an LED to indicate if the link is stable or not.
Discover all the devices on a network
You can use the ND (Network Discovery)command to discover all devices on a network. When you
send the ND command:
1. The device sends a broadcast ND command through the network.
2. All devices that receive the command send a response that includes their addressing
information, node identifier string and other relevant information. For more information on the
node identifier string, see NI (Node Identifier).
ND is useful for generating a list of all device addresses in a network.
When a device receives the network discovery command, it waits a random time before sending its
own response. You can use the NT command to set the maximum time delay on the device that you
use to send the ND command.
n The device that sends the ND includes its NT setting in the transmission to provide a delay
window for all devices in the network.
n The default NT value is 0x82 (13 seconds).
Trace route option
In many networks, it is useful to determine the route that a DigiMesh unicast takes to its destination;
particularly, when you set up a network or want to diagnose problems within a network.
Note Because of the large number of Route Information Packet frames that a unicast with trace
route enabled can generate, we suggest you only use the trace route option for occasional diagnostic
purposes and not for normal operations.
The Transmit Request (0x10) frame contains a trace route option, which transmits routing
information packets to the originator of the unicast using the intermediate nodes.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
47
Page 48
Work with networked devicesTest links between adjacent devices
When a device sends a unicast with the trace route option enabled, the unicast transmits to its
destination devices, which forward the unicast to its eventual destination. The destination device
transmits a Route Information Packet (0x8D) frame back along the route to the unicast originator.
The Route Information Packet frame contains:
n Addressing information for the unicast.
n Addressing information for the intermediate hop.
n Other link quality information.
For a full description of the Route Information Packet frame, see Route Information - 0x8D.
Trace route example
Suppose that you successfully unicast a data packet with trace route enabled from device A to device
E, through devices B, C, and D. The following sequence would occur:
n After the data packet makes a successful MAC transmission from device A to device B, device A
outputs a Route Information Packet frame indicating that the transmission of the data packet
from device A to device E was successful in forwarding one hop from device A to device B.
n After the data packet makes a successful MAC transmission from device B to device C, device B
transmits a Route Information Packet frame to device A. When device A receives the Route
Information packet, it outputs it over its serial interface.
n After the data packet makes a successful MAC transmission from device C to device D, device C
transmits a Route Information Packet frame to device A (through device B). When device A
receives the Route Information packet, it outputs it over its serial interface.
n After the data packet makes a successful MAC transmission from device D to device E, device D
transmits a Route Information Packet frame to device A (through device C and device B). When
device A receives the Route Information packet, it outputs it over its serial interface.
There is no guarantee that Route Information Packet frames will arrive in the same order as the
route taken by the unicast packet. On a weak route, it is also possible for the transmission of Route
Information Packet frames to fail before arriving at the unicast originator.
Discover devices within RF range
n You can use the FN (Find Neighbors) command to discover the devices that are immediate
neighbors (within RF range) of a particular device.
n FN is useful in determining network topology and determining possible routes.
You can send FN locally on a device in Command mode or you can use a local Local AT Command
Request - 0x08.
To use FN remotely, send the target node a Remote AT Command Request - 0x17 using FN as the
name of the AT command.
The device you use to send FN transmits a zero-hop broadcast to all of its immediate neighbors. All of
the devices that receive this broadcast send an RF packet to the device that transmitted the FN
command. If you sent FN remotely, the target devices respond directly to the device that sent the FN
command. The device that sends FNoutputs a response packet in the same format as an Local AT
Command Response - 0x88.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
48
Page 49
Work with networked devicesTest links between adjacent devices
NACK messages
Transmit Request (0x10 and 0x11) frames contain a negative-acknowledge character (NACK) API
option (Bit 2 of the Transmit Options field).
If you use this option when transmitting data, when a MAC acknowledgment failure occurs on one of
the hops to the destination device, the device generates a Route Information Packet (0x8D) frame
and sends it to the originator of the unicast.
This information is useful because it allows you to identify and repair marginal links.
The Commissioning Pushbutton
The XBee/XBee-PRO DigiMesh 2.4 supports a set of commissioning and LED functions to help you
deploy and commission devices. These functions include the Commissioning Pushbutton definitions
and the associated LED functions. The following diagram shows how the hardware can support these
features.
To support the Commissioning Pushbutton and its associated LED functions, connect a pushbutton
and an LED to device pins 20 and 15 respectively.
Definitions
To enable the Commissioning Pushbutton functionality on pin 20, set the D0 command to 1. The
functionality is enabled by default.
You must perform multiple button presses within two seconds.
The following table provides the pushbutton definitions.
Sleep
configuration
Button
presses
and sync
statusAction
1Not configured
for sleep
Immediately sends a Node Identification broadcast transmission.
All devices that receive this transmission blink their Associate LED rapidly
for one second.
All devices in API operating mode that receive this transmission send a
Node Identification Indicator frame (0x95) out their UART.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
49
Page 50
Work with networked devicesTest links between adjacent devices
Sleep
configuration
Button
presses
and sync
statusAction
1Configured for
asynchronous
sleep
1Configured for
synchronous
sleep
2Not configured
for
synchronous
sleep
2Configured for
synchronous
sleep
4AnySends an RE command to restore device parameters to default values.
Wakes the device for 30 seconds.
Immediately sends a Node Identification broadcast transmission.
All devices that receive this transmission blink their Associate LED rapidly
for one second.
All devices in API operating mode that receive this transmission send a
Node Identification Indicator frame (0x95) out their UART.
Wakes the module for 30 seconds or until the synchronized network goes
to sleep.
Queues a Node Identification broadcast transmission that it sends at the
beginning of the next network wake cycle.
All devices that receive this transmission blink their Associate LED rapidly
for one second.
All devices in API operating mode that receive this transmission send a
Node Identification Indicator frame (0x95) out their UART.
No effect.
Causes a node configured with sleeping router nomination enabled to
immediately nominate itself as the network sleep coordinator. For more
information, see SO (Sleep Options).
Use the Commissioning Pushbutton
Use the CB command to simulate button presses in software. Send CB with a parameter set to the
number of button presses to perform. For example, if you send ATCB1, the device performs the action
(s) associated with a single button press.
Node Identification Indicator - 0x95 is similar to Remote AT Command Response- 0x97 – it contains
the device’s address, node identifier string (NI command), and other relevant data. All devices in API
operating mode that receive the Node Identification Indicator frame send it out their UART as a Node
Identification Indicator frame.
If you enable the Commissioning Pushbutton during sleep, it increases the sleeping current draw,
especially in Asynchronous pin sleep (SM = 1) mode. When asleep, hold down the Commissioning
Pushbutton for up to two seconds to wake the device from sleep, then issue the two or four button
presses.
Associate LED
The Associate pin (pin 15) provides an indication of the device's sleep status and diagnostic
information. To take advantage of these indications, connect an LED to the Associate pin.
To enable the Associate LED functionality, set the D5 command to 1; it is enabled by default. If
enabled, the Associate pin is configured as an output. This section describes the behavior of the pin.
The Associate pin indicates the synchronization status of a sleep compatible XBee/XBee-PRO
DigiMesh 2.4. If a device is not sleep compatible, the pin functions as a power indicator.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
50
Page 51
Work with networked devicesTest links between adjacent devices
Use the LT command to override the blink rate of the Associate pin. If you set LT to 0, the device uses
the default blink time: 500 ms for a sleep coordinator, 250 ms otherwise.
The following table describes the Associate LED functionality.
Sleep
mode LED statusMeaning
0On, blinkingThe device has power and is operating properly
1, 4, 5OffThe device is in a low power mode
1, 4, 5On, blinkingThe device has power, is awake and is operating properly
7On, solidThe network is asleep, or the device has not synchronized with the
network, or has lost synchronization with the network
7, 8On, slow blinking
(500 ms blink time)
7, 8On, fast blinking
(250 ms blink time)
8OffThe device is in a low power mode
8On, solidThe device has not synchronized or has lost synchronization with the
The device is acting as the network sleep coordinator and is
operating properly
The device is properly synchronized with the network
network
Diagnostics support
The Associate pin works with the Commissioning Pushbutton to provide additional diagnostic
behaviors to aid in deploying and testing a network. If you press the Commissioning Pushbutton once,
the device transmits a broadcast Node Identification Indicator (0x95) frame at the beginning of the
next wake cycle if the device is sleep compatible, or immediately if the device is not sleep compatible.
If you enable the Associate LED functionality using the D5 command, a device that receives this
transmission blinks its Associate pin rapidly for one second.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
51
Page 52
Work with networked devicesMonitor I/O lines
Monitor I/O lines
Pin command parameterDescription
0Unmonitored digital input
1Reserved for pin-specific alternate functionality
2Analog input (A/D pins) or PWM output (PWM pins)
3Digital input, monitored
4Digital output, low
5Digital output, high
6-9Alternate functionality, where applicable
The following table provides the pin configurations when you set the configuration command for a
particular pin.
Use the PR command to enable internal pull up/down resistors for each digital input. Use the PD
command to determine the direction of the internal pull up/down resistor.
/ DIO913
/ DIO616
P2
P0
P1
D8
D4
D7
D9
D5
D6
D3
D2
D1
D0
Queried sampling
You can use the IS command to query the current state of all digital input and ADC lines on the device.
If no inputs are defined, the command returns with an ERROR.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
52
Page 53
Work with networked devicesMonitor I/O lines
If you send the IS command from Command mode, then the device returns a carriage return delimited
list containing the following fields.
FieldNameDescription
1Sample
sets
2Digital
channel
mask
1Analog
channel
mask
Number of sample sets in the packet. Always set to 1.
Indicates which digital I/O lines have sampling enabled. Each bit corresponds to
one digital I/O line on the device.
bit 0 = AD0/DIO0
bit 1 = AD1/DIO1
bit 2 = AD2/DIO2
bit 3 = AD3/DIO3
bit 4 = DIO4
bit 5 = ASSOC/DIO5
bit 6 = RTS/DIO6
bit 7 = CTS/GPIO7
bit 8 = DTR / SLEEP_RQ / DIO8
bit 9 = ON_SLEEP / DIO9
bit 10 = RSSI/DIO10
bit 11 = PWM/DIO11
bit 12 = CD/DIO12
For example, a digital channel mask of 0x002F means DIO0,1,2,3, and 5 are
enabled as digital I/O.
Indicates which lines have analog inputs enabled for sampling. Each bit in the
analog channel mask corresponds to one analog input channel.
bit 0 = AD0/DIO0
bit 1 = AD1/DIO1
bit 2 = AD2/DIO2
bit 3 = AD3/DIO3
bit 4 = AD4/DIO4
bit 5 = ASSOC/AD5/DIO5
Variable Sampled
data set
ExampleSample AT response
0x01[1 sample set]
0x0C0C[Digital Inputs: DIO 2, 3, 10, 11 enabled]
0x03[Analog Inputs: A/D 0, 1 enabled]
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
If you enable any digital I/O lines, the first two bytes of the data set indicate
the state of all enabled digital I/O.
Only digital channels that you enable in the Digital channel mask bytes have
any meaning in the sample set. If do not enable any digital I/O on the device, it
omits these two bytes.
Following the digital I/O data (if there is any), each enabled analog channel
returns two bytes. The data starts with AIN0 and continues sequentially for
each enabled analog input channel up to AIN5.
53
Page 54
Work with networked devicesMonitor I/O lines
ExampleSample AT response
0x0408[Digital input states: DIO 3, 10 high, DIO 2, 11 low]
0x03D0[Analog input: ADIO 0 = 0x3D0]
0x0124[Analog input: ADIO 1 =0x120]
Periodic I/O sampling
Periodic sampling allows a device to take an I/O sample and transmit it to a remote device at a
periodic rate. Use the IR command to set the periodic sample rate.
n To disable periodic sampling, set IR to 0.
n For all other IR values, the firmware samples data when IR milliseconds elapse and the sample
data transmits to a remote device.
The DH and DL commands determine the destination address of the I/O samples.
Only devices with API operating mode enabled send I/O data samples out their serial interface.
Devices that are in Transparent mode (AP = 0) discard the I/O data samples they receive. You must
configure at least one pin as a digital or ADC input to generate sample data.
A device with sleep enabled transmits periodic I/O samples at the IR rate until the ST time expires and
the device can resume sleeping. For more information about setting sleep modes, see Sleep modes.
Detect digital I/O changes
You can configure devices to transmit a data sample immediately whenever a monitored digital I/O
pin changes state. The IC command is a bitmask that you use to set which digital I/O lines to monitor
for a state change. If you set one or more bits in IC, the device transmits an I/O sample as soon it
observes a state change in one of the monitored digital I/O lines using edge detection.
The figure below shows how I/O change detection can work with periodic sampling. In the figure, the
gray dashed lines with a dot on top represent samples taken from the monitored DIO line. The top
graph shows only IR samples, the bottom graph shows a combination of IR samples and IC (Change
Detect). In the top graph, the humps indicate that the sample was not taken at that exact moment
and needed to wait for the next IR sample period.
Note Use caution when combining Change Detect sampling with sleep modes. IC only causes a
sample to be generated if the change takes place during a wake period. If the device is sleeping when
the digital input transition occurs, then no change is detected and an I/O sample is not generated.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
54
Page 55
Work with networked devicesMonitor I/O lines
Use IR in conjunction with IC in this instance, since IR generates an I/O sample upon wakeup and
ensures that the change is properly observed.
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.
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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
57
Page 58
Network configurationsNetwork identifiers
Routers and end devices
You can use the CE command to configure devices in a DigiMesh network to act as routers or end
devices. All devices in a DigiMesh network act as routers by default. Any devices that you configure as
routers actively relay network unicast and broadcast traffic.
Network identifiers
You define DigiMesh networks with a unique network identifier. Use the ID command to set this
identifier. For devices to communicate, you must configure them with the same network identifier and
the same operating channel. For devices to communicate, the CHand ID commands must be equal on
all devices in the network.
The ID command directs the devices to talk to each other by establishing that they are all part of the
same network. The ID parameter allows multiple DigiMesh networks to co-exist on the same physical
channel.
Operating channels
The XBee/XBee-PRO DigiMesh 2.4 operates over the 2.4 GHz band using direct sequence spread
spectrum (DSSS) modulation. DSSS modulation allows the device to operate over a channel or
frequency that you specify.
The 2.4 GHz frequency band defines 16 operating channels. XBee devices support all 16 channels and
XBee-PRO devices support 12 of the 16 channels.
Use the CH command to select the operating channel on a device. CH tells the device the frequency to
use to communicate.
For devices to communicate, the CH and ID commands must be equal on all devices in the network.
Note these requirements for communication:
n A device can only receive data from other devices within the same network (with the same ID
value) and using the same channel (with the same CH value).
n A device can only transmit data to other devices within the same network (with the same ID
value) and using the same channel (with the same CH value).
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.
If a device sends a unicast that uses both MAC and NWK retries and acknowledgments:
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
58
Page 59
Network configurationsRouting
n Use MAC retries and acknowledgments for transmissions between adjacent devices in the
route.
n Use NWK retries and acknowledgments across the entire route.
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.
Broadcast addressing
All of the routers in a network receive and repeat broadcast transmissions. Broadcast transmissions
do not use ACKs, so the sending device sends the broadcast multiple times. By default, the sending
device sends a broadcast transmission four times. The transmissions become automatic retries
without acknowledgments. This results in all nodes repeating the transmission four times as well.
In order to avoid RF packet collisions, the network inserts a random delay before each router relays
the broadcast message. You can change this random delay time with the NN parameter.
Sending frequent broadcast transmissions can quickly reduce the available network bandwidth. Use
broadcast transmissions sparingly.
The broadcast address is a 64 bit address with the lowest 16 bits set to 1. The upper bits are set to 0.
To send a broadcast transmission:
n Set DH to 0.
n Set DL to 0xFFFF.
In API operating mode, this sets the destination address to 0x000000000000FFFF.
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.
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:
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.
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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
59
Page 60
Network configurationsRouting
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.
DigiMesh throughput
Throughput in a DigiMesh network can vary due to a number of variables, including:
n The number of hops.
n If you enable or disable encryption.
n Sleeping end devices.
n Failures and route discoveries.
Our empirical testing shows the following throughput performance in a robust operating environment
with low interference.
ConfigurationData throughput
1 hop, encryption disabled27.0 kb/s
3 hop, encryption disabled10.9 kb/s
6 hop, encryption disabled5.78 kb/s
1 hop, encryption enabled20.5 kb/s
3 hop, encryption enabled9.81 kb/s
6 hop, encryption enabled4.70 kb/s
We performed data throughput measurements with the serial interface rate set to 115200 b/s, and
measured the time to send 100,000 bytes from the source to the destination. During the test, there
were no route discoveries or failures.
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
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
60
Page 61
Network configurationsRouting
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 Extended Transmit Status - 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 RR parameter.
DigiMesh networks assume that the average number of MAC-level retries across a multi-hop wireless
link will be three or less. The following table defines the retires and the associated time.
RR (mac retries)Unicast one hop time
0unicastOneHopTime = 5 ms
1unicastOneHopTime = 24 ms
2
3
unicastOneHopTime = 40 ms
unicastOneHopTime = 63 ms
Transmit a broadcast
All of the routers in a network must relay a broadcast transmission.
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:
About sleep modes64
Normal mode64
Asynchronous pin sleep mode65
Asynchronous cyclic sleep mode65
Asynchronous cyclic sleep with pin wake up mode65
Synchronous sleep support mode65
Synchronous cyclic sleep mode66
The sleep timer66
Sleep coordinator sleep modes in the DigiMesh network66
Synchronization messages67
Become a sleep coordinator69
Select sleep parameters72
Start a sleeping synchronous network72
Add a new node to an existing network73
Change sleep parameters74
Rejoin nodes that lose sync74
Diagnostics75
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
63
Page 64
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.
Note Synchronous and asynchronous sleep modes are incompatible. Synchronous and asynchronous
sleep nodes should not be configured in the same network. Asynchronous sleep does not apply in a
mesh network. It can only operate over one hop where a designated node holds messages for the
sleeping node.
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.
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 DigiMesh 2.4 RF Module User Guide
64
Page 65
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 sleepcompatible 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 9).
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 13) 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 9).
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:
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
65
Page 66
Sleep modesSynchronous cyclic sleep mode
n When you use them as preferred sleep coordinator nodes.
n As aids in adding new nodes to a sleeping network.
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.
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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
66
Page 67
Sleep modesSynchronization messages
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.
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 DigiMesh 2.4 RF Module User Guide
67
Page 68
Sleep modesSynchronization messages
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
68
Page 69
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.
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. Also, it is not valid to have the sleep coordinator option bit set on more than
one node at a time.
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, it is best to 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 It is not configured as a non-coordinator by setting bit 1 of SO.
If such a node wins out in the selection process, it becomes the new network 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:
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
69
Page 70
Sleep modesBecome a sleep coordinator
1. Newer sleep parameters always take priority over older sleep parameters. The age of the
sleep parameters is determined by a sequence number that increments when an overriding
sync is sent.
2. Otherwise, the node with the preferred sleep coordinator bit set takes precedence.
3. Otherwise, a sleep support node—SM 7—takes priority over a node that is not a sleep support
node—SM 8.
4. Otherwise, the node with highest serial number becomes the sleep coordinator.
Commissioning Pushbutton option
Use the Commissioning Pushbutton to select a device to act as the sleep coordinator.
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 potential sleep coordinator nodes honor Commissioning Pushbutton nomination requests. A node
configured as a non-sleep coordinator ignores commissioning button nomination requests.
Overriding syncs
Any sleep compatible node in the network that does not have the non-coordinator sleep option set
can send an overriding sync and become the network sleep coordinator. An overriding sync effectively
changes the synchronization of all nodes in the network to the ST and SP values of the node sending
the overriding sync. It also selects the node sending the overriding sync as the network sleep
coordinator. While this is a powerful operation, it may be an undesired side effect because the current
sleep coordinator may have been carefully selected and it is not desired to change it. Additionally the
current wake and sleep cycles may be desired rather than the parameters on the node sending the
overriding sync. For this reason, it is important to know what kicks off an overriding sync.
An overriding sync occurs whenever ST or SP is changed to a value different than OW or OS
respectively. For example no overriding sync will occur if SP is changed from 190 to C8 if the network
was already operating with OS at C8. On the other hand, if SP is changed from 190 to 190—meaning
no change—and OS is C8, than an overriding sync will occur because the network parameters are
being changed.
Even parameters that seem unrelated to sleep can kick off an overriding sync. These are NH, NN, RN,
and MT. When any of these parameters are changed, they can affect network traversal time. If such
changes cause the configured value of ST to be smaller than the value needed for network traversal,
then ST is increased and if that increased value is different than OW, then an overriding sync will
occur.
For most applications, we recommend configuring the NH, NN, RN, and MT network parameters
during initial deployment only. The default values of NH and NN are optimized to work for most
deployments. Additionally, it would be best to set ST and SP the same on all nodes in the network
while keeping ST sufficiently large so that it will not be affected by an inadvertent change of NH, NN,
RN, or MT.
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
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
70
Page 71
Sleep modesBecome a sleep coordinator
more and more consecutive sync messages, the sleep guard time increases in duration and decreases
the available transmission time.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
71
Page 72
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.
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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
72
Page 73
Sleep modesAdd a new node to an existing network
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. In order to reduce the possibility of an unintended overriding sync, set SP and ST to the
intended sleep/wake cycle on all nodes in the network. Be sure that ST is large enough to
prevent it from being inadvertently increased by changing NN, NH, or MT.
7. Wait a sleep cycle for the sleeping nodes to sync themselves to the new SP and ST values.
8. Disable the preferred sleep coordinator option bit on the sleep coordinator unless you want a
preferred sleep coordinator.
9. 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.
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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
73
Page 74
Sleep modesChange sleep parameters
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
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:
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
74
Page 75
Sleep modesDiagnostics
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.
Missed sync messages command
Use the MS command to query the number of cycles that elapsed since the device received a sync
message.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
75
Page 76
Sleep modesDiagnostics
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.
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 DigiMesh 2.4 RF Module User Guide
78
Page 79
AT commandsMAC/PHY commands
MAC/PHY commands
The following AT commands are MAC/PHY commands.
CH (Operating Channel)
Set or read the operating channel devices used to transmit and receive data. The channel is one of
three addressing configurations available to the device. The other configurations are the PAN ID (ID
command) and destination addresses (DL and DH commands).
In order for devices to communicate with each other, they must share the same channel number. A
network can use different channels to prevent devices in one network from listening to the
transmissions of another. Adjacent channel rejection is 23 dB.
The command uses 802.15.4 channel numbers. Center frequency = 2405 MHz + (CH - 11 decimal) * 5
MHz.
Parameter range
0xB - 0x1A
Default
0xC (12 decimal)
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 - 0xFFFF
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 - 0xF
Default
3
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
79
Page 80
AT commandsMAC/PHY commands
CA (CCA Threshold)
Set or read the Clear Channel Assessment (CCA) threshold. Prior to transmitting a packet, the device
performs a CCA to detect energy on the channel. If the device detects energy above the CCA
threshold, it will not transmit the packet.
The CA parameter is measured in units of -dBm.
Setting the parameter to 0x00 disables CCA, otherwise the valid range is 0x24 - 0x50.
Parameter range
0x0 - 0x50 -dBm
Default
0x0 (CCA disabled)
Example
If you set the CA parameter to 60 (0x3C), the device does not transmit if it detects a signal greater
than -60 dBm on the channel.
ETSI compliance (Europe)
Use the following settings for ETSIcompliance.
DeviceHex value Sets to level
XBee0x3A-58 dBm
XBee-PRO 0x43-67 dBm
PL (TX Power Level)
Sets or displays the power level at which the device transmits conducted power. Power levels are
approximate.
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.
Parameter range
0 - 4
These parameters equate to the following settings for the XBee RF module:
SettingPower level
0-7 dBm
1-1.7 dBm
2-0.77 dBm
3+0.62 dBm
4+1.42 dBm
These parameters equate to the following settings for the XBee-PRO RF module:
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
80
Page 81
AT commandsMAC/PHY commands
SettingPower level
0+10 dBm
1+12 dBm
2+14 dBm
3+16 dBm
4+18 dBm
Default
4
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)
ED (Energy Detect)
Starts an energy detect scan. This command accepts an argument to specify the time in milliseconds
to scan all channels. The device loops through all the available channels until the time elapses. It
returns the maximal energy on each channel, a comma follows each value, and the list ends with a
carriage return. The values returned reflect the energy level that ED detects in -dBm units.
Parameter range
0 - 0x3A98 (15 seconds)
Default
N/A
BC (Bytes Transmitted)
The number of RF bytes transmitted. The firmware counts every byte of every packet, including
MAC/PHY headers and trailers. The purpose of this count is to estimate battery life by tracking time
spent performing transmissions.
This number rolls over to 0 from 0xFFFF.
You can reset the counter to any unsigned 16-bit value by appending a hexadecimal parameter to the
command.
Parameter range
0 - 0xFFFF
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
81
Page 82
AT commandsMAC/PHY commands
Default
0
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.
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 DigiMesh 2.4 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
N/A
Default
0
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
N/A
Default
N/A
EA (MAC ACK Failure Count)
The number of unicast transmissions that time out awaiting a MAC ACK. This can be up to RR +1
timeouts per unicast when RR > 0.
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
Default
Parameter range
N/A
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
82
Page 83
AT commandsNetwork commands
Default
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
N/A
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).
Parameter range
0 - 0xFFFF
Default
0
%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
0x267
%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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
83
Page 84
AT commandsNetwork commands
CE (Routing / Messaging Mode)
The routing and messaging mode of the device.
End devices do not propagate broadcasts and will not become intermediate nodes on a route.
Parameter range
0 - 2
ParameterDescriptionRoutes packets
0Standard routerYes
1N/AN/A
2End deviceNo
Default
0
BH (Broadcast Hops)
The maximum transmission hops for broadcast data transmissions.
If you set BH greater than NH, the device uses the value of NH.
Parameter range
0 - 0x20
Default
0
NH (Network Hops)
Sets or displays the maximum number of hops across the network. This parameter limits the number
of hops. You can use this parameter to calculate the maximum network traversal time.
You must set this parameter to the same value on all nodes in the network.
Parameter range
1 - 0x20 (1 - 32 hops)
Default
7
DM (DigiMesh Options)
A bit field mask that you can use to enable or disable DigiMesh features.
Bit:
0: Disable aggregator updates. When set to 1, the device does not issue or respond to AG requests.
1: Disable Trace Route and NACK responses. When set to 1, the device does not generate or respond
to Trace Route or NACK requests.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
84
Page 85
AT commandsAddressing commands
Parameter range
0 - 0x03 (bit field)
Default
0
NN (Network Delay Slots)
Set or read the maximum random number of network delay slots before rebroadcasting a network
packet.
One network delay slot is approximately 13 ms.
Parameter range
1 - 0xA network delay slots
Default
3
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.
If you set this parameter to 0, it disables network ACKs. Initially, the device can find routes, but a
route will never be repaired if it fails.
Parameter range
0 - 7 mesh unicast retries
Default
1
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 product family
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
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
85
Page 86
AT commandsAddressing commands
SL (Serial Number Low)
Displays the lower 32 bits of the unique IEEE 64-bit RF extended address assigned to the product
family 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.
Parameter range
0 - 0xFFFFFFFF
Default
0
DL (Destination Address Low)
Set or display the lower 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
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.
Use the ND (Network Discovery) command with this string as an argument to easily identify devices
on the network.
The DN command also uses this identifier.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
86
Page 87
AT commandsAddressing commands
Parameter range
A string of case-sensitive ASCII printable characters from 0 to 20 bytes in length. 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.
The ND, DN, and FN commands use NT.
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)
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.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
87
Page 88
AT commandsDiagnostic - addressing commands
If you set this value to 0x12 (loopback Cluster ID), the destination node echoes any transmitted
packet back to the source device.
Parameter range
0 - 0xFFFF
Default
0x11 (Transparent data cluster ID)
DE (Destination Endpoint)
Sets or displays the application layer destination ID value. The value is used as the destination
endpoint for all data transmissions. The default value (0xE8) is the Digi data endpoint.
Parameter range
0 - 0xFF
Default
0xE8
SE (Source Endpoint)
Sets or displays the application layer source endpoint value. The value is used as the source endpoint
for all data transmissions. The default value (0xE8) is the Digi data endpoint.
This command only affects outgoing transmissions in transparent mode (AP = 0).
0xE8 is the Digi data endpoint used for outgoing data transmissions.
0xE6 is the Digi device object endpoint used for configuration and commands.
Parameter range
0 - 0xFF
Default
0xE8
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 the sum of NT (Network Discovery Back-off Time) and the network
propagation time.
Parameter range
[read-only]
Default
0x3D6A
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
88
Page 89
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 Request - 0x08:
1. The receiving device returns 0xFFFE followed by its 64-bit extended addresses in a Remote AT
Command Response- 0x97.
2. The device returns an ERROR message if it is given without a destination node (that is without
a parameter) or if the given destination node does not respond within N? milliseconds.
Parameter range
20-byte ASCII string
Default
N/A
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
89
Page 90
AT commandsAddressing discovery/configuration commands
ND (Network Discover)
Discovers and reports all of the devices it finds on a network. If you send ND through a local API frame,
each network node returns a separate Local AT Command Response - 0x88 or Remote AT Command
Response- 0x97 frame, respectively.
For each discovered device, the following information is returned:
SH<CR> (4 bytes)
SL<CR> (4 bytes)
DB<CR> (Contains the detected signal strength of the response in negative dBm units)
NI <CR> (variable, 0-20 bytes plus 0x00 character)
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.)
After (NT * 100) milliseconds, the command ends by returning a <CR>. ND also accepts NI (Node
Identifier) as a parameter (optional). In this case, only a device that matches the supplied identifier
responds.
If you send ND through a local API frame, the device returns each response as a separate AT_CMD_
Response packet. The data consists of the bytes listed above without the carriage return delimiters.
The NI string ends in a 0x00 null character.
Parameter range
N/A
Default
N/A
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 (Network Discovery Options)
settings.)
RSSI OF LAST HOP<CR> (1 byte. Optionally included based on NO (Network Discovery Options)
settings.)
<CR>
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
90
Page 91
AT commandsSecurity commands
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)
Enables or disables Advanced Encryption Standard (AES) encryption.
Set this command parameter the same on all devices in a network.
Parameter range
0 - 1
ParameterDescription
0Encryption Disabled
1Encryption Enabled
Default
0
KY (AES Encryption Key)
Sets the 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.
Parameter range
128-bit value
Default
N/A
Serial interfacing commands
The following AT commands are serial interfacing commands.
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
91
Page 92
AT commandsSerial interfacing commands
BD (Baud Rate)
Sets or displays the serial interface baud rate for communication between the device's serial port and
the host.
To request non-standard baud rates with values above 0x80, you can use the Serial Console toolbar in
XCTUto configure the serial connection (if the console is connected), or click the Connect button (if
the console is not yet connected).
When you send non-standard baud rates to a device, it stores the closest interface data rate
represented by the number in the BD register. Read the BD command by sending ATBD without a
parameter value, and the device returns the value stored in the BD register.
Parameter range
Standard baud rates: 0x0 - 0x7
Non-standard baud rates: 0x39 to 0xF4240 if the host supports it
ValueDescription
0x01,200 b/s
0x12,400 b/s
0x24,800 b/s
0x39,600 b/s
0x419,200 b/s
0x538,400 b/s
0x657,600 b/s
0x7115,200 b/s
0x39 to 0xF4240 if the host supports it.
Default
0x03 (9600 b/s)
NB (Parity)
Set or read the serial parity settings for UART communications.
Parameter range
0x00 - 0x04
ParameterDescription
0x00No parity
0x01Even parity
0x02Odd parity
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
92
Page 93
AT commandsSerial interfacing commands
ParameterDescription
0x03Mark parity (forced high)
0x04Space parity (forced low)
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.
The device de-asserts CTS and/or send XOFF when FT bytes are in the UART receive buffer. It reasserts CTS when less than FT-16 bytes are in the UART receive buffer.
Parameter range
0x11 - 0xEE bytes
Default
0xBE
AP (API Mode)
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.
Parameter range
0 - 2
Parameter Description
0
XBee/XBee-PRO DigiMesh 2.4 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.
93
Page 94
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.
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.
Default
0
I/O settings commands
The following AT commands are I/O settings commands.
CB (Commissioning Pushbutton)
Use CB to simulate commissioning pushbutton presses in software.
Set the parameter value to the number of button presses that you want to simulate. For example,
send CB1 to perform the action of pressing the Commissioning Pushbutton once.
See The Commissioning Pushbutton.
See Commissioning pushbutton.
Parameter range
0 - 4
Default
N/A
D0 (DIO0/AD0)
Sets or displays the DIO0/AD0 configuration (pin 20).
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
94
Page 95
AT commandsI/O settings commands
Parameter range
0 - 5
ParameterDescription
0Disabled
1Commissioning Pushbutton
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
1
D1 (DIO1/AD1)
Sets or displays the DIO1/AD1 configuration (pin 19).
Parameter range
0, 2 - 5
ParameterDescription
0Disabled
1N/A
1Commissioning button
2ADC
3Digital input
4Digital output, low
5Digital output, high
6PTI_EN
Default
0
D2 (DIO2/AD2)
Sets or displays the DIO2/AD2 configuration (pin 18).
Parameter range
0, 2 - 5
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
95
Page 96
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 17).
Parameter range
0, 2 - 5
ParameterDescription
0Disabled
1N/A
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
D4 (DIO4/AD4)
Sets or displays the DIO4/AD4 configuration (pin 11).
Parameter range
0, 2 - 5
ParameterDescription
0Disabled
1N/A
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
96
Page 97
AT commandsI/O settings commands
ParameterDescription
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
D5 (DIO5/AD5/ASSOCIATED_INDICATOR)
Sets or displays the DIO5/AD5/ASSOCIATED_INDICATOR configuration (pin 15).
Parameter range
ParameterDescription
0Disabled
1
2ADC
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 16).
Parameter range
0, 1, 3 - 5
ParameterDescription
0Disabled
1
RTS flow control
2N/A
3Digital input
4Digital output, low
5Digital output, high
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
97
Page 98
AT commandsI/O settings commands
Default
0
D7 (DIO7/CTS)
Sets or displays the DIO7/CTS configuration (pin 12).
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/SLEEP_REQUEST configuration (pin 9).
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
Parameter Description
0Disabled
1N/A
2N/A
3Digital input
4Digital output, low
5Digital output, high
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
98
Page 99
AT commandsI/O settings commands
Default
1
D9 (ON_SLEEP)
Sets or displays the ON/SLEEP configuration (pin 13).
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 6).
Parameter range
0 - 5
ParameterDescription
0Disabled
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 7).
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
99
Page 100
AT commandsI/O settings commands
Parameter range
0 - 5
ParameterDescription
0Disabled
1N/A
2PWM1 output
3Digital input
4Digital output, low
5Digital output, high
Default
0
P2 (DIO12 Configuration)
Sets or displays the DIO12 configuration (pin 4).
Parameter range
1, 3 - 5
ParameterDescription
0Disabled
1N/A
2N/A
3Digital input
4Digital output, low
5Digital output, high
Default
0
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 the internal pull-up resistor status for the I/O lines. If you set a PR bit to 1,
it enables the pull-up resistor; 0 specifies no internal pull-up. The following table defines the bit-field
map for both the PR and PD commands.
XBee/XBee-PRO DigiMesh 2.4 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.