Digi DigiMesh XBee S2C, DigiMesh XBee-PRO S2C User Manual

XBee®/XBee-PRO S2C DigiMesh® 2.4
Radio Frequency (RF) Modules
User Guide
Revision history—90001506
Revision Date Description
A
B February2017 Added Australia and South Korea certification data for the S2C TH and
C April 2017 Added Japan certification data for the S2C TH and S2C SMT devices.
D June 2017 Modified regulatory and certification information as required by RED
E February 2018 Added Brazil certification information.
August 2016 Baseline release of the document.
(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.
© 2018 Digi International Inc. All rights reserved.
Disclaimers
Information in this document is subject to change without notice and does not represent a commitment on the part of Digi International. Digi provides this document “as is,” without warranty of any kind, expressed or implied, including, but not limited to, the implied warranties of fitness or merchantability for a particular purpose. Digi may make improvements and/or changes in this manual or in the product(s) and/or the program(s) described in this manual at any time.
Warranty
To view product warranty information, go to the following website:
www.digi.com/howtobuy/terms
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 hardware 11 Firmware release notes 11
Technical specifications
Performance specifications 13 Power requirements 13 General specifications 14 Networking and security specifications 14 Regulatory conformity summary 14 Serial communication specifications 15
UART pin assignments 15 SPI pin assignments 15
GPIO specifications 17
Hardware
Antenna options 19 Mechanical drawings 19 Mounting considerations 20 Pin signals 21
Notes 24
Design notes 24
Power supply design 24 Board layout 24 Antenna performance 24 Keepout area 25 RF pad version 27
ADC characteristics 29
Configure the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module
Software libraries 32 Configure the device using XCTU 32 Over-the-air (OTA) firmware update 32
XBee S2C DigiMesh 2.4 User Guide
3
Modes
Serial modes 34
Transparent operating mode 34 API operating mode 34 Command mode 34
Transceiver modes 36
Idle mode 36 Transmit mode 36 Receive mode 36
Serial communication
Select a serial port 38
Serial receive buffer 38 Serial transmit buffer 38
UART port 38
UART data flow 38 Serial data 39 Flow control 39
SPI port 40
SPI signals 40 SPI parameters 41 SPI and API mode 42 Full duplex operation 42 Slave mode characteristics 42
I/O support
Digital I/O line support 45 Analog input 45 Monitor I/O lines 45
On demand I/O sampling 47 Periodic I/O sampling 48 Detect digital I/O changes 48
I/O line passing 49
I/O line passing details 49
Networking
Network identifiers 51 Operating channels 51 Delivery methods 51
DigiMesh networking 51 Repeater/directed broadcast 54
Point-to-multipoint 54 Encryption 55 Maximum payload 55 DigiMesh throughput 55
XBee S2C DigiMesh 2.4 User Guide
4
Network commissioning and diagnostics
Local configuration 58 Remote configuration 58
Send a remote command 58
Apply changes on remote devices 58
Remote command response 58 Establish and maintain network links 59
Build aggregate routes 59
DigiMesh routing examples 59
Replace nodes 60
Test links between adjacent devices 60
Trace route option 62
NACK messages 63 RSSI indicators 63 Associate LED 63
Diagnostics support 63 The Commissioning Pushbutton 64
Definitions 64
Use the Commissioning Pushbutton 65 Node discovery 65
Discover all the devices on a network 65
Directed node discovery 66
Destination Node 66
Discover devices within RF range 66
The FN (Find Neighbors) command 67
Sleep support
Sleep modes 69
Pin Sleep mode (SM = 1) 69
Cyclic Sleep mode (SM = 4) 69
Cyclic Sleep with Pin Wake-up mode (SM = 5) 70 Sleep parameters 70 Sleep current 70 Sleep pins 70 Indirect messaging and polling 71
Indirect messaging 71
Polling 71
AT commands
Special commands 73
FR (Software Reset) 73
RE command 73
AC (Apply Changes) 73
WR command 73 MAC/PHY commands 74
CH (Operating Channel) 74
ID (Network ID) 74
RR (Unicast Mac Retries) 74
MT(Broadcast Multi-Transmits) 75
PL (TX Power Level) 75
PM (Power Mode) 76
XBee S2C DigiMesh 2.4 User Guide
5
CA (CCA Threshold) 76
ED (Energy Detect) 77
TP (Board Temperature) 77
%V (Voltage Supply Monitoring) 77
%H (MAC Unicast One Hop Time) 77
%8 (MAC Broadcast One Hop Time) 78
DB (Last Packet RSSI) 78
UA (Unicasts Attempted Count) 78
GD (Good Packets Received) 78
BC (Bytes Transmitted) 79
EA (MAC ACK Failure Count) 79
EC (CCA Failures) 79
TR (Transmission Failure Count) 80 Network commands 80
CE (Routing / Messaging Mode) 80
TO (Transmit Options) 80
BH command 81
NH (Network Hops) 81
NN (Network Delay Slots) 82
MR (Mesh Unicast Retries) 82 Addressing commands 82
SH command 82
SL command 83
DH command 83
DL command 83
CI (Cluster ID) 83 Diagnostic commands 84
AG (Aggregator Support) 84
DM (DigiMesh Options) 84
DN (Discover Node) 84
ND (Network Discover) 85
FN (Find Neighbors) 86
NI command 86
NT (Network Discovery Back-off) 87
N? (Network Discovery Timeout) 87
NO (Network Discovery Options) 87 Security commands 88
EE (Encryption Enable) 88
KY (AES Encryption Key) 88 Serial interfacing commands 89
BD (Baud Rate) 89
NB (Parity) 89
RO command 90
FT (Flow Control Threshold) 90
AP (API Enable) 90
AO command 91 I/O settings commands 91
CB command 91
D0 (DIO0/AD0) 91
D1 (DIO1/AD1) 92
D2 (DIO2/AD2) 92
D3 (DIO3/AD3) 93
D4 (DIO4) 93
D5 (DIO5/ASSOCIATED_INDICATOR) 94
D6 (DIO6/RTS) 94
XBee S2C DigiMesh 2.4 User Guide
6
D7 (DIO7/CTS) 95
D8 (DIO8/DTR/SLEEP_REQUEST) 95
D9 (ON_SLEEP) 96
P0 (DIO10/RSSI/PWM0 Configuration) 96
P1 (DIO11/PWM1 Configuration) 97
P2 (DIO12/SPI_MISO Configuration) 97
P5 (SPI_MISO) 98
P6 (SPI_MOSI Configuration) 98
P7 (SPI_SSEL ) 98
P8 (SPI_SCLK )P8 (SPI_SCLK ) 99
P9 (SPI_ATTN) 99
PD (Pull Up/Down Direction) 99
PR (Pull-up/Down Resistor Enable) 100
M0 (PWM0 Duty Cycle) 100
M1 (PWM1 Duty Cycle) 101
LT command 101
RP command 102 I/O line passing commands 102
IA (I/O Input Address) 102
IU (Send I/O Sample to Serial Port) 102
T0 (D0 Timeout) 103
T1 (D1 Output Timeout) 103
T2 (D2 Output Timeout) 103
T3 (D3 Output Timeout) 103
T4 (D4 Output Timeout) 103
T5 (D5 Output Timeout) 104
T6 (D6 Output Timeout) 104
T7 (D7 Output Timeout) 104
T8 (D8 Timeout) 104
T9 (D9 Timeout) 105
Q0 (P0 Timeout) 105
Q1 (P1 Timeout) 105
Q2 (P2 Timeout) 105
PT (PWM Output Timeout) 105 I/O sampling commands 106
IC (DIO Change Detect) 106
IF (Sleep Sample Rate) 107
IR (Sample Rate) 107
IS command 107 Sleep commands 107
SM command 108
SO command 108
SN command 108
SP (Sleep Time) 109
ST (Wake Time) 109
WH (Wake Host Delay) 109 Command mode options 110
CC (Command Character) 110
CT command 110
CN command 110
GT command 110 Firmware version/information commands 111
VL command 111
VR command 111
HV command 111
XBee S2C DigiMesh 2.4 User Guide
7
DD command 111
NP (Maximum Packet Payload Bytes) 111
CK (Configuration CRC) 112
Operate in API mode
API mode overview 114
API frame specifications 114
Calculate and verify checksums 116
Escaped characters in API frames 117 Frame descriptions 118
API frame exchanges 118
AT Command frame - 0x08 120
AT Command - Queue Parameter Value frame - 0x09 121
Transmit Request frame - 0x10 123
Explicit Addressing Command frame - 0x11 126
Remote AT Command Request frame - 0x17 129
AT Command Response frame - 0x88 131
Modem Status frame - 0x8A 133
Transmit Status frame - 0x8B 134
Route Information Packet frame - 0x8D 136
Aggregate Addressing Update frame - 0x8E 139
Receive Packet frame - 0x90 141
Explicit Rx Indicator frame - 0x91 143
I/O Data Sample Rx Indicator frame - 0x92 145
Node Identification Indicator frame - 0x95 147
Remote Command Response frame - 0x97 151
Over-the-Air Firmware Update Status - 0xA0 153
Regulatory information
United States (FCC) 156
OEM labeling requirements 156
FCC notices 156
FCC-approved antennas (2.4 GHz) 158
RF exposure 170 Europe (CE) 170
Maximum power and frequency specifications 170
OEM labeling requirements 170
Listen Before Talk requirement 171
Declarations of conformity 171
Antennas 172 Canada (IC) 172
Labeling requirements 172
For XBee S2C surface-mount 172
For XBee-PRO S2C surface-mount 172
For XBee S2C through-hole 172
For XBee-PRO S2C through-hole 172
Transmitters for detachable antennas 173
Detachable antenna 173 Australia (RCM) 173 South Korea 173 ANATEL (Brazil) 177
XBee S2C DigiMesh 2.4 User Guide
8
Load DigiMesh 2.4 firmware on ZB devices
Background 180 Load firmware 180
Migrate from XBee through-hole to surface-mount devices
Pin mapping 183 Mount the devices 184
PCB design and manufacturing
Recommended solder reflow cycle 187 Recommended footprint and keepout 187 Flux and cleaning 189 Rework 189
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 hardware 11 Firmware release notes 11
XBee S2C DigiMesh 2.4 User Guide
10
XBee S2C DigiMesh 2.4 User Guide Applicable 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 specifications 13 Power requirements 13 General specifications 14 Networking and security specifications 14 Regulatory conformity summary 14 Serial communication specifications 15 GPIO specifications 17
XBee S2C DigiMesh 2.4 User Guide
12
Technical specifications Performance specifications

Performance specifications

The following table describes the performance specifications for the devices.
Specification XBee value XBee-PRO value
Indoor / urban range Up to 200 ft (60 m) Up to 300 ft. (90 m)
Outdoor RF line-of-sight range Up to 4000 ft (1200 m) Up to 2 miles (3200
m)
Transmit power output (software selectable)
RF data rate 250,000 b/s 250,000 b/s
Maximum data throughput TBD TBD
6.3 mW (8 dBm), Boost mode
3.1 mW (5 dBm), Normal mode Channel 26 max power is 0.3 mW (-5 dBm)
1
63 mW (18 dBm)
2
UART interface data rate
SPI data rate Up to 5 Mb/s (burst) Up to 5 Mb/s (burst)
Receiver sensitivity

Power requirements

The following table describes the power requirements for the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module.
Specification XBee XBee-PRO
Supply voltage 2.1 - 3.6 V 2.7 - 3.6 V
Transmit current (typical, VCC = 3.3 V)
Idle / receive current (typical, VCC = 3.3 V)
Power-down current <1 uA @ 25C <1 uA @ 25C
1200 b/s to 250,000 b/s 1200 b/s to 250,000
b/s
-102 dBm, Boost mode
-100 dBm, Normal mode
45 mA (8 dBm, Boost mode) 33 mA (5 dBm, Normal mode)
31 mA (Boost mode) 28 mA (Normal mode)
-101 dBm
120 mA (18 dBm)
31 mA
1
Boost mode enabled by default; see PM (Power Mode).
2
See Regulatory information for region-specific certification requirements.
XBee S2C DigiMesh 2.4 User Guide
13
Technical specifications General specifications

General specifications

The following table describes the general specifications for the devices.
Specification XBee XBee-PRO
Operating frequency
Supported channels
Form factor
Operating temperature
Antenna options
ISM 2.4 GHz
11 - 26 12 - 23
TH: 2.438 x 2.761 cm (0.960 x 1.087 in) SMT: 2.199 x 3.4 x 0.305 cm (0.866 x
1.33 x 0.120 in)
-40 to 85 ºC (industrial)
TH: PCB antenna, U.FL connector, RPSMA connector, or integrated wire SMT: RF pad, PCB antenna, or U.FL connector

Networking and security specifications

The following table describes the networking and security specifications for the devices.
Specification XBee XBee-PRO
Supported network topologies
Number of channels (software selectable)
Mesh, point-to-point, point-to­multipoint, peer-to-peer
16 direct sequence channels 12 direct sequence channels
TH: 2.438 x 3.294 cm (0.960 x 1.297 in) SMT: 2.199 x 3.4 x 0.305 cm (0.866 x
1.33 x 0.120 in)
Mesh, point-to-point, point-to­multipoint, peer-to-peer
Addressing options PAN ID, channel and 64-bit
addresses
Encryption 128 bit Advanced Encryption
Standard (AES)

Regulatory conformity summary

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 (surface­mount)
FCC ID: MCQ­PS2CSM
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 specifications Serial communication specifications
XBee-PRO
Country
XBee (surface-mount)
(surface­mount)
XBee (through-hole)
XBee-PRO (through-hole)
Industry Canada (IC)
FCC/IC test transmit power output range
Europe (CE) Yes - Yes -
Australia RCM RCM RCM RCM
Japan R201WW10215369 R210- 105563
South Korea MSIP-CRM-DIG-
RoHS Compliant
IC: 1846A-XBS2C
-26 to +8dBm -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: 1846A­PS2CSM
+19.4 dBm
IC: 1846A-S2CTH
-26 to +8 dBm +1 to +19 dBm
MSIP-CRM-DIG­XBee-S2C-TH
IC: 1846A-PS2CTH
Specifications Module pin number
UART pins XBee (surface-mount) XBee (through-hole)
DOUT 3 2
DIN / CONFIG
CTS / DIO7
RTS / DIO6
4 3
25 12
29 16

SPI pin assignments

The SC2 (Serial Communication Port 2) of the Ember 357 is connected to the SPI port.
Specifications Module pin number
SPI pins XBee (surface-mount) XBee (through-hole)
SPI_SCLK 14 18
XBee S2C DigiMesh 2.4 User Guide
15
Technical specifications Serial communication specifications
Specifications Module pin number
SPI pins XBee (surface-mount) XBee (through-hole)
SPI_SSEL
SPI_MOSI 16 11
SPI_MISO 17 4
15 17
XBee S2C DigiMesh 2.4 User Guide
16
Technical specifications GPIO 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 Specification Value
Low Schmitt switching threshold 0.42 - 0.5 x VCC
High Schmitt switching threshold 0.62 - 0.8 x VCC
Input current for logic 0 -0.5 µA
Input current for logic 1 0.5 µA
Input pull-up resistor value 29 kΩ
Input pull-down resistor value 29 kΩ
Output voltage for logic 0 0.18 x VCC
(maximum)
Output voltage for logic 1 0.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 modules 8 mA
Total output current (for GPIO pads) 40 mA
4 mA
4 mA
8 mA
XBee S2C DigiMesh 2.4 User Guide
17

Hardware

Antenna options 19 Mechanical drawings 19 Mounting considerations 20 Pin signals 21 Design notes 24 ADC characteristics 29
XBee S2C DigiMesh 2.4 User Guide
18
Hardware Antenna options

Antenna options

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
Hardware Mounting 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
Hardware Pin 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.
Pin Name Direction Description
1 VCC -
2 DOUT Output
XBee S2C DigiMesh 2.4 User Guide
Power supply
UART data out
21
Hardware Pin signals
Pin Name Direction Description
3 DIN/CONFIG Input
4 DIO12/SPI_MISO Both
5 RESET Input
6 DIO10/PWM0/RSSI
PWM
7 DIO11/PWM1 Both
8 [Reserved] -
9 DIO8/SLEEP_
RQ/DTR
10 GND -
11 DIO4/SPI_MOSI Both
12 DIO7/CTS Both
13 ON/SLEEP Output
14 V
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.
15 DIO5/ASSOC Both
16 DIO6/RTS Both
17 DIO3/AD3/SPI_
SSEL
18 DIO2/AD2/SPI_CLK Both
19 DIO1/AD1/SPI_
ATTN
20 DIO0/AD0 Both
The following table shows the pin assignments for the surface-mount device.
Pin Name Direction Function
1 GND -
2 VCC -
3 DOUT Output
4 DIN/CONFIG Input
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 / SPIAttention
Digital I/O 0 / Analog input 0
Ground
Power supply
UART data out
UART data in
XBee S2C DigiMesh 2.4 User Guide
22
Hardware Pin signals
Pin Name Direction Function
5 DIO12 Both
6 RESET Input
7 DIO10/PWM0/RSSI
PWM
8 DIO11/PWM1 Both
9 [Reserved] -
10 DIO8/SLEEP_
RQ/DTR
11 GND -
12 SPI_
ATTN/BOOTMODE
13 GND -
14 SPI_CLK Input
15 SPI_SSEL Input
16 SPI_MOSI Input
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
SPIAttention. Do not tie low on reset.
Ground
SPI clock
SPI select
SPI Data In
17 SPI_MISO Output
18 [Reserved] -
19 [Reserved] -
20 [Reserved] -
21 [Reserved] -
22 GND -
23 [Reserved] -
24 DIO4 Both
25 DIO7/CTS Both
26 ON/SLEEP Output
27 V
28 DIO5/ASSOC Both
29 DIO6/RTS Both
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
Hardware Design notes
Pin Name Direction Function
30 DIO3/AD3 Both
31 DIO2/AD2 Both
32 DIO1/AD1 Both
33 DIO0/AD0 Both
34 [Reserved] -
35 GND -
36 RF Both
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
Hardware Design 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
Hardware Design 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 RFconnectors.
Wire whip antennas radiate best over the center of a ground plane.
XBee S2C DigiMesh 2.4 User Guide
26
Hardware Design 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 RFconnectors.
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
Hardware Design 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
Hardware ADC characteristics
Number Description
1
2 50 Ω microstrip trace
3 Back off ground fill at least twice the distance between layers 1 and 2
4 RF connector
5 Stitch vias near the edges of the ground plane
6 Pour a solid ground plane under the RF trace on the reference layer
Implementing these design suggestions helps ensure that the RFpad 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
Hardware ADC characteristics
Parameter Condition Min Typical Max Units
Internal voltage reference 1.17 1.2 1.23 V
Analog input voltage range
1
0 - 1.2 V
Input impedance 1 - - MΩ
Number of bits 10
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 libraries 32 Configure the device using XCTU 32 Over-the-air (OTA) firmware update 32
XBee S2C DigiMesh 2.4 User Guide
31
Configure the XBee/XBee-PRO S2C DigiMesh 2.4 RF Module Software 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 OTAfirmware 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 modes 34 Transceiver modes 36
XBee S2C DigiMesh 2.4 User Guide
33
Modes Serial 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
Modes Serial 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 GTcommand), 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
Modes Transceiver 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 port 38 UART port 38 SPI port 40
XBee S2C DigiMesh 2.4 User Guide
37
Serial communication Select 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 UART­interfaced environment. Low-asserted signals have a horizontal line over the signal name.
XBee S2C DigiMesh 2.4 User Guide
38
Serial communication UART 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 communication SPI 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 communication SPI port
Signal
SPI_MOSI (Master out,
SMT pin#SMT applicable AT
command
16
P6
TH Pin#TH applicable AT
command
11 D4
Slave in)
SPI_MISO (Master in,
17
P5
4 P2
Slave out)
SPI_SCLK (Serial clock)
SPI_SSEL (Slave select)
SPI_ATTN (Attention)
14
15
12
P8
P7
P9
18 D2
17 D3
19 D1
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. Thissignal 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. Thissignal 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 communication SPI port

