Digi XB3C1 User Manual

Digi XBee3® Cellular LTE Cat 1
Smart Modem
User Guide
Revision history—90002253
Revision Date Description
A
January 2018 Initial release of the document.
Trademarks and copyright
© 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.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
2
Contents
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
Applicable firmware and hardware 9 SIM cards 9
Getting started with the XBee Smart Modem Development Kit
Identify the kit contents 11 XBIB-U-DEV reference 12 Cellular service 13 Connect the hardware 14 Configure the device using XCTU 15
Add a device 15 Check for cellular registration and connection 16 Update to the latest firmware 16
Send an SMS message to a phone 18
Debugging 19
Connect to the ELIZA server 20
Debugging 21
Connect to the echo server 22
Debugging 23
Connect to the Daytime server 24
Debugging 25
Connect to a TCP/IP address 26
Debugging 27
Perform a (GET) HTTP request 28
Debugging 29
Get started with MQTT 30
Example: MQTT connect 30 Send a connect packet 32 Example: send messages (publish) with MQTT 34 Example: receive messages (subscribe) with MQTT 34 Use MQTT over the XBee Cellular Modem with a PC 35
Get started with CoAP 39
CoAP terms 39 CoAP quick start example 39 Configure the device 40 Example: manually perform a CoAPrequest 40 Example: use Python to generate a CoAP message 41
Configure the XBee Smart Modem using Digi Remote Manager 44
Create a Remote Manager account 44
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
3
Get the XBee Smart Modem IMEI number 44 Add a XBee Smart Modem to Remote Manager 44 Update the firmware 45
Software libraries 45
Get started with MicroPython
About MicroPython 47
Why use MicroPython 47 MicroPython on the XBee Smart Modem 47 Use XCTU to enter the MicroPython environment 47 Use the MicroPython Terminal in XCTU 48 Example: hello world 48 Example: turn on an LED 48 Example: code a request help button 49
Enter MicroPython paste mode 50
Catch a button press 50
Send a text (SMS) when the button is pressed 52
Add the time the button was pressed 53 Exit MicroPython mode 54 Other terminal programs 54
Tera Term for Windows 54 Use picocom in Linux 55
Technical specifications
Interface and hardware specifications 58 RF characteristics 58 Networking specifications 58 Power requirements 58 Power consumption 59 Electrical specifications 59 Regulatory approvals 60
Hardware
Mechanical drawings 62 Pin signals 62
Pin connection recommendations 63 RSSI PWM 64 SIM card 64 The Associate LED 64
Antenna recommendations
Antenna connections 67 Antenna placement 68
Design recommendations
Cellular component firmware upgrades 70 USB Direct design 70
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
4
Power supply considerations 70 Add a capacitor to the RESET line 70 Heat considerations and testing 71 Heat sink guidelines 71 Add a fan to provide active cooling 73
Cellular connection process
Connecting 75 Cellular network 75 Data network connection 75 Data communication with remote servers (TCP/UDP) 75 Disconnecting 75 SMS encoding 76
Modes
Select an operating mode 78 Transparent operating mode 79 API operating mode 79 Bypass operating mode 79
Enter Bypass operating mode 79
Leave Bypass operating mode 80
Restore cellular settings to default in Bypass operating mode 80 USB direct mode 80
Enable USB direct mode 80 Command mode 80
Enter Command mode 81
Send AT commands 81
Apply command changes 82
Make command changes permanent 82
Exit Command mode 82
Sleep modes
About sleep modes 84 Normal mode 84 Pin sleep mode 84 Cyclic sleep mode 84 Cyclic sleep with pin wake up mode 84 Airplane mode 84 Connected sleep mode 84 The sleep timer 85 MicroPython sleep behavior 85
Serial communication
Serial interface 87 Serial data 87 UART data flow 87 Serial buffers 87 CTS flow control 88 RTS flow control 88
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
5
AT commands
MicroPython commands 90
PS (Python Startup) 90
PY (MicroPython Command) 90 Special commands 91
AC (Apply Changes) 91
FR (Force Reset) 91
RE command 92
WR command 92 Cellular commands 92
PH (Phone Number) 92
S# (ICCID) 92
IM (IMEI) 93
MN (Operator) 93
MV (Modem Firmware Version) 93
DB (Cellular Signal Strength) 93
AN (Access Point Name) 93
OA (Operating APN) 94
AM (Airplane Mode) 94
DV (Antenna Diversity) 94 Network commands 95
IP (IP Protocol) 95
TL (SSL/TLS Protocol Version) 95
TM (IP Client Connection Timeout) 95
TS (IP Server Connection Timeout) 96
DO (Device Options) 96
EQ (Device Cloud FQDN) 96 Addressing commands 97
SH (Serial Number High) 97
SL (Serial Number Low) 97
DL (Destination Address) 97
P# (Destination Phone Number) 97
N1 (DNS Address) 98
N2 (DNS Address) 98
DE (Destination Port) 98
TD (Text Delimiter) 98
MY (Module IP Address) 99
LA (Lookup IP Address of FQDN) 99
OD (Operating Destination Address) 99
C0 (Source Port) 99 Serial interfacing commands 100
BD (Baud Rate) 100
NB (Parity) 101
SB (Stop Bits) 101
RO (Packetization Timeout) 101
FT (Flow Control Threshold) 101
AP (API Enable) 102 I/O settings commands 102
D0 (DIO0/AD0) 102
D1 (DIO1/AD1) 103
D2 (DIO2/AD2) 103
D3 (DIO3/AD3) 104
D4 (DIO4) 104
D5 (DIO5/ASSOCIATED_INDICATOR) 105
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
6
D6 (DIO6/RTS) 105
D7 (DIO7/CTS) 105
D8 (DIO8/SLEEP_REQUEST) 106
P0 (DIO10/PWM0 Configuration) 107
P1 (DIO11/PWM1 Configuration) 107
P2 (DIO12 Configuration) 108
PD (Pull Direction) 108
PR (Pull-up/down Resistor Enable) 109
M0 (PWM0 Duty Cycle) 109 I/O sampling commands 110
TP (Temperature) 110 Sleep commands 110
SM (Sleep Mode) 110
SP (Sleep Period) 111
ST (Wake Time) 111
SO (Sleep Options) 111 Command mode options 112
CC (Command Sequence Character) 112
CT (Command Mode Timeout) 112
GT (Guard Times) 112 Firmware version/information commands 112
VR (Firmware Version) 112
VL (Verbose Firmware Version) 113
HV (Hardware Version) 113
AI (Association Indication) 113
HS (Hardware Series) 114
CK (Configuration CRC) 114 Diagnostic interface commands 114
DI (Device Cloud Indicator) 114
CI (Protocol/Connection Indication) 114 Execution commands 116
NR (Network Reset) 116
!R (Modem Reset) 117
IS (Force Sample) 117
Operate in API mode
API mode overview 120 Use the AP command to set the operation mode 120 API frame format 120
API operation (AP parameter = 1) 120
API operation with escaped characters (AP parameter = 2) 121 Frame descriptions 124
AT Command - 0x08 124
Transmit (TX) SMS - 0x1F 125
Transmit (TX) Request: IPv4 - 0x20 126
AT Command Response - 0x88 127
Transmit (TX) Status - 0x89 128
Modem Status - 0x8A 129
Receive (RX) Packet: SMS - 0x9F 130
Receive (RX) Packet: IPv4 - 0xB0 131
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
7
Socket behavior
Supported sockets 133 Secure Sockets Layer (SSL) certificate checking 133 Socket timeouts 133 Socket limits in API mode 133 Enable incoming TCP connections 133 API mode behavior for outgoing TCP and SSL connections 134 API mode behavior for outgoing UDP data 134 API mode behavior for incoming TCP connections 135 API mode behavior for incoming UDP data 135 Transparent mode behavior for outgoing TCP and SSL connections 135 Transparent mode behavior for outgoing UDP data 136 Transparent mode behavior for incoming TCP connections 136 Transparent mode behavior for incoming UDP connections 136
Troubleshooting
Cannot find the serial port for the device 138
Condition 138
Solution 138 Correct a macOS Java error 140
Condition 140
Solution 140 Unresponsive cellular component in Bypass mode 141
Condition 141
Solution 141 Not on expected network after APN change 142
Condition 142
Solution 142 Syntax error at line 1 142
Solution 142 Error Failed to send SMS 142
Solution 142
Regulatory information
Modification statement 144 Interference statement 144 FCC Class B digital device notice 144 RF exposure 145 FCC-approved antennas 145
Bluetooth antennas 145
Dipole antennas 145
Flex PCB antennas 145
Cellular antennas 146 Labeling requirements for the host device 146
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
8

Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide

