Digi XBee® Cellular LTE User Guide Datasheet by Digi

View All Related Products | Download PDF Datasheet
DIGI.’
Digi XBee® Cellular LTE Cat 1
Embedded Modem
User Guide
Revision history—90001525
Revision Date Description
N February
2019
Added information for XBIB-C-TH and XBIB-C-GPS development boards
P April 2019 Added information for Digi Remote Manager®
R June 2019 Added information for Clean shutdown and securing the connection
between and XBee and Remote Manager. Added FCC publication 996369
related information. Updated the FCCand IClabeling information.
S July 2019 Updated the FCCand IClabeling information.
T July 2019 Added socket information.
Additional edits.
September Added firmware update information.
Trademarks and copyright
Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United
States and other countries worldwide. All other trademarks mentioned in this document are the
property of their respective owners.
© 2018 Digi International Inc. All rights reserved.
Disclaimers
Information in this document is subject to change without notice and does not represent a
commitment on the part of Digi International. Digi provides this document as is,” without warranty of
any kind, expressed or implied, including, but not limited to, the implied warranties of fitness or
merchantability for a particular purpose. Digi may make improvements and/or changes in this manual
or in the product(s) and/or the program(s) described in this manual at any time.
Warranty
To view product warranty information, go to the following website:
www.digi.com/howtobuy/terms
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
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 2
pricing, contact us at +1 952.912.3444 or visit us at www.digi.com/support.
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 3
Contents
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide
Applicable firmware and hardware 14
SIM cards 14
Get started with the XBee Cellular Modem Development Kit
Identify the kit contents 17
Connect the hardware 18
XBIB-U-DEV reference 20
XBIB-CU-TH reference 22
XBIB-C-GPS reference 25
Interface with the XBIB-C-GPS module 26
I2C communication 27
UART communication 27
Run the MicroPython GPSdemo 27
Cellular service 28
Update the firmware on your XBee 28
Configure and update your XBee with XCTU 29
Update the modem firmware for XBee devices 31
XBee connection examples
Connect to the Echo server 36
Connect to the ELIZA server 38
Connect to the Daytime server 40
Send an SMS message to a phone 42
Perform a (GET) HTTP request 44
Get started with CoAP 46
CoAP terms 46
CoAP quick start example 46
Configure the device 47
Example: manually perform a CoAPrequest 47
Example: use Python to generate a CoAP message 48
Connect to a TCP/IP address 51
Get started with MQTT 52
Example: MQTT connect 52
Send a connect packet 54
Example: send messages (publish) with MQTT 55
Example: receive messages (subscribe) with MQTT 56
Use MQTT over the XBee Cellular Modem with a PC 57
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 4
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 5
Software libraries 60
Debugging 60
Get started with MicroPython
About MicroPython 63
Why use MicroPython 63
MicroPython on the XBee Cellular Modem 63
Use XCTU to enter the MicroPython environment 63
Use the MicroPython Terminal in XCTU 64
Troubleshooting 64
Example: hello world 64
Example: turn on an LED 65
Example: code a request help button 66
Enter MicroPython paste mode 66
Catch a button press 67
Send a text (SMS) when the button is pressed 68
Add the time the button was pressed 69
Example: debug the secondary UART 70
Exit MicroPython mode 70
Other terminal programs 71
Tera Term for Windows 71
Use picocom in Linux 72
Get started with Digi Remote Manager
Create a Remote Manager account and add devices 74
Create a Remote Manager account 75
Add an XBee Cellular Modem to Remote Manager 75
Verify the connection between a device and Remote Manager 76
Configure Remote Manager features by scheduling tasks 76
Overview: Create a schedule for a set of tasks 76
Examples 77
Example: Read settings and state using Remote Manager 77
Example: Configure a device from Remote Manager using XML 78
Example: Update XBee firmware using Remote Manager 79
Example: Update MicroPython from Remote Manager using XML 80
Restore persistent connection to a remote XBee 84
Manage data in Remote Manager 86
Review device status information from Remote Manager 86
Update the firmware from Remote Manager 86
Update the cellular component firmware using Remote Manager 88
Update the firmware using web services in Remote Manager 90
Manage secure files in Remote Manager 92
Remote Manager reference 94
Enable SM/UDP 94
Disconnect 94
Configure XBee settings within Remote Manager 94
Technical specifications
Interface and hardware specifications 97
RF characteristics 97
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 6
Networking specifications 97
Power requirements 97
Power consumption 98
Electrical specifications 98
Regulatory approvals 99
Hardware
Mechanical drawings 101
Pin signals 101
Pin connection recommendations 103
RSSI PWM 103
SIM card 103
Associate LED functionality 103
Antenna recommendations
Antenna specifications 106
Antenna connections 106
Antenna placement 107
RF exposure 107
Design recommendations
Power supply considerations 109
Add a capacitor to the RESET line 109
Heat considerations and testing 109
Heat sink guidelines 111
Bolt-down style 111
Adhesive style heat sink 111
Add a fan to provide active cooling 112
Custom configuration: Create a new factory default 112
Set a custom configuration 113
Clear all custom configurations on a device 113
Clean shutdown 113
SD (Shutdown) command 113
Sleep feature 114
Airplane mode 114
Cellular connection process
Connecting 116
Cellular network 116
Data network connection 116
Data communication with remote servers (TCP/UDP) 116
Disconnecting 116
SMS encoding 117
Modes
Select an operating mode 119
Transparent operating mode 120
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 7
API operating mode 120
Bypass operating mode (DEPRECATED) 120
Enter Bypass operating mode 121
Leave Bypass operating mode 121
Restore cellular settings to default in Bypass operating mode 121
Command mode 121
Enter Command mode 121
Troubleshooting 122
Send AT commands 122
Response to AT commands 123
Apply command changes 123
Make command changes permanent 123
Exit Command mode 123
MicroPython mode 123
Sleep modes
About sleep modes 126
Normal mode 126
Pin sleep mode 126
Cyclic sleep mode 126
Cyclic sleep with pin wake up mode 126
Airplane mode 126
Connected sleep mode 126
The sleep timer 127
MicroPython sleep behavior 127
Serial communication
Serial interface 129
Serial data 129
UART data flow 129
Serial buffers 130
CTS flow control 130
RTS flow control 130
SPI operation
SPI communications 132
Full duplex operation 133
Low power operation 134
Select the SPI port 134
Force UART operation 135
Data format 135
File system
Overview of the file system 137
Directory structure 137
Paths 137
Secure files 137
XCTU interface 138
Encrypt files 138
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 8
Socket behavior
Supported sockets 140
Best practices when using sockets 140
Sockets and Remote Manager 140
Sockets and API mode 140
Socket timeouts 140
Socket limits in API mode 140
Enable incoming TCP connections 141
API mode behavior for outgoing TCP and TLS connections 141
API mode behavior for outgoing UDP data 142
API mode behavior for incoming TCP connections 142
API mode behavior for incoming UDP data 143
Transparent mode behavior for outgoing TCP and TLS connections 143
Transparent mode behavior for outgoing UDP data 143
Transparent mode behavior for incoming TCP connections 144
Transparent mode behavior for incoming UDP connections 144
Extended Socket frames
Examples 145
Available Extended Socket frames 146
Extended Socket example: Single HTTP Connection 146
Send a Socket Create frame 146
Receive a Socket Create response 147
Send Socket Connect 147
Receive a Socket Connect Response 147
Receive a Socket Status 148
Send HTTP Request using Socket Send frame 148
Receive TX Status 149
Receive one or more Receive Data frames 149
Receive Socket Status indicating closed connection 150
Extended Socket example: UDP 150
Send a Socket Create frame 150
Receive a Socket Create response 151
Bind local source addres 151
Receive Bind/Listen Response 151
Send to Digi echo server 152
Receive TX Status 152
Receive echoed data 152
Send to Digi time server 153
Receive TX Status 153
Receive daytime value 153
Close the socket 154
Receive close response 154
Extended Socket example: TCPListener 155
Send a Socket Create frame 155
Receive a Socket Create response 155
Designate the socket as a listener 155
Receive a Socket Bind/Listen Response 156
Making a connection to the listener socket 156
Receiving Data from the new socket 157
Receive a Socket Status indicating closed connection 157
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 9
Transport Layer Security (TLS)
TLS AT commands 160
Transparent mode and TLS 161
API mode and TLS 161
Key formats 161
Certificate limitations 161
Cipher suites 161
Server Name Indication (SNI) 162
Secure the connection between an XBee and Remote Manager with server authentication 162
Step 1: Get the certificate 162
Step 2: Configure device 162
Step 3: Verify that authentication is being performed 163
AT commands
Special commands 165
AC (Apply Changes) 165
FR (Force Reset) 165
RE command 165
SD (Shutdown) 165
WR (Write) 166
HI (Hardware Identity) 166
Cellular commands 167
PH (Phone Number) 167
S# (ICCID) 167
IM (IMEI) 167
II (Subscriber identity) 167
MN (Operator) 167
MV (Modem Firmware Version) 168
MU (Modem firmware revision number) 168
DB (Cellular Signal Strength) 168
AN (Access Point Name) 168
AM (Airplane Mode) 169
OA (Operating APN) 169
DV (Secondary Antenna Function Switch) 169
Network commands 171
IP (IP Protocol) 171
TL (TLS Protocol Version) 171
$0 (TLS Profile 0) 171
$1 (TLS Profile 1) 172
$2 (TLS Profile 2) 172
TM (IP Client Connection Timeout) 172
TS (IP Server Connection Timeout) 173
DO (Device Options) 173
DT (Cellular Network Time) 173
Addressing commands 175
SH (Serial Number High) 175
SL (Serial Number Low) 175
MY (Module IP Address) 175
P# (Destination Phone Number) 175
N1 (DNS Address) 176
N2 (DNS Address) 176
DL (Destination Address) 176
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 10
OD (Operating Destination Address) 176
DE (Destination port) 176
C0 (Source Port) 177
LA (Lookup IP Address of FQDN) 177
Serial interfacing commands 178
BD (Baud Rate) 178
NB (Parity) 178
SB (Stop Bits) 179
RO (Packetization Timeout) 179
TD (Text Delimiter) 179
FT (Flow Control Threshold) 179
AP (API Enable) 180
I/O settings commands 181
D0 (DIO0/AD0) 181
D1 (DIO1/AD1) 181
D2 (DIO2/AD2) 182
D3 (DIO3/AD3) 182
D4 (DIO4) 182
D5 (DIO5/ASSOCIATED_INDICATOR) 183
D6 (DIO6/RTS) 183
D7 (DIO7/CTS) 184
D8 (DIO8/SLEEP_REQUEST) 184
D9 (DIO9/ON_SLEEP) 185
P0 (DIO10/PWM0 Configuration) 185
P1 (DIO11/PWM1 Configuration) 185
P2 (DIO12 Configuration) 186
PD (Pull Direction) 186
PR (Pull-up/down Resistor Enable) 187
M0 (PWM0 Duty Cycle) 188
I/O sampling commands 189
TP (Temperature) 189
IS (Force Sample) 189
Sleep commands 191
SM (Sleep Mode) 191
SP (Sleep Period) 191
ST (Wake Time) 191
SO (Sleep Options) 192
Command mode options 193
CC (Command Sequence Character) 193
CT (Command Mode Timeout) 193
CN (Exit Command mode) 193
GT (Guard Times) 193
MicroPython commands 195
PS (Python Startup) 195
PY (MicroPython Command) 195
Firmware version/information commands 197
VR (Firmware Version) 197
VL (Verbose Firmware Version) 197
HV (Hardware Version) 197
AI (Association Indication) 197
HS (Hardware Series) 198
CK (Configuration CRC) 198
Diagnostic interface commands 199
DI (Remote Manager Indicator) 199
CI (Protocol/Connection Indication) 199
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 11
AS (Active scan for network environment data) 201
Execution commands 203
NR (Network Reset) 203
!R (Modem Reset) 203
File system commands 204
Error responses 204
ATFS (File System) 204
ATFS PWD 204
ATFS CDdirectory 204
ATFS MDdirectory 204
ATFS LS [directory] 204
ATFS PUTfilename 205
ATFS XPUTfilename 205
ATFS HASHfilename 205
ATFS GETfilename 205
ATFS MVsource_pathdest_path 205
ATFS RMfile_or_directory 205
ATFS INFO 205
ATFSFORMAT confirm 206
Remote Manager commands 207
MO (Remote Manager Options) 207
DF (Remote Manager Status Check Interval) 207
EQ (Remote Manager FQDN) 207
K1 (Remote Manager Server Send Keepalive) 207
K2 (Remote Manager Device Send Keepalive) 208
$D (Remote Manager certificate) 208
System commands 209
KL (Device Location) 209
KC (Contact Information) 209
KP (Device Description) 209
Socket commands 210
SI (Socket Info) 210
Operate in API mode
API mode overview 213
Use the AP command to set the operation mode 213
API frame format 213
API operation (AP parameter = 1) 213
API operation with escaped characters (AP parameter = 2) 214
API frames
AT Command - 0x08 218
AT Command: Queue Parameter Value - 0x09 219
Transmit (TX) SMS - 0x1F 220
Transmit (TX) Request: IPv4 - 0x20 221
Tx Request with TLS Profile - 0x23 223
AT Command Response - 0x88 225
Transmit (TX) Status - 0x89 226
Modem Status - 0x8A 228
Receive (RX) Packet: SMS - 0x9F 229
Receive (RX) Packet: IPv4 - 0xB0 230
User Data Relay - 0x2D 231
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 12
Example use cases 231
User Data Relay Output - 0xAD 232
Socket Create - 0x40 233
Socket Create Response - 0xC0 234
Socket Option Request - 0x41 235
Socket Option Response - 0xC1 236
Socket Connect - 0x42 237
Socket Connect Response - 0xC2 238
Socket Close - 0x43 239
Socket Close Response - 0xC3 240
Socket Send (Transmit) - 0x44 241
Socket SendTo (Transmit Explicit Data): IPv4 - 0x45 242
Socket Bind/Listen - 0x46 243
Socket Listen Response - 0xC6 244
Socket New IPv4 Client - 0xCC 245
Socket Receive - 0xCD 246
Socket Receive From: IPv4 - 0xCE 247
Socket Status - 0xCF 248
Packaged firmware updates
Important notes 250
Perform a cellular component firmware update 250
About packaged firmware updates 251
FW Update - 0x2B 252
FW Update Response - 0xAB 252
Error recovery 253
Corrupted firmware on the cellular component 253
Error 253
Host initiated cancellation 253
General case 253
Troubleshooting
Cannot find the serial port for the device 255
Condition 255
Solution 255
Other possible issues 256
Enable Virtual COM port (VCP) on the driver 256
Correct a macOS Java error 257
Condition 257
Solution 257
Unresponsive cellular component in Bypass mode 258
Condition 258
Solution 258
Not on expected network after APN change 259
Condition 259
Solution 259
Syntax error at line 1 259
Solution 259
Error Failed to send SMS 259
Solution 259
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 13
Regulatory information
Modification statement 261
Interference statement 261
FCC notices 261
FCC Class B digital device notice 261
Labeling requirements for the host device 262
FCC publication 996369 related information 262
2.1 General 262
2.2 List of applicable FCC rules 263
2.3 Summarize the specific operational use conditions 263
2.4 Limited module procedures 263
2.5 Trace antenna designs 263
2.6 RF exposure considerations 263
2.7 Antennas 263
2.8 Label and compliance information 263
2.9 Information on test modes and additional testing requirements 263
2.10 Additional testing, Part 15 Subpart B disclaimer 263
Digi XBee Cellular LTE Cat 1 Embedded Modem User
Guide
The XBee Cellular Modem is an embedded Long-Term Evolution (LTE) Category 1 cellular module that
provides original equipment manufacturers (OEMs) with a simple way to integrate cellular
connectivity into their devices.
The XBee Cellular Modem enables OEMs to quickly integrate cutting edge 4G cellular technology into
their devices and applications without dealing with the painful, time-consuming, and expensive FCC
and carrier end-device certifications.
With the full suite of standard XBee API frames and AT commands, existing XBee customers can
seamlessly transition to this new device with only minor software adjustments. When OEMs add the
XBee Cellular Modem to their product, they create a future-proof design with flexibility to switch
between wireless protocols or frequencies as needed.
You can read some frequently asked questions here.
Applicable firmware and hardware
This manual supports the following firmware:
n100A
It supports the following hardware:
nXBC-V1-UT-xxx
SIM cards
If you order the wrong type of SIM card it will not work with the XBee Cellular Modem.
Verizon recommends SIM SKU: M2MTRI-NONRUG-GT-A or an equivalent that must include a 4FF
punch out. This SKU is in triple punch, so devices with 2FF/3FF or 4FF can use this SIM SKU.
Bulk SIMs for M2M/IoT are available from:
National distributor Network Contact
Phone
number Email
Reliance
Communications
Verizon
direct
Raja Ali 917-517-
7282
raja.ali@reliance.us
Ingram Micro - Sales Verizon
direct
Lesli Reeves 317-707-
2371
lesli.reeves@ingrammicro.com
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 14
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide SIM cards
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 15
National distributor Network Contact
Phone
number Email
Ingram Micro - Sales Verizon
direct
Steve Kreiger 317-707-
2474
steve.kreiger@ingrammicro.com
Ice Mobility Verizon
direct
Tom Puchala 847-876-
1768
tom.puchala@icemobility.com
KORE Verizon
MVNO
Genesis
Crowder
877-710-
5673
gcrowder@korewireless.com
KORE Verizon
MVNO
Mike Basso 877-710-
5673
mbasso@korewireless.com
Get started with the XBee Cellular Modem
Development Kit
This section describes how to connect the hardware in the XBee Cellular Modem Development Kit, and
provides some examples you can use to communicate with the device.
You should perform all of the steps below in the order shown.
1. Identify the kit contents
2. Connect the hardware
3. Review the development board
4. Set up cellular service
5. Update the firmware on your XBee
6. Use one of the following methods to verify your cellular connection:
nConnect to the Echo server
nConnect to the ELIZA server
nConnect to the Daytime server
Optional steps
You can review the information in these steps for more XBee connection examples and examples of
how to use MicroPython.
1. Review additional connection examples to help you learn how to use the device. See XBee
connection examples.
2. Review introductory MicroPython examples. You can use MicroPython to enhance the
intelligence of the XBee to enable you to do edge-computing by adding business logic in
MicroPython, rather than using external components.
nExample: hello world
nExample: turn on an LED
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 16
Get started with the XBee Cellular Modem Development Kit Identify the kit contents
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 17
Identify the kit contents
The Developer's kit includes the following:
One XBIB-U-DEV board
One 12 V power supply
Two cellular antennas with U.FL
connectors
One USB cable
One XBee Cellular Modem
Note The XBee Cellular Modem comes
attached to the board in ESDwrap.
One SIMcard
Get started with the XBee Cellular Modem Development Kit Connect the hardware
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 18
Connect the hardware
1. The XBee Cellular Modem should already be plugged into the XBIB-U-DEV board.
2. The SIMcard should be already be inserted into the XBee Cellular Modem. If not, install the
SIMcard into the XBee Cellular Modem.
WARNING! Never insert or remove the SIM card while the device is powered!
3. Connect the antennas to the XBee Cellular Modem. Align the U.FL connectors carefully, then
firmly press straight down to seat the connector. You should hear a snap when the antenna
attaches correctly. U.FL is fragile and is not designed for multiple insertions, so exercise
caution when connecting or removing the antennas. We recommend using a U.FL removal tool.
Get started with the XBee Cellular Modem Development Kit Connect the hardware
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 19
4. Plug the 12 V power supply to the power jack on the development board.
5. Connect the USB cable from a PC to the USB port on the development board. The computer
searches for a driver, which can take a few minutes to install.
l —5'\'J'4'mlll=‘ u :11‘W #51” - n n 11 10
Get started with the XBee Cellular Modem Development Kit XBIB-U-DEV reference
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 20
XBIB-U-DEV reference
This picture shows the XBee USB development board and the table that follows explains the callouts
in the picture.
Get started with the XBee Cellular Modem Development Kit XBIB-U-DEV reference
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 21
Number Item Description
1 Programmingheader Header used to program XBee programmable devices.
2 Self power module Advanced users onlyvoids the warranty. Depopulate R31 to
power the device using V+ and GND from J2 and J5. You can
connect sense lines to S+ and S- for sensing power supplies.
CAUTION: Voltage is not regulated. Applying the incorrect
voltage can cause fire and serious injury.1
3 Current testing Depopulating R31 allows a current probe to be inserted across P6
terminals. The current though P6/R31 powers the device only.
Other supporting circuitry is powered by a different trace.
4 Loopback jumper Populating P8 with a loopback jumper causes serial transmissions
both from the device and from the USB to loopback.
5 DC barrel plug: 6-20V Greater than 500 mA loads require a DC supply for correct
operation. Plug in the external power supply prior to the USB
connector to ensure that proper USB communications are not
interrupted.
6 LED indicator Yellow: Modem sending serial/UART data to host.
Green: Modem receiving serial/UART data from host.
Red: Associate.
7 USB Connects to your computer.
8 RSSI indicator See RSSI PWM. On the XBIB-U, more lights are better.
9 User buttons Connected to DIO lines for user implementation.
10 Reset button Press the reset button to reset the device to the default
configuration.
11 SPI power Connect to the power board from 3.3 V.
12 SPI Only used for surface-mount devices.
13 Indicator LEDs DS5: ON/SLEEP
DS2: DIO12, the LED illuminates when driven low.
DS3: DIO11, the LED illuminates when driven low.
DS4: DIO4, the LED illuminates when driven low.
14 Through-hole XBee
sockets
15 20-pin header Maps to standard through-hole XBee pins. Male, Samtec header,
part number: TSW-110-26-L-D. 2.54 mm / .100" pitch and row
spacing.
1Powering the board with J2 and J5 without R31 removed can cause shorts if the USB or barrel plug power are
connected. Applying too high a voltage destroys electronic circuitry in the device and other board components
and/or can cause injury.
XBee TH Develapmem Board .0 O .O O O O O 0 O 1:.qu , Cow-SJ ms
Get started with the XBee Cellular Modem Development Kit XBIB-CU-TH reference
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 22
XBIB-CU-TH reference
This picture shows the XBee-CU-TH development board and the table that follows explains the
callouts in the picture.
Note This module is sold separately.
ARHI
Get started with the XBee Cellular Modem Development Kit XBIB-CU-TH reference
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 23
Number Item Description
1 Secondary USB
(USB MICRO B)
and DIP Switch
Secondary USB Connector for direct programming of modules on some
XBee units. Flip the Dip switches to the right for I2C access to the
board; flip Dip switches to the left to disable I2C access to the board.
The USB_P and USB_N lines are always connected to the XBee,
regardless of Dip switch setting.
This USB port is not designed to power the module or the board. Do not
plug in a USB cable here unless the board is already being powered
through the main USB-C connector. Do not attach a USB cable here if
the Dip switches are pushed to the right.
WARNING! Direct input of USB lines into XBee units or I2C
lines not designed to handle 5V can result in the
destruction of the XBee or I2C components. Could cause
fire or serious injury. Do not plug in a USB cable here if the
XBee device is not designed for it and do not plug in a USB
cable here if the Dip switches are pushed to the right.
2 Current
Measure
Large switch controls whether current measure mode is active or
inactive. When inactive, current can freely flow to the VCC pin of the
XBee. When active, the VCC pin of the XBee is disconnected from the 3.3
V line on the development board. This allows current measurement to
be conducted by attaching a current meter across the jumper P10.
3 Battery
Connector
If desired, a battery can be attached to provide power to the
development board. The voltage can range from 2 V to 5 V. The positive
terminal is on the left.
If the USB-C connector is connected to a computer, the power will be
provided through the USB-C connector and not the battery connector.
Note See modem specifications for minimum voltage requirements for
your modem.
4 USB-C
Connector
Connects to your computer and provides the power for the
development board. This is connected to a USB to UART conversion chip
that has the five UART lines passed to the XBee. The UART Dip Switch
can be used to disconnect these UART lines from the XBee.
Note Requires USB 3.0 to supply required current.
5 LED indicator Red: UART DOUT (modem sending serial/UART data to host)
Green: UART DIN (modem receiving serial/UART data from host)
White: ON/SLP/DIO9
Blue: Connection Status/DIO5
Yellow: RSSI/PWM0/DIO10
6 User Buttons Comm DIO0 Button connects the Commissioning/DIO0 pin on the XBee
Connector through to a 10 Ωresistor to GND when pressed.
RESET Button Connects to the RESET pin on the XBee Connector to GND
when pressed.
Get started with the XBee Cellular Modem Development Kit XBIB-CU-TH reference
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 24
Number Item Description
7 Breakout
Connector
This 40 pin connector can be used to connect to various XBee pins as
shown on the silkscreen on the bottom of the board.
8 UART Dip
Switch
This dip switch allows the user to disconnect any of the primary UART
lines on the XBee from the USB to UART conversion chip. This allows for
testing on the primary UART lines without the USB to UART conversion
chip interfering. Push Dip switches to the right to disconnect the USB to
UART conversion chip from the XBee.
9 Grove
Connector
This connector can be used to attach I2C enabled devices to the
development board. Note that I2C needs to be available on the XBee in
the board for this functionality to be used.
Pin 1: I2C_CLK/XBee DIO1
Pin2: I2C_SDA/XBee DIO11
Pin3: VCC
Pin4: GND
10 Temp/Humidity
Sensor
This as a Texas Instruments HDC1080 temperature and humidity
sensor. This part is accessible through I2C. Be sure that the XBee that is
inserted into the development board has I2C if access to this sensor is
desired.
11 XBee Socket This is the socket for the XBee (TH form factor).
12 XBee Test
Point Pins
Allows easy access for probes for all 20 XBee TH pins. Pin 1 is shorted to
Pin 1 on the XBee and so on.
Get started with the XBee Cellular Modem Development Kit XBIB-C-GPS reference
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 25
XBIB-C-GPS reference
This picture shows the XBIB-C-GPS module and the table that follows explains the callouts in the
picture.
Note This module is sold separately. You must also have purchased an XBIB-CU-TH development
board.
Note For a demo of how to use MicroPython to parse some of the GPS NMEA sentences from the
UART, print them and report them to Digi Remote Manager, see Run the MicroPython GPSdemo.
Get started with the XBee Cellular Modem Development Kit Interface with the XBIB-C-GPS module
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 26
Number Item Description
1 40-pin
header
This header is used to connect the XBIB-C-GPS board to a compatible XBIB
development board. Insert the XBIB-C-GPS module slowly with alternating
pressure on the upper and lower parts of the connector. If added or removed
improperly, the pins on the attached board could bend out of shape.
2 GPS
unit
This is the CAM-M8Q-0-10 module made by u-blox. This is what makes the GPS
measurements. Proper orientation is with the board laying completely flat, with
the module facing towards the sky.
Interface with the XBIB-C-GPS module
The XBee Cellular Modem can interface with the XBIB-C-GPS board through the large 40-pin header.
This header is designed to fit into XBIB-C development board. This allows the XBee Cellular Modem in
the XBIB-C board to communicate with the XBIB-C-GPS board—provided the XBee device used has
MicroPython capabilities (see this link to determine which devices have MicroPython capabilities).
There are two ways to interface with the XBIB-C-GPS board: through the host board’s Secondary
UART or through the I2C compliant lines.
The following picture shows a typical setup:
Get started with the XBee Cellular Modem Development Kit Interface with the XBIB-C-GPS module
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 27
I2C communication
There are two I2C lines connected to the host board through the 40-pin header, SCL and SDA. I2C
communication is performed over an I2C-compliant Display Data Channel. The XBIB-C-GPS module
operates in slave mode. The maximum frequency of the SCL line is 400 kHz. To access data through
the I2C lines, the data must be queried by the connected XBee Cellular Modem.
For more information about I2C Operation see the I2C section of the Digi Micro Python Programming
Guide.
For more information on the operation of the XBIB-C-GPS board see the CAM-M8 datasheet. Other
CAM-M8 documentation is located here.
UART communication
There are two UART pins connected from the XBIB-C-GPS to the host board by the 40-pin header: RX
and TX. By default, the UART on the XBIB-C-GPS board is active and sends GPS readings to the
connected device’s secondary UART pins. Readings are transmitted once every second. The baud rate
of the UART is 9600 baud.
For more information about using Micro Python to communicate to the XBIB-C-GPS module, see Class
UART.
Run the MicroPython GPSdemo
The Digi MicroPython github repository contains a GPS demo program that parses some of the GPS
NMEA sentences from the UART, prints them and also reports them to Digi Remote Manager.
Note If you are unfamiliar with MicroPython on XBee you should first run some of the tutorials earlier
in this manual to familiarize yourself with the environment. See Get started with MicroPython. For
more detailed information, refer to the Digi MicroPython Programming Guide.
Step 1: Create a Remote Manager developer account
You must have a Remote Manager developer account to be able to use this program. Make sure you
know the user name and password for this account.
If you don't currently have a Remote Manager developer account, you can create a free developer
account.
Step 2: Download or clone the XBee MicroPython repository
1. Navigate to: https://github.com/digidotcom/xbee-micropython/
2. Click Clone or download.
3. You must either clone or download a zip file of the repository. You can use either method.
nClone: If you are familiar with GIT, follow the standard GITprocess to clone the
repository.
nDownload
a. Click Download zip to download a zip file of the repository to the download
folder of your choosing.
b. Extract the repository to a location of your choosing on your hard drive.
Get started with the XBee Cellular Modem Development Kit Cellular service
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 28
Step 3: Edit the MicroPython file
1. Navigate to the location of the repository zip file that you created in Step 2.
2. Navigate to: samples/gps
3. Open the MicroPython file: gpsdemo1.py
4. Using the editor of your choice, edit the MicroPython file. At the top of the file, enter the user
name and password for your Remote Manager developer account. The correct location is
indicated in the comments in the file.
Step 4: Run the program
1. Rename the file you edited in Step 3 from gpsdemo1.py to main.py.
2. Copy the renamed file onto your device's root filesystem directory.
3. Copy the following three modules from the locations specified below into your device's /lib
directory:
nFrom the /lib directory of the Digi xbee-micropython repository: urequest.py and
remotemanager.py
nFrom the /lib/sensor directory of the Digi xbee-micropython repository: hdc1080.py
Note These modules are required to be able to run the gpsdemo1.py.
4. Open XCTU and use the MicroPython Terminal to run the demo.
5. Type <CTRL>-R from the MicroPython prompt to run the code.
Cellular service
Digi now offers Cellular Bundled Service plans. This service includes pre-configured cellular data
options that are ideal for IoT applications, bundled together with Digi Remote Manager for customers
who want to remotely monitor and manage their devices.
To learn more, or obtain the plan that is right for your needs, contact us:
nBy phone: 1-877-890-4014 (USA/toll free) or +1-952-912-3456 (International). Select the
Wireless Plan Support or Activation option in the menu.
nBy email: Data.Plan.QuoteDesk@digi.com.
WARNING! Digi Remote Manager is enabled by default on the XBee device. You should
configure the device to avoid excess cellular data usage. For more information, see
Configure Remote Manager keepalive interval.
The XBee Cellular kit includes six months of free cellular service. Six months of free cellular service
assumes a rate of 5 MB/month. If you exceed a limit of 30 MB during the six month period your SIM will
be deactivated.
Update the firmware on your XBee
You should update your XBee to the latest device firmware and cellular modem firmware.
Get started with the XBee Cellular Modem Development Kit Update the firmware on your XBee
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 29
Update modem firmware
nFrom XCTU. See Configure and update your XBee with XCTU.
nUpdate the modem firmware for XBee Cellular devices. See Update the modem firmware for
XBee devices.
Configure and update your XBee with XCTU
You should update your XBee to the latest firmware available for the device.
XBee Configuration and Test Utility (XCTU) is a multi-platform program developed by Digi 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.
XCTU does not work directly over an SPI interface.
For instructions on downloading and using XCTU, see the XCTU User Guide.
Note If you are on a macOS computer and encounter problems installing XCTU, see Correct a macOS
Java error.
Update the device firmware
You can use XCTU to update the firmware.
1. To use XCTU, you may need to install FTDI Virtual COMport (VCP)drivers onto your computer.
Click here to download the drivers for your operating system.
2. Upgrade XCTU to version 6.4.2 or later. This step is required.
3. You must add a device to XCTU before you can update the device's firmware from XCTU.
4. Update to the latest modem firmware from XCTU.
Check for cellular registration and connection
You should verify proper cellular network registration and address assignment.
Add a device
These instructions show you how to add the XBee Cellular Modem to XCTU.
If XCTU does not find your serial port, see Cannot find the serial port for the device and Enable Virtual
COM port (VCP) on the driver.
1. Launch XCTU .
Note XCTU's Update the radio module firmware dialog box may open and will not allow you
to continue until you click Update or Cancel on the dialog.
2. Click Help >Check for XCTUUpdates to ensure you are using the latest version of XCTU.
3. Click the Discover radio modules button in the upper left side of the XCTU screen.
4. In the Discover radio devices dialog, select the serial ports where you want to look for XBee
modules, and click Next.
5. In the Set port parameters window, maintain the default values and click Finish.
Get started with the XBee Cellular Modem Development Kit Update the firmware on your XBee
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 30
6. As XCTU locates radio modules, they appear in the Discovering radio modules dialog box.
7. Select the device(s) you want to add and click Add selected devices.
If your module could not be found, XCTU displays the Could not find any radio module dialog
providing possible reasons why the module could not be added.
Update to the latest modem firmware from XCTU
Firmware is the program code stored in the device's persistent memory that provides the control
program for the device. Use XCTU to update the firmware.
Note If you have already updated the firmware in a previous step, this process is not necessary.
1. Launch XCTU .
2. Click the Configuration working modes button .
3. Select a local XBee module from the Radio Modules list.
4. Click the Update firmware button to ensure you have the most current firmware.
The Update firmware dialog displays the available and compatible firmware for the selected
XBee module.
5. Make sure you check the Force the module to maintain its current configuration box and
then click Update.
6. Select the product family of the XBee module, the function set, and the latest firmware version.
7. Click Update. A dialog displays update progress. Click Show details for details of the firmware
update process.
See How to update the firmware of your modules in the XCTU User Guide for more information.
Check for cellular registration and connection
In the following examples, proper cellular network registration and address assignment must occur
successfully. The LED on the development board blinks when the XBee Cellular Modem is registered to
the cellular network; see Associate LED functionality. If the LEDremains solid, registration has not
occurred properly.
Registration can take several minutes.
Note Make sure you are in an area with adequate cellular network reception or the XBee Cellular
Modem will not make the connection.
Note Check the antenna connections if the device has trouble connecting to the network.
In addition to the LED confirmation, you can check the AT commands below in XCTU to check the
registration and connection.
To view these commands:
1. Open XCTU.
2. Add a device.
3. Click the Configuration working mode button.
Get started with the XBee Cellular Modem Development Kit Update the firmware on your XBee
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 31
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5. Update to the latest modem firmware from XCTU.
Note To search for an ATcommand in XCTU, use the search box .
The relevant commands are:
nAI (Association Indication) reads 0when the device successfully registers to the cellular
network. If it reads 23 it is connecting to the Internet; 22 means it is registering to the cellular
network.
nMY (Module IPAddress) should display a valid IPaddress. If it reads 0.0.0.0, it has not
registered yet.
Note To read a command's value, click the Read button next to the command.
Update the modem firmware for XBee devices
This process explains how to update the modem firmware for XBee Cellular devices.
Get started with the XBee Cellular Modem Development Kit Update the firmware on your XBee
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 32
Update the modem firmware
1. Make sure you have the correct version of the modem firmware for your XBee device.
2. Enter programming (bootloader) mode. Use one of the following methods: ATcommands or
hardware signaling.
nATcommands
a. Send the %P command. The %P command must be sent an argument
derived from the SL parameter of the module being updated. The argument
is the value of SL added to the value 0xDB8A and then masked by performing
a bitwise-AND with 0x3FFF.
i. Run ATSL to get the address value, which is in hex.
ATSL
123456
ii. Add bitwise-AND with 0x3FFF.
(0xDB8A + 0x123456) & 0x3FFF= 0x0FE0
iii. Send the command AT%PFE0.
AT%PFE0
b. You will receive an error, which is expected.
c. Send the FRcommand to reboot and enter into bootloader.
nInvoke the bootloader with hardware signaling
a. De-Assert RTS (pin 16).
b. Assert DTR (pin 9).
c. Put DIN in a low state (break) (pin 3).
d. Reset the module (pin 5).
e. Release the break on DIN (pin 3) The module should now be in bootloader at
38400 baud.
3. Once the module is in programming (bootloader) mode, configure the local serial port to
38400/8/N/1.
Get started with the XBee Cellular Modem Development Kit Update the firmware on your XBee
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 33
4. Get the hardware version of the radio module from the bootloader.
a. Send the V command. The response to that command has the following format:
XXXXYYYYZZAABBBBCCCCCCCCCCCCCCCC nXXXX: The hardware
version. See ATHV,
little endian.
nYYYY: The hardware
revision. See AT%R,
little endian.
nZZ: The hardware
compatibility number.
See AT%C.
nAA: Unused and
should be 0.
nBBBB: The hardware
series. See ATHS, little
endian.
nCCCCCCCCCCCCCCCC
: The serial number.
5. If possible, change the baud rate of the serial port to optimize the firmware update process.
Send the X command to the bootloader.
nThe bootloader answers with the maximum supported baud rate (in ASCII) and, just
after that, the bootloader changes its baud rate to that value. Change your baud rate to
match the max supported rate.
nIf the bootloader does not answer to this command, remain at the current rate.
6. Send the I command (initialization command). This command erases the current firmware from
the device.
7. Transfer the firmware to the device using the transfer protocol shown below.
Get started with the XBee Cellular Modem Development Kit Update the firmware on your XBee
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 34
Transfer the firmware to the device
1. You must split the file into 512 byte blocks.
2. Transfer each block using the following structure, with block index and CRC16 sent in little
endian byte:
P [2 bytes for block index] [block data with page size length] [2 bytes for
CRC16]
Note CRC16 is calculated only with the bytes of the page to be sent, and is initialized with
0x0000. The polynomial used for the CRC16 is 0x8005.
3. After each block is transfered, wait for a response. Options are:
n0x55 - ACK: This is the expected answer.
n0x12: Checksum/CRC16 error.
n0x13: Flash write/verify error.
Note If an error occurs, you may try to transfer each block up to three times.
4. Verify and write the firmware to flash.
a. Send the C command (verify) to verify and write the firmware to the flash.
b. Verify that the answer to this command is 0x55 (ACK). Any other result is an error.
5. Wait a couple of seconds for the firmware to be installed and start running.
XBee connection examples
The following examples provide some additional scenarios you can try to get familiar with the XBee
Cellular Modem. These examples are focused on inter-operating with a host processor to drive the
XBee.
If you are interested in using the intelligence built into the XBee, see Get started with MicroPython.
Note Some carriers restrict your internet access. If access is restricted, running some of these
examples may not be possible. Check with your carrier provider to determine whether internet access
is restricted.
Connect to the Echo server 36
Connect to the ELIZA server 38
Connect to the Daytime server 40
Send an SMS message to a phone 42
Perform a (GET) HTTP request 44
Get started with CoAP 46
Connect to a TCP/IP address 51
Get started with MQTT 52
Software libraries 60
Debugging 60
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 35
XBee connection examples Connect to the Echo server
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 36
Connect to the Echo server
This server echoes back the messages you type.
Note For help with debugging, see Debugging.
The following table explains the AT commands that you use in this example.
At
command Value Description
IP (IP
Protocol)
1 Set the expected transmission mode to TCP communications.
TD (Text
Delimiter)
D (0x0D) The text delimiter to be used for Transparent mode, as an ASCII hex
code. No information is sent until this character is entered, unless the
maximum number of characters has been reached. Set to 0to disable
text delimiter checking. Set to Dfor a carriage return.
DL
(Destination
Address)
52.43.121.77 The target IPaddress of the echo server.
DE
(Destination
Port)
0x2329 The target port number of the echo server.
To communicate with the Echo server:
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in Connect the hardware.
2. Open XCTU and Add a device.
3. Click the Configuration working mode button.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5. To switch to TCP communication, in the IP field, select 1 and click the Write button .
6. To enable the XBee Cellular Modem to recognize carriage return as a message delimiter, in the
TD field, type Dand click the Write button.
7. To enter the destination address of the echo server, in the DL field, type 52.43.121.77 and click
the Write button.
8. To enter the destination IP port number, in the DE field, type 2329 and click the Write button.
Note XCTU does not follow the standard hexadecimal numbering convention. The leading 0x is
not needed in XCTU.
9. Click the Consoles working mode button on the toolbar to open a serial console to the
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
Echo Server Star-ts abcdefgllijk akdefghijk llnopqrstuvuxyz llmopqr-stuwxyz W 45636864:20536572766572205374617274730Aw 6161636465666768696A65W 6162636455666758696ASBD SCSDGESF70717273747576777B797AU) 6C606E6F7B7172737475767778797A00
XBee connection examples Connect to the Echo server
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 37
10. Click the Open button to open a serial connection to the device.
11. Click in the left pane of the Console log, then type in the Console to talk to the echo server.
The following screenshot provides an example of this chat.
7‘.
XBee connection examples Connect to the ELIZA server
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 38
Connect to the ELIZA server
You can use the XBee Cellular Modem to chat with the ELIZA Therapist Bot. ELIZAis an artificial
intelligence (AI) bot that emulates a therapist and can perform simple conversations.
Note For help with debugging, see Debugging.
The following table explains the AT commands that you use in this example.
At command Value Description
IP (IP Protocol) 1 Set the expected transmission mode to TCP
communications.
DL (Destination
Address)
52.43.121.77 The target IP address of the ELIZA server.
DE (Destination Port) 0x2328 The target port number of the ELIZA server.
To communicate with the ELIZA Therapist Bot:
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in Connect the hardware.
2. Open XCTU and Add a device.
3. Click the Configuration working mode button.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5. To switch to TCP communication, in the IP field, select 1 and click the Write button .
6. To enter the destination address of the ELIZATherapist Bot, in the DL field, type 52.43.121.77
and click the Write button.
7. To enter the destination IP port number, in the DE field, type 2328 and click the Write button.
8. Click the Consoles working mode button on the toolbar to open a serial console to the
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
9. Click the Open button to open a serial connection to the device.
10. Click in the left pane of the Console log, then type in the Console to talk to the ELIZA Therapist
Bot. The following screenshot provides an example of this chat with the user's text in blue.
Hello. How are yau feeling today? Honderful How do yau feel when you say that? Like a lillinn dollars. I see. And what does that tell you? That I don't need a therapist. How does that make you feel? 48 65 69 GE 48 6F 75 20 69 6F 49 28 68 61 6E 27 48 6F 66 65 6C 6C 6F 67 20 74 77 20 64 73 61 79 SE 7.0 64 73 65 65 74 20 74 74 20 6E 77 28 64 55 6C 3F 2E20486F772061726520796F75206665656€ “6461793FBAS76F6E64657266756C90 6F 20 79 6F 75 20 6665656€ZB 77 GE 6565 10 796F 20746861743FOA4£6965652961296D696C6C 6F6C6C6172732E00 2E 29 2841 GE 64207768 61 74 2064“ 65 73 28 74 656C6C20796F753F0454686174294929646F 6565642861237468657261736973742Ew 5F 65 73 20 74 68 61 74 2% 5|) 61 EB 65 20 79 6F 75 2a BA
XBee connection examples Connect to the ELIZA server
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 39
7‘.
XBee connection examples Connect to the Daytime server
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 40
Connect to the Daytime server
The Daytime server reports the current Coordinated Universal Time (UTC) value responding to any
user input.
Note For help with debugging, see Debugging.
The following table explains the AT commands that you use in this example.
At
command Value Description
IP (IP
Protocol)
1 Set the expected transmission mode to TCP communications.
DL
(Destination
Address)
52.43.121.77 The target IP of the Daytime server.
DE
(Destination
Port)
0x232A The target port number of the Daytime server.
TD (Text
Delimiter)
0The text delimiter to be used for Transparent mode, as an ASCII hex
code. No information is sent until this character is entered, unless the
maximum number of characters has been reached. Set to zero to
disable text delimiter checking.
To communicate with the Daytime server:
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in Connect the hardware.
2. Open XCTU and Add a device.
3. Click the Configuration working mode button.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5. To switch to TCP communication, in the IP field, select 1 and click the Write button .
6. To enter the destination address of the daytime server, in the DL field, type 52.43.121.77 and
click the Write button.
7. To enter the destination IP port number, in the DE field, type 232A and click the Write button.
8. To disable text delimiter checking, in the TD field, type 0and click the Write button.
9. Click the Consoles working mode button on the toolbar to open a serial console to the
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
10. Click the Open button to open a serial connection to the device.
ED Daynme Server Starts 44 61 79 54 59 6|) 65 la 53 55 72 7s 65 72 29 53 74 61 72 7d 73 BA 32 2016788726 19: 8:24 38 31 36 2|) 38 38 2D 32 36 28 31 39 3A 35 38 3A 32 34 GA on 323031362038352032362831393A35383A323EOA283130 2016-09—26 19: 9:28 31 36 2D 30 38 2D 32 36 20 31 39 3A 35 30 3A 33 31 BA Zola-eE-zs 19:”:31
XBee connection examples Connect to the Daytime server
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 41
11. Click in the left pane of the Console log, then type in the Console to query the Daytime server.
The following screenshot provides an example of this chat.
XBee connection examples Send an SMS message to a phone
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 42
Send an SMS message to a phone
The XBee Cellular Modem can send and receive Short Message Service (SMS) transmissions (text
messages) while in Transparent mode. This allows you to send and receive text messages to and from
an SMS capable device such as a mobile phone.
Note For help with debugging, see Debugging.
The following table explains the AT commands that you use in this example.
Command Value Description
AP (APIEnable) 0 Set the device's API mode to Transparent mode.
IP (IP Protocol) 2 Set the expected transmission mode to SMScommunication.
P#
(DestinationPhone
Number)
<Target
phone
number>
The target phone number that you send to, for example, your
cellular phone. See P# (Destination Phone Number) for instructions
on using this command.
TD (Text Delimiter) D (0x0D) The text delimiter to be used for Transparent mode, as an ASCII hex
code. No information is sent until this character is entered, unless
the maximum number of characters has been reached. Set to 0to
disable text delimiter checking. Set to Dfor a carriage return.
PH (Module's SIM
phone number)
Read
only
The value that represents your device's phone number as supplied
by the SIM card. This is used to send text messages to the device
from another cellular device.
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in Connect the hardware.
2. Open XCTU and Add a device.
3. Click the Configuration working mode button.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5. To switch to SMS communication, in the IP field, select 2and click the Write button .
6. To enter your cell phone number, in the P# field, type the <target phone number> and click
the Write button. Type the phone number using only numbers, with no dashes. You can use the
+prefix if necessary. The target phone number is the phone number you wish to send a text to.
7. In the TD field, type Dand click the Write button.
8. Note the number in the PH field; it is the XBee Cellular Modem phone number, which you see
when it sends an SMS to your phone.
9. Click the Consoles working mode button on the toolbar to open a serial console to the
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
hello world ‘ 53 55 SC SC 6F 29 77 s; 72 sc 54 on ‘ Connezt with (onFidente 43 6}: SE SE 55 53 7A 20 77 59 7A 53 20 53 6F 6E 55 59 54 55 6E 53 55
XBee connection examples Send an SMS message to a phone
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 43
10. Click the Open button to open a serial connection to the device.
11. Click in the left pane of the Console log, type hello world and press Enter. The XBee Cellular
Modem sends the message to the destination phone number set by the P# command.
Note If you are receiving individual characters, verify that you set TD correctly.
12. When the phone receives the text, you can see that the sender's phone number matches the
value reported by the XBee Cellular Modem with the PH command.
13. On the phone, reply with the text connect with confidence and the XBee Cellular Modem
outputs this reply from the UART.
XBee connection examples Perform a (GET) HTTP request
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 44
Perform a (GET) HTTP request
You can use the XBee Cellular Modem to perform a GET Hypertext Transfer Protocol (HTTP) request
using XCTU. HTTP is an application-layer protocol that runs over TCP. This example uses httpbin.org/
as the target website that responds to the HTTP request.
Note For help with debugging, see Debugging.
To perform a GETrequest:
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in Connect the hardware.
2. Open XCTU and Add a device.
3. Click the Configuration working mode button.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5. To enter the destination address of the target website, in the DL field, type httpbin.org and
click the Write button .
6. To enter the HTTP request port number, in the DE field, type 50 and click the Write button.
Hexadecimal 50 is 80 in decimal.
7. To switch to TCP communication, in the IP field, select 1and click the Write button.
8. To move into Transparent mode, in the APfield, select 0and click the Write button.
9. Wait for the AI (Association Indication) value to change to 0(Connected to the Internet).
10. Click the Consoles working mode button on the toolbar.
11. From the AT console, click the Add new packet button in the Send packets dialog. The
Add new packet dialog appears.
12. Enter the name of the data packet.
13. Type the following data in the ASCII input tab:
GET /ip HTTP/1.1
Host: httpbin.org
14. Click the HEX input tab and add 0A (zero A) after each 0D (zero D), and add an additional 0D 0A
at the end of the message body. For example, copy and past the following text into the HEX
input tab:
47 45 54 20 2F 69 70 20 48 54 54 50 2F 31 2E 31 0D 0A 48 6F 73 74 3A 20 68 74 74 70 62 69 6E
2E 6F 72 67 0D 0A 0D 0A
Note The HTTP protocol requires an empty line (a line with nothing preceding the CRLF) to terminate
the request.
XBee connection examples Perform a (GET) HTTP request
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 45
15. Click Add packet.
16. Click the Open button .
17. Click Send selected packet.
18. A GETHTTP response from httpbin.org appears in the Console log.
0 1 2 3 91234567890123456789012345678901 +-+-+»+-+-+»+-+-+»+-+-+»+-+-+»+-+-+»+-+-+-+-+-+-+-+-+-+-+-+-+»+-+ IVerI T I TKL I Code I Message ID I +»+»+»+»+»+»+»+»+-+»+»+»+»+»+»+-+»+»+-+-+»+-+»+»+-+»+-+-+»+-+-+»+ I Token (if any, TKL bytes) +—+—+»+—+—+»+—+—+-+—+—+-+—+—+-+-+—+-+-+-+-+-+-+-+-+-+-+-+-+-+-+»+ I Options (if any) +—+-+-+—+-+-+—+—+-+—+—+-+—+—+-+-+—+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ I1 1 1 1 1 1 1 1| Payload (if any) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+—+-+-+—+-+-+
XBee connection examples Get started with CoAP
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 46
Get started with CoAP
Constrained Application Protocol (CoAP) is based on UDP connection and consumes low power to
deliver similar functionality to HTTP. This guide contains information about sending GET, POST, PUT
and DELETE operations by using the Coap Protocol with XCTU and Python code working with the XBee
Cellular Modem and Coapthon library (Python 2.7 only).
The Internet Engineering Task Force describes CoAP as:
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and
building automation. CoAP provides a request/response interaction model between application
endpoints, supports built-in discovery of services and resources, and includes key concepts of
the Web such as URIs and Internet media types. CoAP is designed to easily interface with HTTP
for integration with the Web while meeting specialized requirements such as multicast
support, very low overhead, and simplicity for constrained environments (source).
CoAP terms
When describing CoAP, we use the following terms:
Term Meaning
Method COAP's method action is similar to the HTTP method. This guide discusses the GET,
POST, PUT and DELETE methods. With these methods, the XBee Cellular Modem can
transport data and requests.
URI URI is a string of characters that identifies a resource served at the server.
Token Atoken is an identifier of a message. The client uses the token to verify if the received
message is the correct response to its query.
Payload The message payload is associated with the POST and PUT methods. It specifies the
data to be posted or put to the URI resource.
MessageID The message ID is also an identifier of a message. The client matches the message ID
between the response and query.
CoAP quick start example
The following diagram shows the message format for the CoAP protocol; see ISSN: 2070-1721 for
details:
This is an example GET request:
44 01 C4 09 74 65 73 74 B7 65 78 61 6D 70 6C 65
W
XBee connection examples Get started with CoAP
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 47
The following table describes the fields in the GETrequest.
Field HEX Bits Meaning
Ver 44 01 Version 01, which is mandatory here.
T 00 Type 0: confirmable.
TKL 0100 Token length: 4.
Code 01 000 00001 Code: 0.01, which indicates the GET method.
Message ID C4 09 2 Bytes equal
to hex at left
Message ID. The response message will have the
same ID. This can help out identification.
Token 74 65 73 74 4 Bytes equal
to hex at left
Token. The response message will have the same
token. This can help out identification.
Option delta B7 1011 Delta option: 11 indicates the option data is Uri-Path.
Optionlength 0111 Delta length: 7 indicates there are 7 bytes of data
following as a part of this delta option.
Option value 65 78 61 6D
70 6C 65
7 Bytes equal
to hex at left
Example.
Configure the device
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in Connect the hardware.
2. Open XCTU and click the Configuration working mode button.
3. Add the XBee Cellular Modem to XCTU; see Add a device.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5. To switch to UDPcommunication, in the IP field, select 0and click the Write button .
6. To set the target IP address that the XBee Cellular Modem will talk to, in the DL field type
52.43.121.77and click the Write button . A CoAP server is publicly available at address
52.43.121.77.
7. To set the XBee Cellular Modem to send data to port 5683 in decimal, in the DEfield, type 1633
and click the Write button.
8. To move into Transparent mode, in the APfield, select 0and click the Write button.
9. Wait for the AI (Association Indication) value to change to 0(Connected to the Internet). You
can click Read to get an update on the AI value.
Example: manually perform a CoAPrequest
Follow the steps in Configure the device prior to this example. This example performs the CoAP
GETrequest:
XBee connection examples Get started with CoAP
Digi XBee Cellular LTE Cat 1 Embedded Modem User Guide 48
nMethod: GET
nURI: example
nGiven message token: test
1. Click the Consoles working mode button on the toolbar to add a customized packet.
2. From the AT console, click the Add new packet button in the Send packets dialog. The
Add new packet dialog appears.
3. Click the HEX tab and type the name of the data packet: GET_EXAMPLE.
4. Copy and past the following text into the HEX input tab:
44 01 C4 09 74 65 73 74 B7 65 78 61 6D 70 6C 65
This is the CoAP protocol message decomposed by bytes to perform a GET request on an
example URI with a token test.
5. Click Add packet.
6. Click the Open button .
7. Click Send selected packet. The message is sent to the public CoAP server configured in
Configure the device. A response appears in the Console log. Blue text is the query, red text is
the response.
The payload is Get to uri: example, which specifies that this is a successful CoAP GET to URI end
example, which was specified in the query.
Click the Close button to terminate the serial connection.
Example: use Python to generate a CoAP message
This example illustrates how the CoAP protocol can perform GET/POST/PUT/DELETE requests
similarly to the HTTP protocol and how to do this using the XBee Cellular Modem. In this example, the
XBee Cellular Modem talks to a CoAP Digi Server. You can use this client code to provide an abstract
wrapper to generate a CoAP message that commands the XBee Cellular Modem to talk to the remote
CoAP server.
Note It is crucial to configure the XBee Cellular Modem settings. See Configure the device and follow
the steps. You can target the IP address to a different CoAP public server.
1. Install Python 2.7. The Installation guide is located at: python.org/downloads/.
2. Download and install the CoAPthon library in the python environment from
pypi.python.org/pypi/CoAPthon.
3. Download these two .txt files: Coap.txt and CoapParser.txt. After you download them, open the
files in a text editor and save them as .py files.
4. In the folder that you place the Coap.py and CoapParser.py files, press Shift +right-click and
then click Open command window.
5. At the command prompt, type python Coap.py and press Enter to run the program.