SPI and API mode

The SPI only operates in API mode 1. The SPIdoes 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 communication SPI port
XBee S2C DigiMesh 2.4 User Guide
43

I/O support

Digital I/O line support 45 Analog input 45 Monitor I/O lines 45 I/O line passing 49
XBee S2C DigiMesh 2.4 User Guide
44
I/O support Digital 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
Function Pin Command
DIO0 TH pin 20/SMT pin 33
DIO1 TH pin 19/SMT pin 32
DIO2 TH pin 18/SMT pin 31
DIO3 TH pin 17/SMT pin 30
DIO4 TH pin 11/SMT pin 24
DIO5 TH pin 15/SMT pin 28
DIO6 TH pin 16/SMT pin 29
DIO7 TH pin 12/SMT pin 25
DIO8 TH pin 9/SMT pin 10
DI09
DIO10 TH pin 6/SMT pin 7
DIO11 TH pin 7/SMT pin 8
DIO12 TH 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.
Field Name Description
1 Sample
sets
XBee S2C DigiMesh 2.4 User Guide
Number of sample sets in the packet. Always set to 1.
45
I/O support Monitor I/O lines
Field Name Description
2 Digital
channel mask
1 Analog
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.
Example Sample 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 support Monitor 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:
Output Description
01 Indicates one sample. That is the only possibility for Command mode.
20E Mask to indicate which lines are sampled (A0, D3, D2, and D1).
00A Digital sample indicates D3 high, D2 low, and D1 high.
3FF Analog sample for A0 indicates that A0 is reading maximum voltage of 1.2 V.
In API mode, the output is:
7E 00 0C 83 00 00 00 00 01 03 3E 01 2A 02 10 FD
In this example, note the following:
83 indicates RX Packet: 16-bit Address I/O frame (0x83).
00 00 indicates 16-bit source address.
00 indicates RSSI (does not apply).
00 indicates options.
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 nearly half of capacity, where 03 FF would indicate the full voltage of 1.2 V = 1200 mV.
For a remote IS command sent to the device listed above with the same configuration, the output is:
7E 00 16 97 01 00 13 A2 00 40 E3 C0 15 00 00 49 53 00 01 03 3E 01 2A 02 10 9F
In this example, note the following:
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 support Monitor 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 support I/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 andT1specifies 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.
XBee S2C DigiMesh 2.4 User Guide
49

