
Examples: IOT protocols with transparent mode
Get started with MQTT
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
73
Field name
Description
Client ID
The length of the ID (in bytes) precedes the ID itself. Each client connecting to a
broker must have a unique client ID. In the example, the ID is DIGI. When using
the Paho MQTT Python libraries, a random alphanumeric ID is generated if you do
not specify an ID.
The following table provides the CONNECT flag bits from byte 8, the CONNECT flags byte.
CONNECT Flag Bit(s)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
User name flag
0
Password flag
0
Will retain
0
Will QoS
0
0
Will flag
0
Clean session
1
Reserved
0
Send a connect packet
Now that you know what a connect packet looks like, you can send a connect packet to a broker and
view the response. Open XCTU and click the Configuration working mode button.
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in
2. Open XCTU and click the
Configuration working mode
button.
3. Add the XBee Smart Modem to XCTU. See
4. Select a device from the
Radio Modules
list. XCTU displays the current firmware settings for
that device.
5. In the
AP
field, set
Transparent Mode
to
[0]
if it is not already and click the
Write
button.
6. In the
DL
field, type the IP address or the fully qualified domain name of the broker you wish to
use. This example uses
7. In the
DE
field, type
75B
and set the port that the broker uses. This example uses
75B
, because
the default MQTT port is 1883 (0x75B).
8. Once you have entered the required values, click the
Write
button to write the changes to the
XBee Smart Modem.
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
topic in the
.
10. Click the
Open
button
to open a serial connection to the device.
11. From the AT console, click the
Add new packet button
in the
Send packets
dialog. The
Add new packet
dialog appears.