Example: Send Messages (Publish) With Mqtt - Digi XBee 3 Cellular LTE-M User Manual

Smart modem
Table of Contents

Advertisement

Examples: IOT protocols with transparent mode
12. Enter the name of the data packet. Name the packet connect_frame or something similar.
13. Click the HEX input tab and type the following (these values are the same values from the
table in
Example: MQTT
10 10 00 04 4D 51 54 54 04 02 00 3C 00 04 44 49 47 49
14. Click Add packet. The new packet appears in the Send packets list.
15. Click the packet in the Send packets list.
16. Click Send selected packet.
17. A CONNACK packet response from the broker appears in the Console log. This is a connection
acknowledgment; a successful response should look like this:
You can verify the response from the broker as a CONNACK by comparing it to the structure of a
CONNACK packet in the MQTT documentation, which is available at
open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718081).

Example: send messages (publish) with MQTT

A basic Python example of a node publishing (sending) a message is:
mqttc = mqtt.Client("digitest")
"digitest"
mqttc.connect("m2m.eclipse.org", 1883)
keepalive-time)
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
connect):
# Create instance of client with client ID
# Connect to (broker, port,
Get started with MQTT
http://docs.oasis-
74

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee 3 cellular nb-iot

Table of Contents