Networking

Network identifiers 51 Operating channels 51 Delivery methods 51 Encryption 55 Maximum payload 55 DigiMesh throughput 55
XBee S2C DigiMesh 2.4 User Guide
50
Networking Network identifiers

Network identifiers

You define DigiMesh networks with a unique network identifier. Use the ID command to set this identifier. For devices to communicate, you must configure them with the same network identifier and the same operating channel. For devices to communicate, the CHand 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
Networking Delivery 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
Networking Delivery 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
Networking Delivery 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
Networking Encryption
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 Name Encrypted?
0 N/A No 0 (no check) 0
1 MIC-32 No 4 9
2 MIC-64 No 8 13
3 MIC-128 No 16 21
4 ENC Yes 0 (no check) 5
5 ENC-MIC-32 Yes 4 9
6 ENC-MIC-64 Yes 8 13
7 ENC-MIC-128 Yes 16 21
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
Networking DigiMesh 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.
Configuration Data throughput
1 hop, encryption disabled 27.0 kb/s
3 hop, encryption disabled 10.9 kb/s
6 hop, encryption disabled 5.78 kb/s
1 hop, encryption enabled 20.5 kb/s
3 hop, encryption enabled 9.81 kb/s
6 hop, encryption enabled 4.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 configuration 58 Remote configuration 58 Establish and maintain network links 59 RSSI indicators 63 Associate LED 63 The Commissioning Pushbutton 64 Node discovery 65
XBee S2C DigiMesh 2.4 User Guide
57
Network commissioning and diagnostics Local 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 diagnostics Establish 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 diagnostics Establish 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 bytes Field name Description
8 Destination
address
2 Payload size The size of the test packet. Use the NPcommand to query the
2 Iterations The 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 diagnostics Establish and maintain network links
Number of bytes Field name Description
8
Destination
The address the device used to test its link.
address
2 Payload size The size of the test packet device A sent to test the link.
2 Iterations The number of packets that device A sent.
2 Success The number of packets that were successfully
acknowledged.
2 Retries The number of MAC retries used to transfer all the packets.
1 Result 0x00 - the command was successful.
0x03 - invalid parameter used.
1 RR The maximum number of MAC retries allowed.
1 maxRSSI The strongest RSSI reading observed during the test.
1 minRSSI The weakest RSSI reading observed during the test.
1 avgRSSI The 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:
7E 0020 11 01 0013A20040521234 FFFE E6 E6 0014 C105 00 00 0013A2004052ABCD 0028 03E8 EB
When the test is finished, the following API frame may be received:
7E 0027 91 0013A20040521234 FFFE E6 E6 0094 C105 00 0013A2004052ABCD 0028 03E8 03E7 0064 00 0A 50 53 52 9F
This means:
n 999 out of 1000 packets were successful.
n The device made 100 retries.
n RR = 10.
n maxRSSI = -80 dBm.
n minRSSI = -83 dBm.
n avgRSSI = -82 dBm.
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 diagnostics Establish 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 diagnostics RSSI 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 mode LED Status Meaning
0 On, blinking The device has power and is operating properly
1, 4, 5 Off The device is asleep
1, 4, 5 On, blinking The 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 diagnostics The 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 presses Action
1 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.
1 If 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.
4 Sends an RE command to restore device parameters to default values.
XBee S2C DigiMesh 2.4 User Guide
64
Network commissioning and diagnostics Node 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:
Commands Syntax Description
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 diagnostics Node 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 diagnostics Node 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 FNoutputs 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
Neighbors).
XBee S2C DigiMesh 2.4 User Guide
67