The XBee Smart 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 Smart 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 Smart 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:
n 310xx
It supports the following hardware:
n XB3-C-A1-UT-xxx

SIM cards

The XBee Smart Modem requires a 4FF (Nano) size SIM card. The SIM interface supports both 1.8 V and 3 V SIM types.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
9

Getting started with the XBee Smart Modem Development Kit

This section describes how to connect the hardware in the XBee Smart Modem Development Kit, and provides some examples you can use to communicate with the device.
Identify the kit contents 11 XBIB-U-DEV reference 12 Cellular service 13 Connect the hardware 14 Configure the device using XCTU 15 Send an SMS message to a phone 18 Connect to the ELIZA server 20 Connect to the echo server 22 Connect to the Daytime server 24 Connect to a TCP/IP address 26 Perform a (GET) HTTP request 28 Get started with MQTT 30 Get started with CoAP 39 Configure the XBee Smart Modem using Digi Remote Manager 44 Software libraries 45
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
10
Getting started with the XBee Smart Modem Development Kit Identify the kit contents

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 Smart Modem
One SIMcard
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
11
Getting started with the XBee Smart Modem Development Kit XBIB-U-DEV reference

XBIB-U-DEV reference

This picture shows the XBee USB development board and the table that follows explains the callouts in the picture.
Number Item Description
1 Programmingheader Header used to program XBee Programmable devices.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
12
Getting started with the XBee Smart Modem Development Kit Cellular service
Number Item Description
2 Self power module
3 Current testing Depopulating R31 allows a current probe to be inserted across P6
4 Loopback jumper Populating P8 with a loopback jumper causes serial transmissions
5 DC barrel plug: 6-20V Greater than 500 mA loads require a DC supply for correct
6 LED indicator
7 USB
8 RSSI indicator
Advanced users only—voids 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.
terminals. The current though P6/R31 powers the device only. Other supporting circuitry is powered by a different trace.
both from the device and from the USB to loopback.
operation. Plug in the external power supply prior to the USB connector to ensure that proper USB communications are not interrupted.
Yellow: Modem sending serial/UART data to host. Green: Modem receiving serial/UART data from host. Red: Associate.
1
9 User buttons Connected to DIO lines for user implementation.
10 Reset button
11 SPI power Connect to the power board from 3.3 V.
12 SPI Only used for surface-mount devices.
13 Indicator LEDs
14 Through-hole XBee
sockets
15 20-pin header Maps to standard through-hole XBee pins.

