Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United
States and other countries worldwide. All other trademarks mentioned in this document are the
property of their respective owners.
Information in this document is subject to change without notice and does not represent a
commitment on the part of Digi International. Digi provides this document “as is,” without warranty of
any kind, expressed or implied, including, but not limited to, the implied warranties of fitness or
merchantability for a particular purpose. Digi may make improvements and/or changes in this manual
or in the product(s) and/or the program(s) described in this manual at any time.
Warranty
To view product warranty information, go to the following website:
www.digi.com/howtobuy/terms
Send comments
Documentation feedback: To provide feedback on this document, send your comments to
techcomm@digi.com.
Customer support
Digi Technical Support: Digi offers multiple technical support plans and service packages to help our
customers get the most out of their Digi product. For information on Technical Support plans and
pricing, contact us at +1 952.912.3444 or visit us at www.digi.com/support.
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
2
Contents
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
Applicable firmware and hardware9
SIM cards9
Getting started with the XBee Smart Modem Development Kit
Identify the kit contents11
XBIB-U-DEV reference12
Cellular service13
Connect the hardware14
Configure the device using XCTU15
Add a device15
Check for cellular registration and connection16
Update to the latest firmware16
Send an SMS message to a phone18
Debugging19
Connect to the ELIZA server20
Debugging21
Connect to the echo server22
Debugging23
Connect to the Daytime server24
Debugging25
Connect to a TCP/IP address26
Debugging27
Perform a (GET) HTTP request28
Debugging29
Get started with MQTT30
Example: MQTT connect30
Send a connect packet32
Example: send messages (publish) with MQTT34
Example: receive messages (subscribe) with MQTT34
Use MQTT over the XBee Cellular Modem with a PC35
Get started with CoAP39
CoAP terms39
CoAP quick start example39
Configure the device40
Example: manually perform a CoAPrequest40
Example: use Python to generate a CoAP message41
Configure the XBee Smart Modem using Digi Remote Manager44
Create a Remote Manager account44
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
3
Get the XBee Smart Modem IMEI number44
Add a XBee Smart Modem to Remote Manager44
Update the firmware45
Software libraries45
Get started with MicroPython
About MicroPython47
Why use MicroPython47
MicroPython on the XBee Smart Modem47
Use XCTU to enter the MicroPython environment47
Use the MicroPython Terminal in XCTU48
Example: hello world48
Example: turn on an LED48
Example: code a request help button49
Enter MicroPython paste mode50
Catch a button press50
Send a text (SMS) when the button is pressed52
Add the time the button was pressed53
Exit MicroPython mode54
Other terminal programs54
Tera Term for Windows54
Use picocom in Linux55
Technical specifications
Interface and hardware specifications58
Cellular RF characteristics58
Bluetooth RF characteristics58
Cellular Networking specifications58
Power requirements59
Power consumption59
Electrical specifications59
Regulatory approvals60
Hardware
Mechanical drawings62
Pin signals62
Pin connection recommendations64
RSSI PWM64
SIM card64
The Associate LED65
Antenna recommendations
Antenna placement67
Design recommendations
Power supply considerations69
Minimum connection diagram69
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
4
Heat considerations and testing69
Heat sink guidelines71
Bolt-down style71
Adhesive style heat sink71
Add a fan to provide active cooling72
Cellular connection process
Connecting74
Cellular network74
Data network connection74
Data communication with remote servers (TCP/UDP)74
Disconnecting74
Modes
Select an operating mode77
Transparent operating mode78
API operating mode78
Bypass operating mode78
Enter Bypass operating mode78
Leave Bypass operating mode79
Restore cellular settings to default in Bypass operating mode79
USB direct mode79
Configure the data pins79
Enable USB direct mode79
Enable the VBUS option80
Command mode80
Enter Command mode80
Send AT commands81
Apply command changes81
Make command changes permanent81
Exit Command mode82
Sleep modes
About sleep modes84
Normal mode84
Pin sleep mode84
Cyclic sleep mode84
Cyclic sleep with pin wake up mode84
Airplane mode84
SPI mode and sleep pin functionality84
The sleep timer85
MicroPython sleep behavior85
Serial communication
Serial interface88
Serial data88
UART data flow88
Serial buffers89
CTS flow control89
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
5
RTS flow control89
Enable UART or SPI ports89
SPI operation
SPI communications92
Full duplex operation93
Low power operation94
Select the SPI port94
Force UART operation95
Data format95
AT commands
Special commands97
AC (Apply Changes)97
FR (Force Reset)97
RE command97
WR command97
Cellular commands98
PH (Phone Number)98
S# (ICCID)98
IM (IMEI)98
MN (Operator)98
MV (Modem Firmware Version)99
DB (Cellular Signal Strength)99
AN (Access Point Name)99
AM (Airplane Mode)99
Network commands100
IP (IP Protocol)100
TL (SSL/TLS Protocol Version)100
TM (IP Client Connection Timeout)100
TS (IP Server Connection Timeout)101
DO (Device Options)101
EQ (Device Cloud FQDN)102
Addressing commands102
SH (Serial Number High)102
SL (Serial Number Low)102
MY (Module IP Address)102
P# (Destination Phone Number)103
N1 (DNS Address)103
N2 (DNS Address)103
DL (Destination Address)103
OD (Operating Destination Address)104
DE (Destination Port)104
C0 (Source Port)104
LA (Lookup IP Address of FQDN)105
Serial interfacing commands105
BD (Baud Rate)105
NB (Parity)106
SB (Stop Bits)106
RO (Packetization Timeout)106
TD (Text Delimiter)107
FT (Flow Control Threshold)107
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
API mode overview125
Use the AP command to set the operation mode125
API frame format125
API operation (AP parameter = 1)125
API operation with escaped characters (AP parameter = 2)126
Frame descriptions129
AT Command - 0x08129
AT Command: Queue Parameter Value - 0x09130
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
7
Transmit (TX) Request: IPv4 - 0x20131
AT Command Response - 0x88132
Transmit (TX) Status - 0x89133
Modem Status - 0x8A134
Receive (RX) Packet: IPv4 - 0xB0135
Socket behavior
Supported sockets137
Socket timeouts137
Socket limits in API mode137
Enable incoming TCP sockets in API mode137
API mode behavior for outgoing TCP and SSL connections137
API mode behavior for outgoing UDP data138
API mode behavior for incoming TCP connections138
API mode behavior for incoming UDP data139
Transparent mode behavior for outgoing TCP and SSL connections139
Transparent mode behavior for outgoing UDP data139
Transparent mode behavior for incoming TCP connections140
Transparent mode behavior for incoming UDP connections140
Troubleshooting
Cannot find the serial port for the device142
Condition142
Solution142
Correct a macOS Java error144
Condition144
Solution144
Unresponsive cellular component in Bypass mode145
Condition145
Solution145
Syntax error at line 1145
Solution145
Network connection issues145
Condition145
Solution145
Set the APN value145
Regulatory information
United States (FCC)148
OEM labeling requirements148
FCC notices148
FCC-approved antennas149
RF exposure150
IC (Industry Canada)150
Labeling requirements150
RF Exposure150
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
8
Digi XBee3 Cellular LTE-M Global Smart Modem User
Guide
The XBee Smart Modem provides OEMs with a simple way to integrate low-power cellular connectivity
into their devices. Features include:
n FCC certified and carrier end-device certified
n Excellent coverage and building penetration
n Digi XBee Transparent and API modes simplify design
n Low power consumption optimized for long battery life
n Reduced hardware complexity with only 1 antenna required
n Integrated MicroPython programmability enables custom scripting directly on the modem
n Enhanced with Digi TrustFence™ security framework
n Manage and configure with XCTU and Digi Remote Manager®
n Available with Digi provided SIM cards and data plans
Applicable firmware and hardware
This manual supports the following firmware:
n 311xx
It supports the following hardware:
n XB3-C-A2-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-M Global 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 contents11
XBIB-U-DEV reference12
Cellular service13
Connect the hardware14
Configure the device using XCTU15
Send an SMS message to a phone18
Connect to the ELIZA server20
Connect to the echo server22
Connect to the Daytime server24
Connect to a TCP/IP address26
Perform a (GET) HTTP request28
Get started with MQTT30
Get started with CoAP39
Configure the XBee Smart Modem using Digi Remote Manager44
Software libraries45
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
10
Getting started with the XBee Smart Modem Development KitIdentify the kit contents
Identify the kit contents
The Developer's kit includes the following:
One XBIB-U-DEV board
One 12 V power supply
One cellular antenna with U.FL connector
One Bluetooth Low Energy (BLE) antenna
(BLE support is forthcoming but not currently
available)
One USB cable
One XBee Smart Modem
One SIMcard
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
11
Getting started with the XBee Smart Modem Development KitXBIB-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 ItemDescription
1Programmingheader Header used to program XBee Programmable devices.
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
12
Getting started with the XBee Smart Modem Development KitCellular service
Number ItemDescription
2Self power module
3Current testingDepopulating R31 allows a current probe to be inserted across P6
4Loopback jumperPopulating P8 with a loopback jumper causes serial transmissions
5DC barrel plug: 6-20V Greater than 500 mA loads require a DC supply for correct
6LED indicator
7USB
8RSSI 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
9User buttonsConnected to DIO lines for user implementation.
10Reset button
11SPI powerConnect to the power board from 3.3 V.
12SPIOnly used for surface-mount devices.
13Indicator LEDs
14Through-hole XBee
sockets
1520-pin headerMaps 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-M Global Smart Modem User Guide
13
Getting started with the XBee Smart Modem Development KitConnect the hardware
Connect the hardware
1. The XBee Smart Modem should already be plugged into the XBIB-U-DEV board.
2. The SIMcard should be already be inserted into the XBee Smart Modem. If not, install the
SIMcard 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.
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.
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
14
Getting started with the XBee Smart Modem Development KitConfigure the device using XCTU
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-M Global Smart Modem User Guide
15
Getting started with the XBee Smart Modem Development KitConfigure 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 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 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 modebutton.
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 buttonto 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 IPAddress) should display a valid IPaddress. If it reads 0.0.0.0, it has not
registered yet.
Note To search for an ATcommand 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-M Global Smart Modem User Guide
16
Getting started with the XBee Smart Modem Development KitConfigure 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-M Global Smart Modem User Guide
17
Getting started with the XBee Smart Modem Development KitSend 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.
CommandValueDescription
AP (APIEnable)
IP (IP Protocol)
P#
(DestinationPhone
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 modebutton.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
0Set the device's API mode to Transparent mode.
2Set the expected transmission mode to SMScommunication.
<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-M Global Smart Modem User Guide
18
Getting started with the XBee Smart Modem Development KitSend an SMS message to a phone
Click the Consoles working mode buttonon 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 buttonto 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 buttonto 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-M Global Smart Modem User Guide
19
Getting started with the XBee Smart Modem Development KitConnect to the ELIZA server
Connect to the ELIZA server
You can use the XBee Smart Modem to chat with the ELIZA Therapist Bot. ELIZAis 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 commandValueDescription
IP (IP Protocol)1Set the expected transmission mode to TCP
communications.
DL (Destination
Address)
DE (Destination Port)0x2328The 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 modebutton.
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 ELIZATherapist 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 buttonon 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 buttonto 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-M Global Smart Modem User Guide
20
Getting started with the XBee Smart Modem Development KitConnect 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 buttonto 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-M Global Smart Modem User Guide
21
Getting started with the XBee Smart Modem Development KitConnect 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
commandValueDescription
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 modebutton.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
1Set the expected transmission mode to TCP communications.
D (0x0D)
52.43.121.77 The target IPaddress of the echo server.
0x2329The 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-M Global Smart Modem User Guide
22
Getting started with the XBee Smart Modem Development KitConnect to the echo server
Click the Consoles working mode buttonon 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 buttonto 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 buttonto 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-M Global Smart Modem User Guide
23
Getting started with the XBee Smart Modem Development KitConnect 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
commandValueDescription
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 modebutton.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
1Set the expected transmission mode to TCP communications.
52.43.121.77 The target IP of the Daytime server.
0x232AThe 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 buttonon 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-M Global Smart Modem User Guide
24
Getting started with the XBee Smart Modem Development KitConnect to the Daytime server
Click the Open buttonto 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 buttonto 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-M Global Smart Modem User Guide
25
Getting started with the XBee Smart Modem Development KitConnect 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.
CommandValueDescription
IP (IP
Protocol)
DL
(Destination
IPAddress)
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 modebutton.
3.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
1Set the expected transmission mode to TCPcommunication.
<Target
IPaddress>
<Target
portnumber>
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 IPaddress 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-M Global Smart Modem User Guide
26
Getting started with the XBee Smart Modem Development KitConnect 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 buttonto 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-M Global Smart Modem User Guide
27
Getting started with the XBee Smart Modem Development KitPerform 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 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.
Click the Configuration working modebutton.
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 APfield, 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 buttonon the toolbar.
10.
From the AT console, click the Add new packet buttonin 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
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-M Global Smart Modem User Guide
28
Getting started with the XBee Smart Modem Development KitPerform a (GET) HTTP request
17. Click Send selected packet.
18. A GETHTTP 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 buttonto 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-M Global Smart Modem User Guide
29
Getting started with the XBee Smart Modem Development KitGet 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 MQTTexamples do not involve the XBee Smart Modem. They demonstrate using the
MQTTlibraries 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:
DescriptionHex value
CONNECT packet fixed header
byte 1Control packet type0x10
byte 2Remaining length0x10
CONNECT packet variable header
Protocol name
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
30
Loading...
+ 121 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.