Sleep support

Sleep modes 69 Sleep parameters 70 Sleep current 70 Sleep pins 70 Indirect messaging and polling 71
XBee S2C DigiMesh 2.4 User Guide
68
Sleep support Sleep modes

Sleep modes

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 non­zero 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 mode Description
SM 0 No sleep
SM 1 Pin sleep
SM 4 Cyclic sleep
SM 5 Cyclic 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 support Sleep 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 support Indirect messaging and polling
Pin
Pin name
number Description
SLEEP_RQTH pin
9/SMT pin 10
CTS TH 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.
XBee S2C DigiMesh 2.4 User Guide
71

AT commands

Special commands 73 MAC/PHY commands 74 Network commands 80 Addressing commands 82 Diagnostic commands 84 Security commands 88 Serial interfacing commands 89 I/O settings commands 91 I/O line passing commands 102 I/O sampling commands 106 Sleep commands 107 Command mode options 110 Firmware version/information commands 111
XBee S2C DigiMesh 2.4 User Guide
72
AT commands Special commands

Special commands

The following commands are special commands.

FR (Software Reset)

Resets the device. The device responds immediately with an OK and performs a reset 100 ms later.
If you issue FR while the device is in Command Mode, the reset effectively exits Command mode.
Parameter range
N/A
Default
N/A

