Digi International Inc XB3C1 Manual Do Utilizador

Página de 146
Getting started with the XBee Smart Modem Development Kit
Get started with MQTT
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide
32
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 of the broker you wish to use. This example uses
198.41.30.241, which is the IP address for
, a public MQTT broker.
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.