EasyManua.ls Logo

Neoway N11 V2 - Disconnecting from MQTT Server (+MQTTDISCONN)

Neoway N11 V2
134 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
N11 V2
AT Command Manual
Copyright © Neoway Technology Co., Ltd
101
15.7 Disconnecting to the MQTT Server:
+MQTTDISCONN
Description
To disconnect to the MQTT server and release resources
Format
AT+MQTTDISCONN<CR>
Parameter
N/A
Return Value
<CR><LF>OK<CR><LF>
Example
AT+ MQTTDISCONN
OK
Disconnect to the MQTT server.
Remarks
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
Description
To receive the topic content sent by the server.
Format
+MQTTSUB=<message_id>,<”topicname”>,<message_len>,<message><CR>
Parameter
<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>.
Return Value
See the Example
Example
+MQTTSUB:2,"lixytopic",5,12345
Receive messages published by
the topic subscribed to.
Remarks
Topicname must be marked by quotation marks.
15.9 Querying MQTT Connection Status: +MQTTSTATE
Description
To query the status of the MQTT connection.

Table of Contents

Related product manuals