RE 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 commands MAC/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 non­zero, 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 commands MAC/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 setting PM setting Channel(s) TX power* (dBm)
4 1 11 to 25 8
4 0 11 to 25 5
3 1 11 to 25 6
3 0 11 to 25 3
2 1 11 to 25 4
2 0 11 to 25 1
1 1 11 to 25 2
1 0 11 to 25 -1
0 1 11 to 25 -2
0 0 11 to 25 -5
X 1 26 -5
X 0 26 -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 commands MAC/PHY commands
PL setting Channel(s) TX power* (dBm)
0 12 to 23 0
1 12 to 23 12
2 12 to 23 15
3 12 to 23 16
4 12 to 23 18
* 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
0 Boost mode disabled
1 Boost 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 commands MAC/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 commands MAC/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 commands MAC/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 commands Network 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-to­multipoint unicasts until an end device requests them. Setting a device as a poller causes it to regularly send polls to its Indirect Messaging Coordinator. Nodes can also be configured to route, or not route, multi-hop packets.
Parameter range
0 - 6
Parameter Description Routes packets
0 Standard router Yes
1 Indirect message coordinator Yes
2 Non-routing device No
3 Non-routing coordinator No
4 Indirect message poller Yes
5 N/A N/A
6 Non-routing poller No
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 commands Network commands
Parameter range
0 - 0xFF
Bit Meaning Description
6,7 Delivery method
5 Reserved <set this bit to 0>
4 Reserved <set this bit to 0>
3 Trace Route Enable a Trace Route on all DigiMesh API packets
2 NACK Enable a NACK messages on all DigiMesh API packets
1 Disable RD Disable Route Discovery on all DigiMesh unicasts
0 Disable ACK Disable 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.
Default
0xC0
b’00 = <invalid option> b’01 = Point-multipoint (0x40) b'10 = Directed Broadcast (0x80) b’11 = DigiMesh (0xC0)