Cellular service

The XBee Cellular kit includes six months of free cellular service.
1
Powering 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.
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.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
13
Getting started with the XBee Smart Modem Development Kit Connect the hardware

Connect the hardware

1. The XBee Smart Modem should already be plugged into the XBIB-U-DEV board.
2. The SIMcard should be already be inserted into the XBee Smart Modem. If not, install the
SIMcard into the XBee Smart Modem.
WARNING! Never insert or remove the SIM card while the device is powered!
3. Connect the antennas to the XBee Smart Modem by aligning the U.FL connectors carefully,
then firmly pressing 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.
4. Plug the 12 V power supply to the power jack on the development board.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
14
Getting started with the XBee Smart Modem Development Kit Configure the device using XCTU
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.

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.
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.

Add a device

These instructions show you how to add the XBee Smart Modem to XCTU. If XCTU does not find your serial port, see Cannot find the serial port for the device.
Launch XCTU .
1.
Click the Discover radio modules button .
2.
3. In the Discover radio devices dialog, select the serial ports where you want to look for XBee
modules, and click Next.
4. In the Set port parameters window, maintain the default values and click Finish.
5. As XCTU locates radio modules, they appear in the Discovering radio modules dialog box.
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.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
15
Getting started with the XBee Smart Modem Development Kit Configure the device using XCTU

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 Smart Modem is registered to the cellular network; see The Associate LED. If the LEDremains 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 Smart
Modem will not make the connection.
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 and Add a device.
Click the Configuration working mode button.
2.
3. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
On the Configuration toolbar, click the Default button to load the default values
4.
established by the firmware, and click Yes to confirm.
The relevant commands are:
n AI (Association Indication) reads zero when the device successfully registers to the cellular
network. If it reads 0x23 it is connecting to the Internet; 0x22 means it is registering to the
cellular network.
n MY (Module IPAddress) should display a valid IPaddress. If it reads 0.0.0.0, it has not
registered yet.
Note To search for an ATcommand in XCTU, use the search box.

