Copyright © Neoway Technology Co., Ltd
15.7 Disconnecting to the MQTT Server:
+MQTTDISCONN
To disconnect to the MQTT server and release resources
Disconnect to the MQTT server.
The device disconnects to the MQTT server proactively and releases the MQTT
resources. To publish messages after disconnecting, set up the connection again.
15.8 Receiving Topic Content: +MQTTSUB
To receive the topic content sent by the server.
+MQTTSUB=<message_id>,<”topicname”>,<message_len>,<message><CR>
<message_id>: Message ID
<”topicname”>: Topic name
<message_len>: The length of the data received
<message>: Data received, end with 0x0d 0x0a; developers can determine the end
according to the <message_len>.
+MQTTSUB:2,"lixytopic",5,12345
Receive messages published by
the topic subscribed to.
Topicname must be marked by quotation marks.
15.9 Querying MQTT Connection Status: +MQTTSTATE
To query the status of the MQTT connection.