BH command

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 commands Addressing 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 commands Addressing 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 APImode, 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 commands Diagnostic 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 commands Diagnostic 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.
PARENT_NETWORK ADDRESS<CR> (2 Bytes) (always 0xFFFE)
PARENT_NETWORK ADDRESS (2 Bytes) <CR>
DEVICE_TYPE<CR> (1 Byte: 0 = Coordinator, 1 = Router, 2 = End Device)
STATUS<CR> (1 Byte: Reserved)
PROFILE_ID<CR> (2 Bytes)
MANUFACTURER_ID<CR> (2 Bytes)
DIGI DEVICE TYPE<CR> (4 Bytes. Optionally included based on NO settings.)
RSSI OF LAST HOP<CR> (1 Byte. Optionally included based on NO settings.)
<CR>
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 commands Diagnostic 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 ASCIIstring
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:
MY<CR> (always 0xFFFE)
SH<CR>
SL<CR>
NI<CR> (Variable length)
PARENT_NETWORK ADDRESS<CR> (2 Bytes) (always 0xFFFE)
DEVICE_TYPE<CR> (1 Byte: 0 = Coordinator, 1 = Router, 2 = End Device)
STATUS<CR> (1 Byte: Reserved)
PROFILE_ID<CR> (2 Bytes)
MANUFACTURER_ID<CR> (2 Bytes)
DIGI DEVICE TYPE<CR> (4 Bytes. Optionally included based on NO settings.)
RSSI OF LAST HOP<CR> (1 Byte. Optionally included based on NO settings.)
<CR>
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 commands Diagnostic 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 NOto 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 commands Security 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
Parameter Description
0 Encryption Disabled
1 Encryption 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 commands Serial 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 XCTUto 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
Parameter Description
0x0 1200 b/s
0x1 2400 b/s
0x2 4800 b/s
0x3 9600 b/s
0x4 19200 b/s
0x5 38400 b/s
0x6 57600 b/s
0x7 115200 b/s
0x8 230400 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
Parameter Description
0x00 No parity
XBee S2C DigiMesh 2.4 User Guide
89
AT commands Serial interfacing commands
Parameter Description
0x01 Even parity
0x02 Odd 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 re­asserts 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
Parameter Description
0 API disabled (operate in Transparent mode)
XBee S2C DigiMesh 2.4 User Guide
90
AT commands I/O settings commands
Parameter Description
1 API enabled
2 API 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
Parameter Description
0 API Rx Indicator - 0x90, this is for standard data frames.
1 API 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 commands I/O settings commands
Parameter Description
0 Disabled
1 Commissioning Pushbutton
2 ADC
3 Digital input
4 Digital output, low
5 Digital output, high
Default
1