Update to the latest firmware

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.
Click the Configuration working modes button .
1.
2. Select a local XBee module from the Radio Modules list.
Click the Update firmware button .
3.
The Update firmware dialog displays the available and compatible firmware for the selected
XBee module.
4. Select the product family of the XBee module, the function set, and the latest firmware version.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
16
Getting started with the XBee Smart Modem Development Kit Configure the device using XCTU
5. 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.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
17
Getting started with the XBee Smart Modem Development Kit Send an SMS message to a phone

Send an SMS message to a phone

The XBee Smart 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.
The following table explains the AT commands that you use in this example.
Command Value Description
AP (APIEnable)
IP (IP Protocol)
P#
(DestinationPhone Number)
TD (Text Delimiter)
PH (Module's SIM
phone number)
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.
Click the Configuration working mode button.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
0 Set the device's API mode to Transparent mode.
2 Set the expected transmission mode to SMScommunication.
<Target phone number>
D (0x0D)
Read only
The target phone number that you send to, for example, your cellular phone. See P# (Destination Phone Number) for instructions on using this command.
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 zero to disable text delimiter checking. Set to D for a carriage return.
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.
To switch to SMS communication, in the IP field, select 2 and click the Write button .
5.
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 D and click the Write button.
8. Note the number in the PH field; it is the XBee Smart Modem phone number, which you see
when it sends an SMS to your phone.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
18
Getting started with the XBee Smart Modem Development Kit Send an SMS message to a phone
Click the Consoles working mode button on the toolbar to open a serial console to the
9.
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
Click the Open button to open a serial connection to the device.
10.
11. Click in the left pane of the Console log, type hello world and press Enter. The XBee Smart
Modem sends the message to the destination phone number set by the P# command.
12. When the phone receives the text, you can see that the sender's phone number matches the
value reported by the XBee Smart Modem with the PH command.
13. On the phone, reply with the text connect with confidence and the XBee Smart Modem
outputs this reply from the UART.

Debugging

If you experience problems with the settings in this example, you can load the default settings in XCTU:
On the Configuration toolbar, click the Default button to load the default values
1.
established by the firmware, and click Yes to confirm.
2. Factory settings are loaded but not written to the device. To write them, click the Write button
on the toolbar.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
19
Getting started with the XBee Smart Modem Development Kit Connect to the ELIZA server

Connect to the ELIZA server

