BFebruary2017 Added Australia and South Korea certification data for the S2C TH and
CApril 2017Added Japan certification data for the S2C TH and S2C SMT devices.
DJune 2017Modified regulatory and certification information as required by RED
EFebruary 2018 Added Brazil certification information.
August 2016Baseline release of the document.
S2C SMT devices.
(Radio 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
Send comments
Documentation feedback: To provide feedback on this document, send your comments to
techcomm@digi.com.
Customer support
Digi Technical Support: Digi offers multiple technical support plans and service packages to help our
customers get the most out of their Digi product. For information on Technical Support plans and
pricing, contact us at +1 952.912.3444 or visit us at www.digi.com/support.
XBee S2C DigiMesh 2.4 User Guide
2
Contents
XBee S2C DigiMesh 2.4 User Guide
Applicable firmware and hardware11
Firmware release notes11
Technical specifications
Performance specifications13
Power requirements13
General specifications14
Networking and security specifications14
Regulatory conformity summary14
Serial communication specifications15
Escaped characters in API frames117
Frame descriptions118
API frame exchanges118
AT Command frame - 0x08120
AT Command - Queue Parameter Value frame - 0x09121
Transmit Request frame - 0x10123
Explicit Addressing Command frame - 0x11126
Remote AT Command Request frame - 0x17129
AT Command Response frame - 0x88131
Modem Status frame - 0x8A133
Transmit Status frame - 0x8B134
Route Information Packet frame - 0x8D136
Aggregate Addressing Update frame - 0x8E139
Receive Packet frame - 0x90141
Explicit Rx Indicator frame - 0x91143
I/O Data Sample Rx Indicator frame - 0x92145
Node Identification Indicator frame - 0x95147
Remote Command Response frame - 0x97151
Over-the-Air Firmware Update Status - 0xA0153
Regulatory information
United States (FCC)156
OEM labeling requirements156
FCC notices156
FCC-approved antennas (2.4 GHz)158
RF exposure170
Europe (CE)170
Maximum power and frequency specifications170
OEM labeling requirements170
Listen Before Talk requirement171
Declarations of conformity171
Antennas172
Canada (IC)172
Labeling requirements172
For XBee S2C surface-mount172
For XBee-PRO S2C surface-mount172
For XBee S2C through-hole172
For XBee-PRO S2C through-hole172
Transmitters for detachable antennas173
Detachable antenna173
Australia (RCM)173
South Korea173
ANATEL (Brazil)177
XBee S2C DigiMesh 2.4 User Guide
8
Load DigiMesh 2.4 firmware on ZB devices
Background180
Load firmware180
Migrate from XBee through-hole to surface-mount devices
Pin mapping183
Mount the devices184
PCB design and manufacturing
Recommended solder reflow cycle187
Recommended footprint and keepout187
Flux and cleaning189
Rework189
XBee S2C DigiMesh 2.4 User Guide
9
XBee S2C DigiMesh 2.4 User Guide
This manual describes the operation of the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module, which
consists of DigiMesh firmware loaded onto XBee S2C and PRO S2C hardware.
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module 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 GHz frequency band.
You can build networks of up to 32 nodes using these devices. For larger networks of up to 1,000 or
more nodes, we offer technical support to assist with proper network configuration. For information
on Technical Support plans and pricing, contact us at 877.912.3444 or visit us at
www.digi.com/support.
Applicable firmware and hardware11
Firmware release notes11
XBee S2C DigiMesh 2.4 User Guide
10
XBee S2C DigiMesh 2.4 User GuideApplicable firmware and hardware
Applicable firmware and hardware
This manual supports the following firmware:
n 900x
It supports the following hardware:
n S2C
Firmware release notes
You can view the current release notes in the Firmware Explorer section of XCTU. For instructions on
downloading and using XCTU, go to: https://www.digi.com/products/xbee-rf-solutions/xctu-
software/xctu.
XBee S2C DigiMesh 2.4 User Guide
11
Technical specifications
The following tables provide the device's technical specifications.
Performance specifications13
Power requirements13
General specifications14
Networking and security specifications14
Regulatory conformity summary14
Serial communication specifications15
GPIO specifications17
This table describes the agency approvals for the devices.
XBee
Country
United States (FCC Part
15.247)
(surface-mount)
FCC ID:
MCQ-XBS2C
XBee-PRO
(surfacemount)
FCC ID:
MCQPS2CSM
PAN ID, channel and 64-bit
addresses
128 bit AES
XBee
(through-hole)
FCC ID:
MCQ-S2CTH
XBee-PRO
(through-hole)
FCC ID:
MCQ-PS2CTH
XBee S2C DigiMesh 2.4 User Guide
14
Technical specificationsSerial communication specifications
XBee-PRO
Country
XBee
(surface-mount)
(surfacemount)
XBee
(through-hole)
XBee-PRO
(through-hole)
Industry Canada (IC)
FCC/IC test transmit
power output range
Europe (CE)Yes-Yes-
AustraliaRCMRCMRCMRCM
JapanR201WW10215369R210- 105563
South KoreaMSIP-CRM-DIG-
RoHSCompliant
IC:
1846A-XBS2C
-26 to +8dBm-0.7 to
XBee-S2C
Serial communication specifications
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module supports both Universal Asynchronous Receiver /
Transmitter (UART) and Serial Peripheral Interface (SPI)serial connections.
UART pin assignments
The SC1 (Serial Communication Port 1) of the Ember 357 is connected to the UART port. The following
table provides the UART pin assignments.
IC:
1846APS2CSM
+19.4 dBm
IC:
1846A-S2CTH
-26 to +8 dBm+1 to +19 dBm
MSIP-CRM-DIGXBee-S2C-TH
IC:
1846A-PS2CTH
SpecificationsModule pin number
UART pinsXBee (surface-mount)XBee (through-hole)
DOUT32
DIN / CONFIG
CTS / DIO7
RTS / DIO6
43
2512
2916
SPI pin assignments
The SC2 (Serial Communication Port 2) of the Ember 357 is connected to the SPI port.
SpecificationsModule pin number
SPI pinsXBee (surface-mount)XBee (through-hole)
SPI_SCLK1418
XBee S2C DigiMesh 2.4 User Guide
15
Technical specificationsSerial communication specifications
SpecificationsModule pin number
SPI pinsXBee (surface-mount)XBee (through-hole)
SPI_SSEL
SPI_MOSI1611
SPI_MISO174
1517
XBee S2C DigiMesh 2.4 User Guide
16
Technical specificationsGPIO specifications
GPIO specifications
XBee/XBee-PRO S2C DigiMesh 2.4 RF Modules have 15 General Purpose Input / Output (GPIO) ports
available. The exact list depends on the device configuration, as some GPIO pads are used for
purposes such as serial communication.
GPIO Electrical SpecificationValue
Low Schmitt switching threshold0.42 - 0.5 x VCC
High Schmitt switching threshold0.62 - 0.8 x VCC
Input current for logic 0-0.5 µA
Input current for logic 10.5 µA
Input pull-up resistor value29 kΩ
Input pull-down resistor value29 kΩ
Output voltage for logic 00.18 x VCC
(maximum)
Output voltage for logic 10.82 x VCC
(minimum)
Output source/sink current for pad numbers 3, 4, 5, 10, 12, 14, 15, 16, 17, 25, 26,
28, 29, 30, and 32 on the SMT modules
Output source/sink current for pin numbers 2, 3, 4, 9, 12, 13, 15, 16, 17, and 19 on
the TH modules
Output source/sink current for pad numbers 7, 8, 24, 31, and 33 on the SMT
modules
Output source/sink current for pin numbers 6, 7, 11, 18, and 20 on the TH modules8 mA
The ranges specified are typical for the integrated whip (1.5 dBi) and dipole (2.1 dBi) antennas. The
printed circuit board (PCB) antenna option provides advantages in its form factor; however, it typically
yields shorter range than the whip and dipole antenna options when transmitting outdoors. For more
information, see XBee and XBee-PRO OEM RF Module Antenna Considerations Application Note.
Mechanical drawings
The following mechanical drawings of the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module show all
dimensions in inches. The first drawing shows the surface-mount device (antenna options not shown).
The following drawings show the standard (non-PRO) through-hole device.
XBee S2C DigiMesh 2.4 User Guide
19
HardwareMounting considerations
The following drawings show the XBee-PRO through-hole device.
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.
XBee S2C DigiMesh 2.4 User Guide
20
HardwarePin signals
The following illustration shows the module mounting into the receptacle on the RS-232 interface
board.
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.
Pin signals
The following image shows the pin numbers; it shows the device's top sides, the shields are on the
bottom.
The following table shows the pin assignments for the through-hole device. In the table, low-asserted
signals have a horizontal line above signal name.
PinNameDirection Description
1VCC-
2DOUTOutput
XBee S2C DigiMesh 2.4 User Guide
Power supply
UART data out
21
HardwarePin signals
PinNameDirection Description
3DIN/CONFIGInput
4DIO12/SPI_MISOBoth
5RESETInput
6DIO10/PWM0/RSSI
PWM
7DIO11/PWM1Both
8[Reserved]-
9DIO8/SLEEP_
RQ/DTR
10GND-
11DIO4/SPI_MOSIBoth
12DIO7/CTSBoth
13ON/SLEEPOutput
14V
REF
Both
Both
-
UART data In
Digital I/O 12 / Serial Peripheral Interface (SPI) Data Out
Module reset (reset pulse must be at least 200 ns). This
must be driven as an open drain/collector. The device
drives this line low when a reset occurs. Never drive this
line high.
Digital I/O 10 / PWM output 0 / RX signal strength
indicator
Digital I/O 11 / PWM output 1
Do not connect
Digital I/O 8 / Pin sleep control line
Ground
Digital I/O 4 / SPI Data In
Digital I/O 7 / Clear-to-send flow control
Device sleep status indicator
Feature not supported on this device. Used on other XBee
devices for analog voltage reference.
15DIO5/ASSOCBoth
16DIO6/RTSBoth
17DIO3/AD3/SPI_
SSEL
18DIO2/AD2/SPI_CLK Both
19DIO1/AD1/SPI_
ATTN
20DIO0/AD0Both
The following table shows the pin assignments for the surface-mount device.
PinNameDirectionFunction
1GND-
2VCC-
3DOUTOutput
4DIN/CONFIGInput
Both
Both
Digital I/O 5 / Associated indicator
Digital I/O 6 / Request-to-send flow control
Digital I/O 3 / Analog input 3 / SPI select
Digital I/O 2 / Analog input 2 / SPI clock
Digital I/O 1 / Analog input 1 / SPIAttention
Digital I/O 0 / Analog input 0
Ground
Power supply
UART data out
UART data in
XBee S2C DigiMesh 2.4 User Guide
22
HardwarePin signals
PinNameDirectionFunction
5DIO12Both
6RESETInput
7DIO10/PWM0/RSSI
PWM
8DIO11/PWM1Both
9[Reserved]-
10DIO8/SLEEP_
RQ/DTR
11GND-
12SPI_
ATTN/BOOTMODE
13GND-
14SPI_CLKInput
15SPI_SSELInput
16SPI_MOSIInput
Both
Both
Output
Digital I/O 12
Module reset (reset pulse must be at least 200 ns). This
must be driven as an open drain/collector. The device
drives this line low when a reset occurs. Never drive this
line high.
Digital I/O 10 / PWM output 0 / RX signal strength indicator
Digital I/O 11 / PWM output 1
Do not connect
Digital I/O 8 / Pin sleep control line
Ground
SPIAttention. Do not tie low on reset.
Ground
SPI clock
SPI select
SPI Data In
17SPI_MISOOutput
18[Reserved]-
19[Reserved]-
20[Reserved]-
21[Reserved]-
22GND-
23[Reserved]-
24DIO4Both
25DIO7/CTSBoth
26ON/SLEEPOutput
27V
28DIO5/ASSOCBoth
29DIO6/RTSBoth
REF
-
SPI Data Out
Do not connect
Do not connect
Do not connect
Do not connect
Ground
Do not connect
Digital I/O 4
Digital I/O 7 / Clear-to-send flow control
Device sleep status indicator
Feature not supported on this device. Used on other XBee
devices for analog voltage reference.
Digital I/O 5 / Associated indicator
Digital I/O 6 / Request-to-send flow control
XBee S2C DigiMesh 2.4 User Guide
23
HardwareDesign notes
PinNameDirectionFunction
30DIO3/AD3Both
31DIO2/AD2Both
32DIO1/AD1Both
33DIO0/AD0Both
34[Reserved]-
35GND-
36RFBoth
37[Reserved]-
Digital I/O 3 / Analog input 3
Digital I/O 2 / Analog input 2
Digital I/O 1 / Analog input 1
Digital I/O 0 / Analog input 0
Do not connect
Ground
RF connection
Do not connect
Notes
Minimum connections: VCC, GND, DOUT and DIN.
Minimum connections for updating firmware: VCC, GND, DIN, DOUT, RTS and DTR.
The table specifies signal direction with respect to the device.
Use the PR (Pull-up/Down Resistor Enable) command to configure several of the input pull-ups.
You can connect other pins to external circuitry for convenience of operation including the Associate
LED pin (pin 15). The Associate LED flashes differently depending on the state of the device.
Leave any unused pins disconnected.
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.
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
XBee S2C DigiMesh 2.4 User Guide
24
HardwareDesign notes
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, which the following drawings show.
XBee S2C DigiMesh 2.4 User Guide
25
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 S2C DigiMesh 2.4 User Guide
26
HardwareDesign notes
Surface-mount 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.
RF pad version
The RF pad is a soldered antenna connection on the surface-mount device. The RF signal travels from
pin 36 on the module to the antenna through a single ended RF transmission line on the PCB. This line
should have a controlled impedance of 50 Ω.
XBee S2C DigiMesh 2.4 User Guide
27
HardwareDesign notes
For the transmission line, we recommend either a microstrip or coplanar waveguide trace on the PCB.
We provide a microstrip example below, because it is simpler to design and generally requires less
area on the host PCB than coplanar waveguide.
We do not recommend using a stripline RF trace because that requires routing the RF trace to an
inner PCB layer, and via transitions can introduce matching and performance problems.
The following figure shows a layout example of a microstrip connecting an RF pad module to a
through-hole RPSMA RF connector.
n The top two layers of the PCB have a controlled thickness dielectric material in between. The
second layer has a ground plane which runs underneath the entire RF pad area. This ground
plane is a distance d, the thickness of the dielectric, below the top layer.
n The top layer has an RF trace running from pin 36 of the device to the RF pin of the RPSMA
connector. The RF trace's width determines the impedance of the transmission line with
relation to the ground plane. Many online tools can estimate this value, although you should
consult the PCB manufacturer for the exact width. Assuming d = 0.025 in, and that the
dielectric has a relative permittivity of 4.4, the width in this example will be approximately
0.045 in for a 50 Ω trace. This trace width is a good fit with the module footprint's 0.060 in pad
width.
We do not recommend using a trace wider than the pad width, and using a very narrow trace can
cause unwanted RF loss. You can minimize the length of the trace by placing the RPSMA jack close to
the module. All of the grounds on the jack and the module are connected to the ground planes directly
or through closely placed vias. Space any ground fill on the top layer at least twice the distance d (in
this case, at least 0.050 in) from the microstrip to minimize their interaction.
XBee S2C DigiMesh 2.4 User Guide
28
HardwareADC characteristics
NumberDescription
1
250 Ω microstrip trace
3Back off ground fill at least twice the distance between layers 1 and 2
4RF connector
5Stitch vias near the edges of the ground plane
6Pour a solid ground plane under the RF trace on the reference layer
Implementing these design suggestions helps ensure that the RFpad device performs to
specifications.
XBee surface-mount pin 36
ADC characteristics
The following table displays the ADC timing and performance characteristics.
XBee S2C DigiMesh 2.4 User Guide
29
HardwareADC characteristics
ParameterConditionMinTypicalMaxUnits
Internal voltage reference1.171.21.23V
Analog input voltage range
1
0-1.2V
Input impedance1--MΩ
Number of bits10
Differential non-linearity
Integral non-linearity
Codes peak
Codes RMS
Codes peak
Codes RMS
-
0.044
-LSB
0.014
-
0.306
-LSB
0.176
1
Analog input must be within range for valid conversion. Values greater than 1.2 V convert to $3FF.
XBee S2C DigiMesh 2.4 User Guide
30
Configure the XBee/XBee-PRO S2C DigiMesh 2.4 RF
Module
Software libraries32
Configure the device using XCTU32
Over-the-air (OTA) firmware update32
XBee S2C DigiMesh 2.4 User Guide
31
Configure the XBee/XBee-PRO S2C DigiMesh 2.4 RF ModuleSoftware libraries
Software libraries
One way to communicate with the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module is by using a software
library. The libraries available for use with the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module include:
n XBee Java library
n XBee Python library
n XBee ANSI C library
n XBee mbed 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.
The XBee mbed library is a ready-to-import mbed extension that dramatically reduces development
time for XBee projects on mbed platforms.
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 full support of the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module, you must use XCTU version 6.3.2
or higher.
For instructions on downloading and using XCTU, see the XCTU User Guide.
Over-the-air (OTA) firmware update
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module supports OTA firmware updates using XCTU version
6.3.2 or higher. For instructions on performing an OTAfirmware update with XCTU, see How to update
the firmware of your modules in the XCTU User Guide.
XBee S2C DigiMesh 2.4 User Guide
32
Modes
Serial modes34
Transceiver modes36
XBee S2C DigiMesh 2.4 User Guide
33
ModesSerial modes
Serial 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. Use the AP command to choose Serial mode. XBee/XBee-PRO S2C DigiMesh 2.4 RF
Modules use Transparent operation as the default serial mode.
The following modes describe how the serial port sends and receives data.
Transparent operating mode
Devices operate in this mode by default. The device acts as a serial line replacement when it is in
Transparent operating mode. The device queues all UART data it receives through the DIN pin for RF
transmission. When a device receives RF data, it sends the data out through the DOUT pin. You can set
the configuration parameters using Command mode.
Note Transparent operating mode is not available when using the SPI interface; see SPI port.
The device buffers data in the serial receive buffer until one of the following causes the data to be
packetized and transmitted:
n The device receives no serial characters for the amount of time determined by the RO
(Packetization Timeout) parameter. If RO = 0, packetization begins when a character is
received.
n The device receives the Command Mode Sequence (GT + CC + GT). Any character buffered in
the serial receive buffer before the sequence is transmitted.
n The device receives the maximum number of characters that fits in an RF packet (100 bytes).
See NP (Maximum Packet Payload Bytes).
API operating mode
Application programming interface (API) operating mode is an alternative to Transparent mode. It is
helpful in managing larger networks and is more appropriate for performing tasks such as collecting
data from multiple locations or controlling multiple devices remotely. API mode is a frame-based
protocol that allows you to direct data on a packet basis. It can be particularly useful in large
networks where you need control over the operation of the radio network or when you need to know
which node a data packet is from. The device communicates UART or SPI data in packets, also known
as API frames. This mode allows for structured communications with serial devices.
For more information, see API mode overview.
Command mode
Command mode is a state in which the firmware interprets incoming characters as commands. It
allows you to modify the device’s firmware using parameters you can set using AT commands. When
you want to read or set any parameter of the device when operating in Transparent mode, you have
to send an AT command. Every AT command starts with the letters AT followed by the two characters
that identify the command the device issues and then by some optional configuration values.
Enter Command mode
To get a device to switch into this mode, you must issue the following sequence: +++ within one
second. There must be at least one second preceding and following the +++ sequence. Both the
XBee S2C DigiMesh 2.4 User Guide
34
ModesSerial modes
command character (CC) and the silence before and after the sequence (GT) are configurable. When
the device sees a full second of silence in the data stream (the guard time, GT) followed by the string
+++ (without Enter or Return) and another full second of silence (the default time, which you can
change in the GTcommand), it knows to stop sending data and start accepting commands locally.
Note Do not press Return or Enter after typing +++ because it will interrupt the guard time silence
and prevent you from entering Command mode.
When you send the Command mode sequence, the device sends OK out the DOUT pin. The device may
delay sending the OK if it has not transmitted all of the serial data it received.
When the device is in Command mode, it listens for user input and is able to receive AT commands on
the UART. If CT time (default is 10 seconds) passes without any user input, the device drops out of
Command mode and returns to Transparent mode.
You can customize the command character, the guard times and the timeout in the device’s
configuration settings. For more information, see CC (Command Character), CT command and GT
command.
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, the BD parameter = 3 (9600 b/s).
Send AT commands
Once the device enters Command mode, use the syntax in the following figure to send AT commands.
Every AT command starts with the letters AT, which stands for "attention." The AT is followed by two
characters that indicate which command is being issued, then by some optional configuration values.
To read a parameter value stored in the device’s register, omit the parameter field.
The preceding example changes the device's destination address (Low) to 0x1F.
Multiple AT commands
You can send multiple AT commands at a time when they are separated by a comma in Command
mode; for example, ATSH,SL.
Parameter format
Refer to the list of AT commands for the format of individual AT command parameters. Valid formats
for hexidecimal values include with or without a leading 0x for example FFFF or 0xFFFF.
Response to AT commands
When reading parameters, the device returns the current parameter value instead of an OK message.
Apply command changes
Any changes you make to the configuration command registers using AT commands do not take effect
until you apply the changes. For example, if you send the BD command to change the baud rate, the
actual baud rate does not change until you apply the changes. To apply changes:
XBee S2C DigiMesh 2.4 User Guide
35
ModesTransceiver modes
1. Send the AC (Apply Changes) command.
or:
2. Exit Command mode.
Exit Command mode
1. Send the CN (Exit Command Mode) command followed by a carriage return.
or:
2. If the device does not receive any valid AT commands within the time specified by CT
(Command Mode Timeout), it returns to Transparent or API mode. The default Command Mode
Timeout is 10 seconds.
For an example of programming the device using AT Commands and descriptions of each configurable
parameter, see AT commands.
Transceiver modes
The following modes describe how the transceiver sends and receives over-the-air (OTA) data.
Idle mode
When not receiving or transmitting data, the device is in Idle mode. During Idle mode, the device
listens for valid data on both the RF and serial ports.
Transmit mode
Transmit mode is the mode in which the device is transmitting data. This typically happens when data
is received from the serial port.
Receive mode
This is the default mode for the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module. The device is in Receive
mode when it is not transmitting data. If a destination node receives a valid RF packet, the
destination node transfers the data to its serial transmit buffer.
XBee S2C DigiMesh 2.4 User Guide
36
Serial communication
Select a serial port38
UART port38
SPI port40
XBee S2C DigiMesh 2.4 User Guide
37
Serial communicationSelect a serial port
Select a serial port
The device has two serial ports and only one is active at a time. To be active, a port must be enabled
and in use.
The UART is always enabled. The SPI is enabled if it is configured. To be configured, SPI_MISO, SPI_
MOSI, SPI_SSEL , and SPI_CLK must all be configured as peripherals. On the surface-mount device,
these lines are configured as peripherals by setting P5, P6, P7, and P8 to 1. This is also the default
configuration for surface-mount devices.
On the through-hole device, those pins are not available and SPI is disabled by default. Therefore, to
configure the SPI pins on a through-hole device, hold DOUT low during a reset. If the UART is not
hooked up, then DOUT can be treated as an input to force the device into SPI mode. It is best to follow
this special operation by a WR operation so that the SPI port will still be enabled on future resets
without forcing DOUT low.
Once the SPI port is enabled by either means, it is still not active until the external SPI master asserts
SPI_SSEL low. After the SPI port is active, the device continues to use the SPI port until the next reset.
Serial receive buffer
When serial data enters the device through the DIN pin (or the MOSI pin), it stores the data in the
serial receive buffer until the device can process it. Under certain conditions, the device may not be
able to process data in the serial receive buffer immediately. If large amounts of serial data are sent
to the device such that the serial receive buffer would overflow, then it discards new data. If the UART
is in use, you can avoid this by the host side honoring CTS flow control.
Serial transmit buffer
When the device receives RF data, it moves the data into the serial transmit buffer and sends it out
the UART or SPI port. If the serial transmit buffer becomes full and the system buffers are also full,
then it drops the entire RF data packet. Whenever the device receives data faster than it can process
and transmit the data out the serial port, there is a potential of dropping data.
UART port
UART data flow
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module 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 S2C DigiMesh
2.4 RF Module as shown in the following figure. The figure shows system data flow in a UARTinterfaced environment. Low-asserted signals have a horizontal line over the signal name.
XBee S2C DigiMesh 2.4 User Guide
38
Serial communicationUART port
Serial data
A device sends data to the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module's UART through TH pin 3/SMT
pin 4 DIN as an asynchronous serial signal. When the device is not transmitting data, the signals
should idle high.
For serial communication to occur, you must configure the UART of both devices (the microcontroller
and the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module) with compatible settings for the baud rate,
parity, start bits, stop bits, and data bits.
Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high).
The following diagram illustrates the serial bit pattern of data passing through the device. The
diagram shows UART data packet 0x1F (decimal number 31) as transmitted through the device.
Flow control
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module maintains 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.
XBee S2C DigiMesh 2.4 User Guide
39
Serial communicationSPI port
CTS flow control
If you enable CTS flow control (by setting D7 to 1), when the serial receive buffer is 7 bytes away from
being full, the device de-asserts CTS(sets it high) to signal to the host device to stop sending serial
data. The device reasserts CTS after the serial receive buffer has 14 bytes of space. The maximum
space available for receiving serial data is 109 bytes, which is enough to hold 1.5 full packets of data.
Flow control threshold
Use the FT parameter to set the flow control threshold. Since the receive serial buffer is 109 bytes,
you cannot set FT to more than 109-7 = 102 bytes. This allows up to 7 bytes of data to come in after
CTS is de-asserted before data is dropped. The default value of FT is 81, leaving space for an external
device that responds slowly to CTS being de-asserted. The minimum value of FT is 7, which is the
minimal operational level.
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.
If the device sends data out the UART when RTS is de-asserted (set high) the device could send up to
five characters out the UART port after RTS is de-asserted.
SPI port
This section specifies how SPI is implemented on the device, what the SPI signals are, and how full
duplex operations work.
SPI signals
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module supports SPI communications in slave mode. Slave
mode receives the clock signal and data from the master and returns data to the master. The SPI port
uses the following signals on the device:
XBee S2C DigiMesh 2.4 User Guide
40
Serial communicationSPI port
Signal
SPI_MOSI (Master out,
SMT pin#SMT applicable AT
command
16
P6
TH Pin#TH applicable AT
command
11D4
Slave in)
SPI_MISO (Master in,
17
P5
4P2
Slave out)
SPI_SCLK (Serial clock)
SPI_SSEL (Slave select)
SPI_ATTN (Attention)
14
15
12
P8
P7
P9
18D2
17D3
19D1
By default, the inputs have pull-up resistors enabled. On through-hole devices, you can use the PR
command to disable the pull-up resistors. When the SPI pins are not connected but the pins are
configured for SPI operation, then the device requires the pull-ups for proper UART operation.
Signal description
SPI_MISO:When SPI_CLK is active, the device outputs the data on SPI_MISO at the SPI_CLK rate. If
there are other SPI slave devices connected to the same SPI master, then the SPI_MISO output from
XBee device must be externally tri-stated when SPI_SSEL is de-asserted to prevent multiple devices
from driving SPI_MISO.
SPI_MOSI: The SPI master outputs data on this line at the SPI_CLK rate after it selects the desired
slave. When you configure the device for SPI operations, this pin is an input.
SPI_SCLK: The SPI master outputs a clock on this pin, and the rate must not exceed the maximum
allowed, 5 Mb/s. Thissignal clocks data transfers on MOSI and MISO.
SPI_SSEL:The SPI master outputs a low signal on this pin to select the device as an SPI slave. When
you configure the device for SPI operations, this pin is an input. Thissignal enables serial
communication with the slave.
SPI_ATTN: The device asserts this pin low when it has data to send to the SPI master. When you
configure this pin for SPI operations, it is an output (not tri-stated). This signal alerts the master that
the slave has data queued to send. The device asserts this pin as soon as data is available to send to
the SPI master and it remains asserted until the SPI master has clocked out all available data.
SPI parameters
Most host processors with SPI hardware allow you to set the bit order, clock phase and polarity. For
communication with all XBee/XBee-PRO S2C DigiMesh 2.4 RF Modules, the host processor must set
these options as follows:
n Bit order: send MSB first
n Clock phase (CPHA):sample data on first (leading) edge
n Clock polarity (CPOL): first (leading) edge rises
All XBee/XBee-PRO S2C DigiMesh 2.4 RF Modules use SPI mode 0 and MSB first. Mode 0 means that
data is sampled on the leading edge and that the leading edge rises. MSB first means that bit 7 is the
first bit of a byte sent over the interface.
XBee S2C DigiMesh 2.4 User Guide
41
Serial communicationSPI port
SPI and API mode
The SPI only operates in API mode 1. The SPIdoes not support Transparent mode or API mode 2 (with
escaped characters). This means that the AP configuration only applies to the UART interface and is
ignored while using the SPI.
Full duplex operation
When using SPI on the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module the device uses API operation
without escaped characters to packetize data. The device ignores the configuration of AP because SPI
does not operate in any other mode. SPI is a full duplex protocol, even when data is only available in
one direction. This means that whenever a device receives data, it also transmits, and that data is
normally invalid. Likewise, whenever a device transmits data, invalid data is probably received. To
determine whether or not received data is invalid, the firmware places the data in API packets.
SPI allows for valid data from the slave to begin before, at the same time, or after valid data begins
from the master. When the master sends data to the slave and the slave has valid data to send in the
middle of receiving data from the master, a full duplex operation occurs, where data is valid in both
directions for a period of time. Not only must the master and the slave both be able to keep up with
the full duplex operation, but both sides must honor the protocol.
The following figure illustrates the SPI interface while valid data is being sent in both directions.
Slave mode characteristics
In slave mode, the following apply:
n SPI Clock rates up to 5 MHz (5 Mb/s) are possible.
n Data is MSB first.
n It uses Frame Format Mode 0. This means CPOL= 0 (idle clock is low) and CPHA = 0 (data is
sampled on the clock’s leading edge). The picture below diagrams Mode 0.
n The SPI port is setup for API mode and is equivalent to AP = 1.
The following picture shows the frame format for SPI communications.
XBee S2C DigiMesh 2.4 User Guide
42
Serial communicationSPI port
XBee S2C DigiMesh 2.4 User Guide
43
I/O support
Digital I/O line support45
Analog input45
Monitor I/O lines45
I/O line passing49
XBee S2C DigiMesh 2.4 User Guide
44
I/O supportDigital I/O line support
Digital I/O line support
Digital I/O is available on lines DIO0 through DIO12 (D0 - D9 and P0 - P2). Each of these pins may be
configured as 3, 4, or 5 with the following meanings:
n 3 is digital input
n 4 is digital output low
n 5 is digital output high
FunctionPinCommand
DIO0TH pin 20/SMT pin 33
DIO1TH pin 19/SMT pin 32
DIO2TH pin 18/SMT pin 31
DIO3TH pin 17/SMT pin 30
DIO4TH pin 11/SMT pin 24
DIO5TH pin 15/SMT pin 28
DIO6TH pin 16/SMT pin 29
DIO7TH pin 12/SMT pin 25
DIO8TH pin 9/SMT pin 10
DI09
DIO10TH pin 6/SMT pin 7
DIO11TH pin 7/SMT pin 8
DIO12TH pin 4/SMT pin 5
Analog input
Analog input is available on D0 through D3. To use analog input, set these parameters to 2.
D0 (DIO0/AD0)
D1 (DIO1/AD1)
D2 (DIO2/AD2)
D3 (DIO3/AD3)
D4 (DIO4)
D5 (DIO5/ASSOCIATED_INDICATOR)
D6 (DIO6/RTS)
D7 (DIO7/CTS)
D8 (DIO8/DTR/SLEEP_REQUEST)
D9 (ON_SLEEP)
P0 (DIO10/RSSI/PWM0 Configuration)
P1 (DIO11/PWM1 Configuration)
P2 (DIO12/SPI_MISO Configuration)
Monitor I/O lines
You can use 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 an ERROR.
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
XBee S2C DigiMesh 2.4 User Guide
Number of sample sets in the packet. Always set to 1.
45
I/O supportMonitor I/O lines
FieldNameDescription
2Digital
channel
mask
1Analog
channel
mask
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
Variable Sampled
data set
If you issue the IS command using a local or remote AT Command API frame, then the device returns
an AT Command Response (0x88 or 0x97) frame with the I/O data included in the command data
portion of the packet.
ExampleSample AT response
0x01[1 sample set]
0x0C0C[Digital inputs: DIO 2, 3, 10, 11 enabled]
0x03[Analog inputs: A/D 0, 1 enabled]
0x0408[Digital input states: DIO 3, 10 high, DIO 2, 11 low]
0x03D0[Analog input: ADIO 0 = 0x3D0]
0x0124[Analog input: ADIO 1 = 0x120]
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 you 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 AD0 and continues sequentially for
each enabled analog input channel up to AD3.
XBee S2C DigiMesh 2.4 User Guide
46
I/O supportMonitor I/O lines
On demand I/O sampling
You can use the IS (Force Sample) command to sample pins configured as digital I/O and analog input.
If no pins are configured in this manner (with the DO - D8 commands set to 2, 3, 4, or 5), then the IS
command returns an error.
In Command mode, the output is:
OutputDescription
01Indicates one sample. That is the only possibility for Command mode.
20EMask to indicate which lines are sampled (A0, D3, D2, and D1).
00ADigital sample indicates D3 high, D2 low, and D1 high.
3FFAnalog sample for A0 indicates that A0 is reading maximum voltage of 1.2 V.
97 indicates Remote AT Command Response frame (0x97).
01 is the frame ID.
00 13 A2 00 40 E3 C0 15 is the 64-bit source address.
00 00 indicates 16-bit source address.
49 53 (IS) indicates command response to the IS command.
00 indicates the status is OK.
01 indicates the number of samples.
03 3E mask to indicate which lines are sampled (A0, D8, D5, D4, D3, D2, and D1).
01 2A digital sample that indicates that D8 is high, D5 is high, D4 is low, D3 is high, D2 is low,
and D1 is high.
02 10 indicates that A0 has input voltage about half of capacity, where 03 FF would indicate
full voltage of 1.2 V = 1200 mV.
XBee S2C DigiMesh 2.4 User Guide
47
I/O supportMonitor I/O lines
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.
Although samples may be taken every millisecond, IR should be at least 20 milliseconds. This allows
time for OTA transmission and output on the serial port of the receiving device.
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, see Sleep support.
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.
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.
XBee S2C DigiMesh 2.4 User Guide
48
I/O supportI/O line passing
I/O line passing
You can configure XBee/XBee-PRO S2C DigiMesh 2.4 RF Modules to perform analog and digital line
passing. When a device receives an RF I/O sample data packet, you can set up the receiving device to
update any enabled outputs (PWM and DIO) based on the data it receives.
Digital I/O lines are mapped in pairs; pins configured as digital input on the transmitting device affect
the corresponding digital output pin on the receiving device. For example: DI5 (pin 25) can only update
DO5 (pin 25).
For Analog Line Passing, the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module has two PWM output pins
that simulate the voltage measured by the ADC lines AD0 and AD1. For example, when configured as
an ADC, AD0 (pin 33) updates PWM0 (pin 7); AD1 (pin 32) updates PWM1 (pin 8).
The default setup is for outputs to not be updated. Instead, a device sends I/O sample data out the
serial interface in API mode, even if the destination node is not configured for API mode. You can use
the IU command to disable sample data output.
On the destination node, the IU parameter enables the serial port to output I/O samples it receives.
IU is set to 1 by default. If IU is set and the destination node is not in Command mode, it displays
samples it receives on its serial port in API format. The AP parameter is ignored in this case.
To enable updating the outputs, set the IA (I/O Input Address) parameter with the address of the
device that has the appropriate inputs enabled. This effectively binds the outputs to a particular
device’s input. This does not affect the ability of the device to receive I/O line data from other devices only its ability to update enabled outputs. Set the IA parameter to 0xFFFF (broadcast address) to set
up the device to accept I/O data for output changes from any device on the network.
For line passing to function, the device configured with inputs must generate sample data.
I/O line passing details
The same message is received for both I/O sampling and for I/O line passing. But I/O line passing only
occurs if IA matches the address of the sending node or if IA is 0xFFFF to match a sample from any
node. The default value of IA is 0xFFFFFFFFFFFFFFFF, which prevents I/O line passing from occurring
on the node because no node has that address. Additionally, the receiving device must have a
matching value for output. For example, if an ADC0 sample is received, then P0 must be configured
with 2 for PWM output. Otherwise, the analog signal will not be reflected with a matching PWM signal.
Likewise, if the sample indicates that D2 is high, but D2 is not set to 4 or 5 on the receiving device,
then the D2 pin will not be affected by I/O line passing.
When a digital output pin is set to something different than its configured value, that pin may return to
its configured value after the time specified for the corresponding timer. T0 specifies how long D0 will
hold its non-configured value andT1specifies how long D1 will hold its non-configured value (Q1 is for
P1 and so forth). A value of 0 indicates that a pin holds the value of the input of the corresponding
device indefinitely and a value greater than 0xFF specifies how many tenth second units the pin holds
the non-configured value.
For PWM outputs, PT timer applies to both PWM0 and PWM1. A value of 0x00 allows the PWM pin to
output a duty cycle reflective of the analog input indefinitely and a value larger than 0 indicates how
many 10th second units before PWM output reverts to the duty cycle specified by M0 or M1.
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 S2C DigiMesh 2.4 RF Module 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).
Delivery methods
The TO (Transmit Options) command sets the default delivery method that the device uses when in
Transparent mode. In API mode, the TxOptions field of the API frame overrides the TO command, if
non-zero.
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module supports three delivery methods:
n Point-to-multipoint (TO = 0x40).
n Repeater (directed broadcast) (TO = 0x80).
n DigiMesh (TO = 0xC0).
DigiMesh networking
A mesh network is a topology in which each node in the network is connected to other nodes around
it. Each node cooperates in transmitting information. Mesh networking provides these important
benefits:
n Routing. With this technique, the message is propagated along a path by hopping from node to
node until it reaches its final destination.
n Ad-hoc network creation. This is an automated process that creates an entire network of
nodes on the fly, without any human intervention.
XBee S2C DigiMesh 2.4 User Guide
51
NetworkingDelivery methods
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.
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:
XBee S2C DigiMesh 2.4 User Guide
52
NetworkingDelivery methods
n Set DH to 0.
n Set DL to 0xFFFF.
In API operating mode, this sets the destination address to 0x000000000000FFFF.
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:
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.
Route discovery
Route discovery is a process that occurs when:
1. The source node does not have a route to the requested destination.
2. A route fails. This happens when the source node uses up its network retries without receiving
an ACK.
Route discovery begins by the source node broadcasting a route request (RREQ). We call any router
that receives the RREQ and is not the ultimate destination, an intermediate node.
Intermediate nodes may either drop or forward a RREQ, depending on whether the new RREQ has a
better route back to the source node. If so, the node saves, updates and broadcasts the RREQ.
When the ultimate destination receives the RREQ, it unicasts a route reply (RREP) back to the source
node along the path of the RREQ. It does this regardless of route quality and regardless of how many
times it has seen an RREQ before.
This allows the source node to receive multiple route replies. The source node selects the route with
the best round trip route quality, which it uses for the queued packet and for subsequent packets with
the same destination address.
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.
XBee S2C DigiMesh 2.4 User Guide
53
NetworkingDelivery methods
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.
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.
Repeater/directed broadcast
All of the routers in a network receive and repeat directed broadcast transmissions. Because it does
not use ACKs, the originating node sends the broadcast multiple times. By default a broadcast
transmission is sent four times—the extra transmissions become automatic retries without
acknowledgments. This results in all nodes repeating the transmission four times. Sending frequent
broadcast transmissions can quickly reduce the available network bandwidth, so use broadcast
transmissions sparingly.
MAC layer
The MAC layer is the building block that is used to build repeater capability. To implement Repeater
mode, we use a network layer header that comes after the MAC layer header in each packet. In this
network layer there is additional packet tracking to eliminate duplicate broadcasts.
In this delivery method, the device sends both unicast and broadcast packets out as broadcasts that
are always repeated. All repeated packets are sent to every device. The devices that receive the
broadcast send broadcast data out their serial port.
When a device sends a unicast, it specifies a destination address in the network header. Then, only the
device that has the matching destination address sends the unicast out its serial port. This is called a
directed broadcast.
Any node that has a CE parameter set to router rebroadcasts the packet if its BH (broadcast hops) or
broadcast radius values are not depleted. If a node has already seen a repeated broadcast, it ignores
the broadcast.
The NH parameter sets the maximum number of hops that a broadcast transmission is repeated. The
device always uses the NH value unless you specify a BH value that is smaller.
By default the CE parameter is set to route all broadcasts. As such, all nodes that receive a repeated
packet will repeat it. If you change the CE parameter, you can limit which nodes repeat packets, which
helps dense networks from becoming overly congested while packets are being repeated.
Transmission timeout calculations for Repeater/directed broadcast mode are the same as for
DigiMesh broadcast transmissions.
Point-to-multipoint
To select point-to-multipoint, set the transmit options to 0x40.
In Transparent mode, use the TO (Transmit Options)command to set the transmit options.
In API mode, use the Transmit Request (0x10) and Explicit Addressing Command (0x11) frames to set
the transmit options. However, if the transmit options in the API frame are zero, then the transmit
options in the TO command apply.
XBee S2C DigiMesh 2.4 User Guide
54
NetworkingEncryption
Point-to-multipoint transmissions occur between two adjacent nodes within RF range. No route
discovery and no routing occur for these types of transmissions. The networking layer is entirely
skipped.
Point-to-multipoint has an advantage over DigiMesh for two adjacent devices due to less overhead.
However, it cannot work over multiple hops.
Encryption
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module supports AES 128-bit encryption. 128-bit encryption
refers to the length of the encryption key entered with the KY command (128 bits = 16 bytes). The
802.15.4 protocol specifies eight security modes, enumerated as shown in the following table.
Level NameEncrypted?
0N/ANo0 (no check)0
1MIC-32No49
2MIC-64No813
3MIC-128No1621
4ENCYes0 (no check)5
5ENC-MIC-32Yes49
6ENC-MIC-64Yes813
7ENC-MIC-128 Yes1621
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module only supports security levels 0 and 4. It does not
support message integrity checks. EE 0 selects security level 0 and EE 1 selects security level 4. When
using encryption, all devices in the network must use the same 16-byte encryption key for valid data
to get through. Mismatched keys will corrupt the data output on the receiving device. Mismatched EE
parameters will prevent the receiving device from outputting received data.
Maximum payload
There is a maximum payload that you can send at one time. Use the NP (Maximum Packet Payload
Bytes) command to read the device's maximum payload.
These maximums only apply in API mode. If you attempt to send an API packet with a larger payload
than specified, the device responds with a Transmit Status frame (0x89) with the Status field set to 74
(Data payload too large).
In Transparent mode, the firmware splits the data as necessary to cope with maximum payloads.
Length of message integrity
check
Packet length
overhead
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.
XBee S2C DigiMesh 2.4 User Guide
55
NetworkingDigiMesh throughput
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.
XBee S2C DigiMesh 2.4 User Guide
56
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 configuration58
Remote configuration58
Establish and maintain network links59
RSSI indicators63
Associate LED63
The Commissioning Pushbutton64
Node discovery65
XBee S2C DigiMesh 2.4 User Guide
57
Network commissioning and diagnosticsLocal configuration
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 frame - 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:
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.
XBee S2C DigiMesh 2.4 User Guide
58
Network commissioning and diagnosticsEstablish and maintain network links
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 issue 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 frame - 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.
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.
XBee S2C DigiMesh 2.4 User Guide
59
Network commissioning and diagnosticsEstablish and maintain network links
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 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
The address the device uses to test its link. For this example, use the
device A address.
maximum payload size for the device.
4000.
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:
XBee S2C DigiMesh 2.4 User Guide
60
Network commissioning and diagnosticsEstablish and maintain network links
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 S2C DigiMesh 2.4 User Guide
61
Network commissioning and diagnosticsEstablish and maintain network links
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.
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 and 0x11) frames contain a trace route option, which transmits routing
information packets to the originator of the unicast using the intermediate nodes.
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 Timestamp
n Other link quality information.
For a full description of the Route Information Packet frame, see Route Information Packet frame -
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.
XBee S2C DigiMesh 2.4 User Guide
62
Network commissioning and diagnosticsRSSI indicators
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.
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. Set PO to 1 to enable the RSSI pulse-width modulation (PWM) functionality.
2. Use the DIO10/RSSI/PWM0 module pin (pin 6 in through-hole, pin 7 in surface-mount). 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.
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 pin functions as a power indicator.
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 of 250 ms.
The following table describes the Associate LED functionality.
Sleep modeLED StatusMeaning
0On, blinkingThe device has power and is operating properly
1, 4, 5OffThe device is asleep
1, 4, 5On, blinkingThe device has power, is awake and is operating properly
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,
XBee S2C DigiMesh 2.4 User Guide
63
Network commissioning and diagnosticsThe Commissioning Pushbutton
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.
The Commissioning Pushbutton
The XBee/XBee-PRO S2C DigiMesh 2.4 RF Module 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.
Button
pressesAction
1Immediately 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.
1If the device is configured for asynchronous sleep, this wakes it 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.
4Sends an RE command to restore device parameters to default values.
XBee S2C DigiMesh 2.4 User Guide
64
Network commissioning and diagnosticsNode discovery
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 frame - 0x95 is similar to Remote Command Response frame - 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.
Node discovery
Node discovery has three variations as shown in the following table:
CommandsSyntaxDescription
Node Discovery
Directed Node
Discovery
Destination Node
The node discovery command (without an NI string designated) sends out a broadcast to every node
in the Network ID. Each node in the network sends a response back to the requesting node.
When the node discovery command is issued in Command mode, all other AT commands are inhibited
until the node discovery command times out, as determined by the N? parameter. After the timeout,
an extra CR is output to the terminal window, indicating that new AT commands can be entered. This
is the behavior whether or not there were any nodes that responded to the broadcast.
When the node discovery command is issued in API mode, the behavior is the same except that the
response is output in API mode. If no nodes respond, there will be no responses at all to the node
discover command. The requesting node is not able to process a new AT command until N? times out.
ND
ND <NI
String>
DN <NI
String>
Seeks to discover all nodes in the network (on the current
Network ID).
Seeks to discover if a particular node named <NI String> is found
in the network.
Sets DH/DL to point to the MAC address of the node whose <NI
String> matches.
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 command.
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.
XBee S2C DigiMesh 2.4 User Guide
65
Network commissioning and diagnosticsNode discovery
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).
Directed node discovery
The directed node discovery command (ND with an NI string parameter) sends out a broadcast to find
a node in the network with a matching NI string. If such a node exists, it sends a response with its
information back to the requesting node.
In Transparent mode, the requesting node outputs an extra carriage return following the response
from the designated node and the command terminates; it is then ready to accept a new AT
command. In the event that the requested node does not exist or is too slow to respond, the
requesting node outputs an ERROR response after N? expires.
In API mode, the response from the requesting node will be output in API mode and the command will
terminate immediately. If no response comes from the requested node, the requesting node outputs
an error response in API mode after N? expires. The device's software assumes that each node has a
unique NI string.
The directed node discovery command terminates after the first node with a matching NI string
responds. If that NI string is duplicated in multiple nodes, the first responding node may not always be
the same node or the desired node.
Destination Node
The Destination Node command (DN with an NI string parameter) sends out a broadcast containing
the NI string being requested. The responding node with a matching NI string sends its information
back to the requesting node. The local node then sets DH/DL to match the address of the responding
node. As soon as this response occurs, the command terminates successfully. If the device is in AT
command mode, an OK string is output and command mode exits. In API mode, you may enter
another AT command.
If an NI string parameter is not provided, the DN command terminates immediately with an error. If a
node with the given NI string does not respond, the DN command terminates with an error after N?
times out.
In Transparent mode, unlike ND (with or without an NI string), DN does not cause the information
from the responding node to be output; rather it simply sets DH/DL to the address of the responding
node.
In API mode, the response from the requesting node outputs in API mode and the command
terminates immediately. If no response comes from the requested node, the requesting node outputs
an error response in API mode after N? expires.
The device's software assumes that each node has a unique NI string. The directed destination node
command terminates after the first node with a matching NI string responds. If that NI string is
duplicated in multiple nodes, DH/DL may not be set to the desired value.
Discover devices within RF range
The FN (Find Neighbor) command works the same as the ND (Node Discovery) except that it is limited
to neighboring devices (devices that are only one hop away). See FN (Find Neighbors) for details.
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.
XBee S2C DigiMesh 2.4 User Guide
66
Network commissioning and diagnosticsNode discovery
You can send FN locally on a device in Command mode or you can use a local AT Command frame -
0x08.
To use FN remotely, send the target node a Remote AT Command Request frame - 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 AT
Command Response frame - 0x88.
The FN (Find Neighbors) command
The FN (Find Neighbors) command works exactly the same as the ND (Network Discover)command
except that it is limited to neighboring devices (devices that are only one hop away). See FN (Find
Sleep modes enable the device to enter states of low-power consumption when not in use. In order to
enter Sleep mode, one of the following conditions must be met (in addition to the device having a nonzero SM parameter value):
n SLEEP_RQ/DTR (pin 9 on through-hole devices, pin 10 on surface-mount devices) is asserted
and the device is in a pin sleep mode (SM = 1, or 5)
n The device is idle (no data transmission or reception) for the amount of time defined by the ST
(Time before Sleep) parameter.
Note ST is only active when SM = 4 or 5.
The following table shows the sleep mode configurations.
Sleep modeDescription
SM 0No sleep
SM 1Pin sleep
SM 4Cyclic sleep
SM 5Cyclic sleep with pin wake-up
Pin Sleep mode (SM = 1)
Pin Sleep mode minimizes quiescent power (power consumed when in a state of rest or inactivity).
This mode is voltage level-activated; when Sleep_RQ (pin 9 for through-hole, pin 10 for surface-mount)
is asserted, the device finishes any transmit or receive activities, enters Idle mode, and then enters a
state of sleep. The device does not respond to either serial or RF activity while in pin sleep.
To wake a sleeping device operating in Pin Sleep mode, de-assert Sleep_RQ. The device wakes when
Sleep_RQ is de-asserted and is ready to transmit or receive when the CTS line is low. When waking
the device, the pin must be de-asserted at least two 'byte times' after CTS goes low. This assures that
there is time for the data to enter the DI buffer.
Cyclic Sleep mode (SM = 4)
The Cyclic Sleep modes allow devices to periodically check for RF data. When the SM parameter is set
to 4, the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module is configured to sleep, then wakes once per
cycle to check for data from a messaging coordinator. The Cyclic Sleep Remote sends a poll request to
the messaging coordinator at a specific interval set by the SP (Cyclic Sleep Period) parameter. The
messaging coordinator transmits any queued data addressed to that specific remote upon receiving
the poll request.
If no data is queued for the remote, the messaging coordinator does not transmit and the remote
returns to sleep for another cycle. If queued data is transmitted back to the remote, it stays awake to
allow for back and forth communication until the ST (Time before Sleep) timer expires.
If configured, CTS goes low each time the remote wakes, allowing for communication initiated by the
remote host if desired. If ON_SLEEP is configured it goes high (ON) after SN (Number of Cycles
Between ON_SLEEP ) sleep periods. Change SN to allow external circuitry to sleep for longer periods if
no data is received.
XBee S2C DigiMesh 2.4 User Guide
69
Sleep supportSleep parameters
Cyclic Sleep with Pin Wake-up mode (SM = 5)
Use this mode to wake a sleeping remote device through either the RF interface or by de-asserting
SLEEP_RQ for event-driven communications. The cyclic sleep mode works as described previously with
the addition of a pin-controlled wake-up at the remote device. The SLEEP_RQ pin is level-triggered.
The device wakes when a low is detected then set CTS low as soon as it is ready to transmit or
receive.
Any activity resets the ST (Time before Sleep) timer, so the device goes back to sleep only after there
is no activity for the duration of the timer. Once the device wakes (pin-controlled), it ignores further
pin activity. The device transitions back into sleep according to the ST time regardless of the state of
the pin.
Sleep parameters
The following AT commands are associated with the sleep modes. See the linked commands for the
parameter's description, range and default values.
n SM command
n SN command
n SO command
n ST (Wake Time)
n SP (Sleep Time)
n WH (Wake Host Delay)
Sleep current
The following table shows the sleep current during the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module
sleep modes.
Sleep mode
Pin sleep
Cyclic sleep
Cyclic sleep with pin wake-up
You can make devices use low sleep current by driving PWM outputs high during sleep and by using
internal pull-ups/pull-downs on disabled/unused pins. The sleep pins are set up for sleeping as
specified in Sleep pins. Additionally, pins that are outputs (other than PWM outputs) continue to output
the same levels during sleep. Normally, this means that pins configured for output high or low will
output high or low accordingly. However, if the output is overridden by I/O line passing, then the
overridden output level is maintained during the sleep time.
SM command setting
1
4
5
Sleep current
<1 µA @ 25ºC
<1 µA @ 25ºC
<1 µA @ 25ºC
Sleep pins
The following table describes the three external device pins associated with sleep.
XBee S2C DigiMesh 2.4 User Guide
70
Sleep supportIndirect messaging and polling
Pin
Pin name
number Description
SLEEP_RQTH pin
9/SMT
pin 10
CTSTH pin
12/SMT
pin 25
ON_
SLEEP
TH pin
13/SMT
pin 26
For SM = 1, high puts the device to sleep and low wakes it up. For SM = 5, a
high to low transition wakes the device up for ST time. The device ignores a
low to high transition in SM = 5.
If D7 = 1, high indicates that the device is asleep and low indicates that it is
awake and ready to receive serial data.
Low indicates that the device is asleep and high indicates that it is awake and
ready to receive serial data.
Indirect messaging and polling
Indirect messaging
Indirect messaging is a communication mode designed for communicating with asynchronous
sleeping devices. A device can enable indirect messaging by making itself an indirect messaging
coordinator with the CE command. An indirect messaging coordinator does not immediately transmit
a P2MP unicast when it is received over the serial port. Instead the device holds onto the data until it
is requested via a poll. On receiving a poll, the indirect messaging coordinator sends a queued data
packet (if available) to the requestor.
Because it is possible for a polling device to be eliminated, a mechanism is in place to purge
unrequested data packets. If the coordinator holds an indirect data packet for an indirect messaging
poller for more than 2.5 times its SP value, then the packet is purged. We suggest setting the SP of
the coordinator to the same value as the highest SP time that exists among the pollers in the
network. If the coordinator is in API mode, a TxStatus message is generated for a purged data packet
with a status of 0x75 (INDIRECT_MESSAGE_UNREQUESTED).
An indirect messaging coordinator queues up as many data packets as it has buffers available. After
the coordinator uses all of its available buffers, it holds transmission requests unprocessed on the
serial input queue. After the serial input queue is full, the device de-asserts CTS (if hardware flow
control is enabled). After receiving a poll or purging data from the indirect messaging queue the
buffers become available again.
Indirect messaging only functions with P2MP unicast messages. Indirect messaging has no effect on
P2MP broadcasts, directed broadcasts, repeater packets, or DigiMesh packets. These messages are
sent immediately when received over the serial port and are not put on the indirect messaging queue.
Polling
Polling is the automatic process by which a node can request data from an indirect messaging
coordinator. To enable polling on a device, configure it as an indirect messaging poller with the CE
command and set its DH:DL registers to match the SH:SL registers of the device that will function as
the Indirect Messaging Coordinator. When you enable polling, the device sends a P2MP poll request
regularly to the address specified by the DH:DL registers. When the device sends a P2MP unicast to
the destination specified by the DH:DL of a polling device, the data also functions as a poll.
When a polling device is also an asynchronous sleeping device, that device sends a poll shortly after
waking from sleep. After that first poll is sent, the device sends polls in the normal manner described
previously until it returns to sleep.
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 command
Restore device parameters to factory defaults.
Parameter range
N/A
Default
N/A
AC (Apply Changes)
Immediately applies new settings without exiting Command mode.
Parameter range
N/A
Default
N/A
WR command
Writes parameter values to non-volatile memory so that parameter modifications persist through
subsequent resets.
Writing parameters to non-volatile memory does not apply the changes immediately. However, since
the device uses non-volatile memory to determine initial configuration following reset, the written
parameters are applied following a reset.
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 S2C DigiMesh 2.4 User Guide
73
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
two addressing configurations available to the device. The other configuration is the Network ID (ID
command).
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 (XBee)
0x0C - 0x17 (XBee-PRO)
Default
0xC (12 decimal)
ID (Network ID)
Set or read the user network identifier.
Devices can only communicate with other devices that have the same network identifier and channel
configured.
If using Original equipment manufacturer (OEM) network IDs, 0xFFFF uses the factory value.
Parameter range
0 - 0xFFFF
Default
0x7FFF
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)
XBee S2C DigiMesh 2.4 User Guide
74
AT commandsMAC/PHY commands
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
PL (TX Power Level)
Sets or displays the power level at which the device transmits conducted power.
For XBee, PL = 4, PM = 1 is tested at the time of manufacturing. Other power levels are approximate.
On channel 26, transmitter power will not exceed -4 dBm.
Parameter range
0 - 4
The following table shows the TX power versus the PL setting.
XBee modules
PL settingPM settingChannel(s)TX power* (dBm)
4111 to 258
4011 to 255
3111 to 256
3011 to 253
2111 to 254
2011 to 251
1111 to 252
1011 to 25-1
0111 to 25-2
0011 to 25-5
X126-5
X026-8
* Highest power level is tested during manufacturing. Other power levels are approximate.
XBee-PRO modules
XBee S2C DigiMesh 2.4 User Guide
75
AT commandsMAC/PHY commands
PL settingChannel(s)TX power* (dBm)
012 to 230
112 to 2312
212 to 2315
312 to 2316
412 to 2318
* Highest power level is tested during manufacturing. Other power levels are approximate.
Default
4
PM (Power Mode)
Set or read the power mode of the device. Enabling boost mode improves the receive sensitivity by
2dB and increase the transmit power by 3dB.
Parameter range
0 - 1
Setting Meaning
0Boost mode disabled
1Boost mode enabled
Default
1
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.
Note If device is operating in Europe, this value must be set to 0x34 to comply with EN 300 328 Listen
Before Talk requirements. Alternatively the device can be set to PL3 as explained in Europe.
Parameter range
0, 0x28 - 0x50
Default
0x0 (CCA disabled)
XBee S2C DigiMesh 2.4 User Guide
76
AT commandsMAC/PHY commands
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
0xA (10 ms)
TP (Board Temperature)
The current module temperature in degrees Celsius in 8-bit two’s compliment format. For example
0x1A = 26 °C, and 0xF6 = -10 °C.
Note This command is only available on the XBee-PRO device.
Parameter range
This is a read-only parameter
Default
N/A
%V (Voltage Supply Monitoring)
Displays the supply voltage of the device in mV units.
Parameter range
This is a read-only parameter
Default
N/A
%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.
The time to send a unicast between two nodes in the network should not exceed the product of the
unicast one hop time (%H) and the number of hops between those two nodes.
Parameter range
[read-only]
Default
N/A
XBee S2C DigiMesh 2.4 User Guide
77
AT commandsMAC/PHY commands
%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.
The time to send a broadcast between two nodes in the network should not exceed the product of the
broadcast one hop time (%8) and the number of hops between those two nodes.
Parameter range
[read-only]
Default
N/A
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 S2C DigiMesh 2.4 RF Module has been reset and has not yet received a packet,
DB reports 0.
This value is volatile (the value does not persist in the device's memory after a power-up sequence).
Parameter range
N/A
Default
0
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
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).
XBee S2C DigiMesh 2.4 User Guide
78
AT commandsMAC/PHY commands
Parameter range
0 - 0xFFFF
Default
N/A (0 after reset)
BC (Bytes Transmitted)
The number of RF bytes transmitted. The firmware counts every byte of every packet, including
MAC/PHY headers and trailers.
You can reset the counter to any 32-bit value by appending a hexadecimal parameter to the
command.
Parameter range
0 - 0xFFFFFFFF
Default
N/A (0 after reset)
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
0 - 0xFFFF
Default
N/A (0 after reset)
EC (CCA Failures)
Sets or displays the number of frames that were blocked and not sent due to CCA failures or
receptions in progress. If CCA is disabled (CA is 0), then this count only increments for frames that are
blocked due to receive in progress. When this count reaches its maximum value of 0xFFFF, it stops
counting.
You can reset EC to 0 (or any other value) at any time to make it easier to track errors.
Parameter range
0 - 0xFFFF
Default
N/A (0 after reset)
XBee S2C DigiMesh 2.4 User Guide
79
AT commandsNetwork commands
TR (Transmission Failure Count)
This count increments whenever a MAC transmission attempt exhausts all MAC retries without ever
receiving a MAC acknowledgment message from the destination node. Once the number reaches
0xFFFF, it does not count further events.
To reset the counter to any 16-bit value, append a hexadecimal parameter to the command.
This value is volatile (the value does not persist in the device's memory after a power-up sequence).
Parameter range
0 - 0xFFFF
Default
N/A (0 after reset)
Network commands
The following commands are network commands.
CE (Routing / Messaging Mode)
The routing and messaging mode of the device.
A routing device repeats broadcasts. Indirect Messaging Coordinators do not transmit point-tomultipoint unicasts until an end device requests them. Setting a device as a poller causes it to
regularly send polls to its Indirect Messaging Coordinator. Nodes can also be configured to route, or
not route, multi-hop packets.
Parameter range
0 - 6
ParameterDescriptionRoutes packets
0Standard routerYes
1Indirect message coordinatorYes
2Non-routing deviceNo
3Non-routing coordinatorNo
4Indirect message pollerYes
5N/AN/A
6Non-routing pollerNo
Default
0
TO (Transmit Options)
The bitfield that configures the transmit options for Transparent mode.
The device's transmit options. The device uses these options for all transmissions. API transmissions
can override this using the TxOptions field in the API frame.
XBee S2C DigiMesh 2.4 User Guide
80
AT commandsNetwork commands
Parameter range
0 - 0xFF
BitMeaningDescription
6,7Delivery method
5Reserved<set this bit to 0>
4Reserved<set this bit to 0>
3Trace RouteEnable a Trace Route on all DigiMesh API packets
2NACKEnable a NACK messages on all DigiMesh API packets
1Disable RDDisable Route Discovery on all DigiMesh unicasts
0Disable ACKDisable acknowledgments on all unicasts
Example 2: Set TO to 0xC1 to send transmissions using DigiMesh, with network acknowledgments
disabled.
When you set BR to 0 the TO option has the DigiMesh and Repeater mode disabled automatically.
The maximum transmission hops for broadcast data transmissions.
If you set BH greater than NH, the device uses the value of NH.
When working in API mode, the Broadcast Radius field in the API frame is used instead of this
configuration.
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)
XBee S2C DigiMesh 2.4 User Guide
81
AT commandsAddressing commands
Default
7
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 command
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 S2C DigiMesh 2.4 User Guide
82
AT commandsAddressing commands
SL command
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 command
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.
0x000000000000FFFF is the broadcast address. It is also used as the polling address when the device
functions as end device.
Parameter range
0 - 0xFFFFFFFF
Default
0
DL command
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. It is also used as the polling address when the device
functions as end device.
Parameter range
0 - 0xFFFFFFFF
Default
0xFFFF
CI (Cluster ID)
The application layer cluster ID value. The device uses this value as the cluster ID for all data
transmissions in Transparent mode and for all transmissions performed with the Transmit Request
frame - 0x10 in API mode. In APImode, transmissions performed with the Explicit Addressing
Command frame - 0x11 ignore this parameter.
If you set this value to 0x12 (loopback Cluster ID), the destination node echoes any transmitted
packet back to the source device.
XBee S2C DigiMesh 2.4 User Guide
83
AT commandsDiagnostic commands
Parameter range
0 - 0xFFFF
Default
0x11 (Transparent data cluster ID)
Diagnostic commands
The following AT commands are diagnostic commands. Diagnostic commands are typically volatile and
will not persist across a power cycle.
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.
Parameter range
Any 64-bit address
Default
N/A
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.
Parameter range
0 - 0x03 (bit field)
Default
0
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:
XBee S2C DigiMesh 2.4 User Guide
84
AT commandsDiagnostic commands
1. The requesting node setsDL and DH to the address of the device with the matching NI string.
The address selected (either 16-bit short address or 64-bit extended address) is chosen based
on the destination device's MY command configuration.
2. The requesting node returns OK (or ERROR).
3. The requesting node 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 frame - 0x08:
1. The requesting node returns 0xFFFE followed by its 64-bit extended addresses in an AT
Command Response frame - 0x88.
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
ND (Network Discover)
Discovers and reports all of the devices it finds on a network. If you send ND through a local or remote
API frame, each network node returns a separate AT Command Response (0x88) or Remote
Command Response (0x97) frame, respectively.
The command reports the following information after a jittered time delay.
DIGI DEVICE TYPE<CR> (4 Bytes. Optionally included based on NO settings.)
RSSI OF LAST HOP<CR> (1 Byte. Optionally included based on NO settings.)
<CR>
If you send the FN command in Command mode, after (NT*100) ms + overhead time, the command
ends by returning a carriage return, represented by <CR>.
The ND command accepts an NI (Node Identifier) as an argument. For more details, see Directed node
discovery.
Broadcast an ND command to the network. If the command includes an optional node identifier string
parameter, only those devices with a matching NI string respond without a random offset delay. If the
command does not include a node identifier string parameter, all devices respond with a random
offset delay.
The NT setting determines the range of the random offset delay. The NO setting sets options for the
Node Discovery.
For more information about options that affect the behavior of the ND command Refer to the
description of the NO command for options which affect the behavior of the ND command.
XBee S2C DigiMesh 2.4 User Guide
85
AT commandsDiagnostic commands
WARNING! If the NT setting is small relative to the number of devices on the network,
responses may be lost due to channel congestion. Regardless of the NT setting, because
the random offset only mitigates transmission collisions, getting responses from all
devices in the network is not guaranteed.
Parameter range
20-byte printable ASCIIstring
Default
[read-only]
FN (Find Neighbors)
Discovers and reports all devices found within immediate (1 hop) RF range. FN reports the following
information for each device it discovers:
DIGI DEVICE TYPE<CR> (4 Bytes. Optionally included based on NO settings.)
RSSI OF LAST HOP<CR> (1 Byte. Optionally included based on NO settings.)
<CR>
If you send the FN command in Command mode, after (NT*100) ms + overhead time, the command
ends by returning a carriage return, represented by <CR>.
If you send the FN command through a local AT Command (0x08) 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.
FN accepts a NI (Node Identifier) as an argument.
See The FN (Find Neighbors) command for more details.
Parameter range
0 to 20 ASCII characters
Default
N/A
NI command
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.
XBee S2C DigiMesh 2.4 User Guide
86
AT commandsDiagnostic commands
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.
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 and FN commands use NT. The read-only N? command increases and decreases with NT.
Parameter range
0x20 - 0x2EE0 (x 100 ms)
Default
0x82 (13 seconds)
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
This is a read-only parameter, however, its value increases or decreases as NT increases or
decreases and you can modify NT.
Default
N/A
NO (Network Discovery Options)
Set or read the network discovery options value for the ND (Network Discovery) command on a
particular device. The options bit field value changes the behavior of the ND command and what
optional values the local device returns when it receives an ND command or API Node Identification
Indicator (0x95)frame.
Use NOto suppress or include a self-response to ND (Node Discover) commands. When NO bit 1 = 1, a
device performing a Node Discover includes a response entry for itself.
Parameter range
0x0 - 0x7 (bit field)
XBee S2C DigiMesh 2.4 User Guide
87
AT commandsSecurity commands
Bit field
Option Description
0x01
0x02
0x04
Default
Append the DD (Digi Device Identifier) value to ND responses or API node identification
frames.
Local device sends ND response frame out the serial interface when ND is issued.
Append the RSSI of the last hop to ND, FN, and responses or API node identification
frames.
0x0
Security commands
The following AT commands are security commands.
EE (Encryption Enable)
Enables or disables 128-bit 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 16-byte 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
0
XBee S2C DigiMesh 2.4 User Guide
88
AT commandsSerial interfacing commands
Serial interfacing commands
The following AT commands are serial interfacing commands.
BD (Baud Rate)
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 - 0x8
Non-standard baud rates: 0x4B0 - 0x3D090
ParameterDescription
0x01200 b/s
0x12400 b/s
0x24800 b/s
0x39600 b/s
0x419200 b/s
0x538400 b/s
0x657600 b/s
0x7115200 b/s
0x8230400 b/s
0x4B0 to 0x3D090 (non-standard baud rates)
Default
0x03 (9600 b/s)
NB (Parity)
Set or read the serial parity settings for UART communications.
Parameter range
0x00 - 0x03
ParameterDescription
0x00No parity
XBee S2C DigiMesh 2.4 User Guide
89
AT commandsSerial interfacing commands
ParameterDescription
0x01Even parity
0x02Odd parity
0x03
Default
0x00
Mark parity (forced high)
RO command
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
0x07 - 0x66 bytes
Default
0x51
AP (API Enable)
Set or read the API mode setting. The device can format the RF packets it receives into API frames
and send them out the serial port.
When you enable API, you must format the serial data as API frames because Transparent operating
mode is disabled.
Parameter range
0 - 2
ParameterDescription
0API disabled (operate in Transparent mode)
XBee S2C DigiMesh 2.4 User Guide
90
AT commandsI/O settings commands
ParameterDescription
1API enabled
2API enabled (with escaped control characters)
Default
0
AO command
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 command
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.
Parameter range
1, 4
Default
N/A
D0 (DIO0/AD0)
Sets or displays the DIO0/AD0 configuration (TH pin 20/SMT pin 33).
Parameter range
0 - 5
XBee S2C DigiMesh 2.4 User Guide
91
AT commandsI/O settings commands
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 (TH pin 19/SMT pin 32).
Parameter range
0 - 5
ParameterDescription
0Disabled
1
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
SPI_ATTN for the through-hole device
N/A for the surface-mount device
D2 (DIO2/AD2)
Sets or displays the DIO2/AD2 configuration (TH pin 18/SMT pin 31).
Parameter range
0 - 5
ParameterDescription
0Disabled
XBee S2C DigiMesh 2.4 User Guide
92
AT commandsI/O settings commands
ParameterDescription
1
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
SPI_CLKfor through-hole devices
N/A for surface-mount devices
D3 (DIO3/AD3)
Sets or displays the DIO3/AD3 configuration (TH pin 17/SMT pin 30).
Parameter range
0 - 5
ParameterDescription
0Disabled
1
2ADC
3Digital input
4Digital output, low
5Digital output, high
Default
0
SPI_SSEL for the through-hole device
N/A for surface-mount device
D4 (DIO4)
Sets or displays the DIO4 configuration (TH pin 11/SMT pin 24).
Parameter range
0, 2 - 5
0 - 5
ParameterDescription
0Disabled
XBee S2C DigiMesh 2.4 User Guide
93
AT commandsI/O settings commands
ParameterDescription
1
2DI04
3Digital input
4Digital output, low
5Digital output, high
Default
0
SPI_MOSI for the through-hole device
N/A for the surface-mount device
D5 (DIO5/ASSOCIATED_INDICATOR)
Sets or displays the DIO5/ASSOCIATED_INDICATOR configuration (TH pin 15/SMT pin 28).
Parameter range
0 - 5
ParameterDescription
0Disabled
1
2DIO5/ASSOCIATED_INDICATOR
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 (TH pin 16/SMT pin 29).
Parameter range
0, 1, 3 - 5
ParameterDescription
0Disabled
1
RTS flow control
XBee S2C DigiMesh 2.4 User Guide
94
AT commandsI/O settings commands
ParameterDescription
2N/A
3Digital input
4Digital output, low
5Digital output, high
Default
0
D7 (DIO7/CTS)
Sets or displays the DIO7/CTS configuration (TH pin 12/SMT pin 25).
Parameter range
0, 1, 3 - 7
ParameterDescription
0Disabled
1
2N/A
3Digital input
4Digital output, low
5Digital output, high
6RS-485 Tx enable, low Tx (0 V on transmit, high when idle)
7RS-485 Tx enable high, high Tx (high on transmit, 0 V when idle)
Default
0x1
CTSflow control
D8 (DIO8/DTR/SLEEP_REQUEST)
Sets or displays the DIO8/DTR/SLP_RQ configuration (TH pin 9/SMT pin 10).
Parameter range
0, 1, 3 - 5
ParameterDescription
0Disabled
1SLEEP_REQUEST input
XBee S2C DigiMesh 2.4 User Guide
95
AT commandsI/O settings commands
ParameterDescription
2N/A
3Digital input
4Digital output, low
5Digital output, high
Default
1
D9 (ON_SLEEP)
Sets or displays the ON/SLEEP configuration (TH pin 13/SMT pin 26).
Parameter range
0, 1, 3 - 5
ParameterDescription
0Disabled
1
2N/A
3Digital input
4Digital output, low
5Digital output, high
Default
1
ON/SLEEP output
P0 (DIO10/RSSI/PWM0 Configuration)
Sets or displays the RSSI/PWM0 configuration (TH pin 6/SMT pin 7).
When configured as a PWM output, you can use M0 to set the PWM duty cycle.
Parameter range
0 - 5
ParameterDescription
0Disabled
1RSSI PWM output
2
XBee S2C DigiMesh 2.4 User Guide
PWM0 output. Value is controlled by M0 parameter or by I/O line passing.
96
AT commandsI/O settings commands
ParameterDescription
3Digital input
4Digital output, low
5Digital output, high
Default
1
P1 (DIO11/PWM1 Configuration)
Sets or displays the DIO11/PWM1 configuration (TH pin 7/SMT pin 8).
Parameter range
0 - 5
ParameterDescription
0Disabled
1N/A
2
3Digital input
4Digital output, low
5Digital output, high
Default
0
PWM1 output. Value is controlled by M1 parameter or by I/O line passing
P2 (DIO12/SPI_MISO Configuration)
Sets or displays the DIO12/SPI_MISO configuration (TH pin 4/SMT pin 5).
Parameter range
1, 3 - 5
ParameterDescription
0Disabled
1
SPI_MISOfor the through-hole device
N/A for the surface-mount device
2N/A
3Digital input
XBee S2C DigiMesh 2.4 User Guide
97
AT commandsI/O settings commands
ParameterDescription
4Digital output, low
5Digital output, high
Default
0
P5 (SPI_MISO)
Sets or displays the SPI_MISO configuration (TH pin 4/SMT pin 17).
This only applies to surface-mount devices.
Parameter range
0, 1
ParameterDescription
0Disabled
1SPI_MISO
Default
1
P6 (SPI_MOSI Configuration)
Sets or displays the SPI_MOSI configuration (TH pin 11/SMT pin 16).
This only applies to surface-mount devices.
Parameter range
0, 1
ParameterDescription
0Disabled
1SPI_MOSI
Default
1
P7 (SPI_SSEL )
Sets or displays the SPI_SSEL configuration (TH pin 17/SMT pin 15).
This only applies to surface-mount devices.
Parameter range
1, 2
XBee S2C DigiMesh 2.4 User Guide
98
AT commandsI/O settings commands
ParameterDescription
0Disabled
1SPI_SSEL
Default
1
P8 (SPI_SCLK )P8 (SPI_SCLK )
Sets or displays the SPI_SCLK configuration (TH pin 18/SMT pin 14).
This only applies to surface-mount devices.
Parameter range
1, 2
ParameterDescription
0Disabled
1SPI_SCLK
Default
1
P9 (SPI_ATTN)
Sets or displays the SPI_ATTN configuration (pin 12).
This only applies to surface-mount devices.
Parameter range
1, 2
ParameterDescription
0Disabled
1
Default
1
SPI_ATTN
PD (Pull Up/Down Direction)
The resistor pull direction bit field (1 = pull-up, 0 = pull-down) for corresponding I/O lines that are set
by the PR command.
See PR (Pull-up/Down Resistor Enable) for the bit mappings.
XBee S2C DigiMesh 2.4 User Guide
99
AT commandsI/O settings commands
Parameter range
0x0 - 0x7FFF
Default
0x1FFF
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/down resistor status for the I/O lines. If you set a PR
bit to 1, it enables the pull-up/down resistor; 0 specifies no internal pull-up/down. The following table
defines the bit-field map for both the PR and PD commands. The pull resistor direction is controlled by
the PD command.
BitI/O line
0DIO4 (pin 11 for through-hole, pin 24 for surface-mount)
1DIO3/AD3 (pin 17 for through-hole, pin 30 for surface-mount)
2DIO2/AD2 (pin 18 for through-hole, pin 31 for surface-mount)
3DIO1/AD1 (pin 19 for through-hole, pin 32 for surface-mount)
4DIO0/AD0 (pin 20 for through-hole, pin 33 for surface-mount)
DIO6/RTS (pin 16 for through-hole, pin 29 for surface-mount)
5
6DIO8/SLEEP_REQUEST (pin 9 for through-hole, pin 10 for surface-mount)
DIO14/DIN/CONFIG (pin 3 for through-hole, pin 4 for surface-mount)
7
8DIO5/ASSOCIATE (pin 15 for through-hole, pin 28 for surface-mount)
DIO9/ON_SLEEP(pin 13 for through-hole, pin 26 for surface-mount)
9
10DIO12/SPI_MISO (pin 4 for through-hole), DIO12 (pin 5 for surface-mount)
11DIO10/RSSI/PWM0 (pin 6 for through-hole, pin 7 for surface-mount)
12DIO11/PWM1 (pin 7 for through-hole, pin 8 for surface-mount)
DIO7/CTS (pin 12 for through-hole, pin 25 for surface-mount)
13
14DOUT (pin 2)
Parameter range
0 - 0x7FFF (bit field)
Default
0x1FFF
M0 (PWM0 Duty Cycle)
The duty cycle of the PWM0 line (TH pin 6/SMT pin 7).
XBee S2C DigiMesh 2.4 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.