D1 (DIO1/AD1)

Sets or displays the DIO1/AD1 configuration (TH pin 19/SMT pin 32).
Parameter range
0 - 5
Parameter Description
0 Disabled
1
2 ADC
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
XBee S2C DigiMesh 2.4 User Guide
92
AT commands I/O settings commands
Parameter Description
1
2 ADC
3 Digital input
4 Digital output, low
5 Digital output, high
Default
0
SPI_CLKfor 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
Parameter Description
0 Disabled
1
2 ADC
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
XBee S2C DigiMesh 2.4 User Guide
93
AT commands I/O settings commands
Parameter Description
1
2 DI04
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
1
2 DIO5/ASSOCIATED_INDICATOR
3 Digital input
4 Digital output, default low
5 Digital 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
Parameter Description
0 Disabled
1
RTS flow control
XBee S2C DigiMesh 2.4 User Guide
94
AT commands I/O settings commands
Parameter Description
2 N/A
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
1
2 N/A
3 Digital input
4 Digital output, low
5 Digital output, high
6 RS-485 Tx enable, low Tx (0 V on transmit, high when idle)
7 RS-485 Tx enable high, high Tx (high on transmit, 0 V when idle)
Default
0x1
CTSflow 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
Parameter Description
0 Disabled
1 SLEEP_REQUEST input
XBee S2C DigiMesh 2.4 User Guide
95
AT commands I/O settings commands
Parameter Description
2 N/A
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
1
2 N/A
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
1 RSSI 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 commands I/O settings commands
Parameter Description
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
1 N/A
2
3 Digital input
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
1
SPI_MISOfor the through-hole device N/A for the surface-mount device
2 N/A
3 Digital input
XBee S2C DigiMesh 2.4 User Guide
97
AT commands I/O settings commands
Parameter Description
4 Digital output, low
5 Digital 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
Parameter Description
0 Disabled
1 SPI_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
Parameter Description
0 Disabled
1 SPI_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 commands I/O settings commands
Parameter Description
0 Disabled
1 SPI_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
Parameter Description
0 Disabled
1 SPI_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
Parameter Description
0 Disabled
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 commands I/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.
Bit I/O line
0 DIO4 (pin 11 for through-hole, pin 24 for surface-mount)
1 DIO3/AD3 (pin 17 for through-hole, pin 30 for surface-mount)
2 DIO2/AD2 (pin 18 for through-hole, pin 31 for surface-mount)
3 DIO1/AD1 (pin 19 for through-hole, pin 32 for surface-mount)
4 DIO0/AD0 (pin 20 for through-hole, pin 33 for surface-mount)
DIO6/RTS (pin 16 for through-hole, pin 29 for surface-mount)
5
6 DIO8/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
8 DIO5/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
10 DIO12/SPI_MISO (pin 4 for through-hole), DIO12 (pin 5 for surface-mount)
11 DIO10/RSSI/PWM0 (pin 6 for through-hole, pin 7 for surface-mount)
12 DIO11/PWM1 (pin 7 for through-hole, pin 8 for surface-mount)
DIO7/CTS (pin 12 for through-hole, pin 25 for surface-mount)
13
14 DOUT (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...