You can use the XBee Smart Modem to chat with the ELIZA Therapist Bot. ELIZAis an artificial intelligence (AI) bot that emulates a therapist and can perform simple conversations.
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)
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.
Click the Configuration working mode button.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
To switch to TCP communication, in the IP field, select 1 and click the Write button .
5.
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.
52.43.121.77 The target IP address of the Eliza server.
7. To enter the destination IP port number, in the DE field, type 2328 and click the Write button.
Click the Consoles working mode button on the toolbar to open a serial console to the
8.
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
Click the Open button to open a serial connection to the device.
9.
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.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
20
Getting started with the XBee Smart Modem Development Kit Connect to the ELIZA server

Debugging

If you experience problems with the settings in this example, you can load the default settings in XCTU:
On the Configuration toolbar, click the Default button to load the default values
1.
established by the firmware, and click Yes to confirm.
2. Factory settings are loaded but not written to the device. To write them, click the Write button
on the toolbar.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
21
Getting started with the XBee Smart Modem Development Kit Connect to the echo server

Connect to the echo server

This server echoes back the messages you type.
The following table explains the AT commands that you use in this example.
At command Value Description
IP (IP
Protocol)
TD
(Text
Delimiter)
DL
(Destination Address)
DE
(Destination Port)
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.
Click the Configuration working mode button.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
1 Set the expected transmission mode to TCP communications.
D (0x0D)
52.43.121.77 The target IPaddress of the echo server.
0x2329 The target port number of the echo server.
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 zero to disable text delimiter checking. Set to D for a carriage return.
To switch to TCP communication, in the IP field, select 1 and click the Write button .
5.
6. To enable the XBee Smart Modem to recognize carriage return as a message delimiter, in the
TD field, type D and 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.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
22
Getting started with the XBee Smart Modem Development Kit Connect to the echo server
Click the Consoles working mode button on the toolbar to open a serial console to the
9.
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
Click the Open button to open a serial connection to the device.
10.
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.

Debugging

If you experience problems with the settings in this example, you can load the default settings in XCTU:
On the Configuration toolbar, click the Default button to load the default values
1.
established by the firmware, and click Yes to confirm.
2. Factory settings are loaded but not written to the device. To write them, click the Write button
on the toolbar.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
23
Getting started with the XBee Smart Modem Development Kit Connect to the Daytime server

Connect to the Daytime server

The Daytime server reports the current Coordinated Universal Time (UTC) value responding to any user input.
The following table explains the AT commands that you use in this example.
At command Value Description
IP (IP
Protocol)
DL
(Destination Address)
DE
(Destination Port)
TD (Text Delimiter)
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.
Click the Configuration working mode button.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
1 Set the expected transmission mode to TCP communications.
52.43.121.77 The target IP of the Daytime server.
0x232A The target port number of the Daytime server.
0
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 zero to disable text delimiter checking.
To switch to TCP communication, in the IP field, select 1 and click the Write button .
5.
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 0 and click the Write button.
Click the Consoles working mode button on the toolbar to open a serial console to the
9.
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
24
Getting started with the XBee Smart Modem Development Kit Connect to the Daytime server
Click the Open button to open a serial connection to the device.
10.
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.

Debugging

If you experience problems with the settings in this example, you can load the default settings in XCTU:
On the Configuration toolbar, click the Default button to load the default values
1.
established by the firmware, and click Yes to confirm.
2. Factory settings are loaded but not written to the device. To write them, click the Write button
on the toolbar.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
25
Getting started with the XBee Smart Modem Development Kit Connect to a TCP/IP address

Connect to a TCP/IP address

The XBee Smart Modem can send and receive TCP messages while in Transparent mode; see
Transparent operating mode.
You can use this example as a template for sending and receiving data from a user. The following table explains the AT commands that you use in this example.
Command Value Description
IP (IP
Protocol)
DL
(Destination IPAddress)
DE
(Destination Port)
To connect to a TCP/IP address:
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.
Click the Configuration working mode button.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
1 Set the expected transmission mode to TCPcommunication.
<Target IPaddress>
<Target portnumber>
The target IP address that you send and receive from. For example, a data logging server’s IP address that you want to send measurements to.
The target port number that the device sends the transmission to. This is represented as a hexadecimal value.
In the IP field, select 1 and click the Write button .
5.
6. In the DL field, type the <target IP address> and click the Write button. The target IP address
is the IPaddress that you send and receive from.
7. In the DE field, type the <target port number>, converted to hexadecimal, and click the Write
button.
8. Exit Command mode; see Exit Command mode.
After exiting Command mode, any UART data sent to the device is sent to the destination IP address and port number after the RO (Packetization Timeout) occurs.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
26
Getting started with the XBee Smart Modem Development Kit Connect to a TCP/IP address

Debugging

If you experience problems with the settings in this example, you can load the default settings in XCTU:
On the Configuration toolbar, click the Default button to load the default values
1.
established by the firmware, and click Yes to confirm.
2. Factory settings are loaded but not written to the device. To write them, click the Write button
on the toolbar.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
27
Getting started with the XBee Smart Modem Development Kit Perform a (GET) HTTP request

Perform a (GET) HTTP request

You can use the XBee Smart Modem to perform a GET Hypertext Transfer Protocol (HTTP) request using XCTU. This example uses http://httpbin.org/ as the target website that responds to the HTTP request.
To perform a GETrequest:
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.
Click the Configuration working mode button.
3.
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 1 and click the Write button.
8. To move into Transparent mode, in the APfield, select 0 and click the Write button.
9. Wait for the AI (Association Indication) value to change to 0 (Connected to the Internet).
Click the Consoles working mode button on the toolbar.
10.
From the AT console, click the Add new packet button in the Send packets dialog. The
11.
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.
15. Click Add packet.
Click the Open button .
16.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
28
Getting started with the XBee Smart Modem Development Kit Perform a (GET) HTTP request
17. Click Send selected packet.
18. A GETHTTP response from httpbin.org appears in the Console log.

Debugging

If you experience problems with the settings in this example, you can load the default settings in XCTU:
On the Configuration toolbar, click the Default button to load the default values
1.
established by the firmware, and click Yes to confirm.
2. Factory settings are loaded but not written to the device. To write them, click the Write button
on the toolbar.
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
29
Getting started with the XBee Smart Modem Development Kit Get started with MQTT

Get started with MQTT

MQ Telemetry Transport (MQTT) is a messaging protocol that is ideal for the Internet of Things (IoT) due to a light footprint and its use of the publish-subscribe model. In this model, a client connects to a broker, a server machine responsible for receiving all messages, filtering them, and then sending messages to the appropriate clients.
The first two MQTTexamples do not involve the XBee Smart Modem. They demonstrate using the MQTTlibraries because those libraries are required for Use MQTT over the XBee Cellular Modem with
a PC.
The examples in this guide assume:
n Some knowledge of Python.
n An integrated development environment (IDE)such as PyCharm, IDLE or something similar.
The examples require:
n An XBee Smart Modem.
n A compatible development board, such as the XBIB-U.
n XCTU. See Configure the device using XCTU.
n That you install Python on your computer. You can download Python from:
https://www.python.org/downloads/.
n That you install the pyserial and paho-mqtt libraries to the Python environment. If you use
Python 2, install these libraries from the command line with pip install pyserial and pip
install paho-mqtt. If you use Python 3, use pip3 install pyserial and pip3 install paho-mqtt.
n The full MQTT library source code, which includes examples and tests, which is available in the
paho-mqtt github repository at https://github.com/eclipse/paho.mqtt.python. To download this
repository you must have Git installed.

Example: MQTT connect

This example provides insight into the structure of packets in MQTT as well as the interaction between the client and broker. MQTT uses different packets to accomplish tasks such as connecting, subscribing, and publishing. You can use XCTU to perform a basic example of sending a broker a connect packet and receiving the response from the server, without requiring any coding. This is a good way to see how the client interacts with the broker and what a packet looks like. The following table is an example connect packet:
Description Hex value
CONNECT packet fixed header
byte 1 Control packet type 0x10
byte 2 Remaining length 0x10
CONNECT packet variable header
Protocol name
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
30
Loading...
+ 116 hidden pages