N11 V2
AT Command Manual
Copyright © Neoway Technology Co., Ltd
100
OK
successfully.
Remarks
Topicname must be marked by quotation marks.
15.5 Unsubscription: +MQTTUNSUB
Description
To unsubscribe a topic
Format
AT+MQTTUNSUB=<”topicname”><CR>
Parameter
<”topicname”>: Topic to unsubscribe to, the parameter must be marked by
quotation marks.
Return Value
<CR><LF>OK<CR><LF>
Example
AT+MQTTUNSUB="lixytopic"
OK
Unsubscribe to a topic
Remarks
Topicname must be marked by quotation marks.
15.6 Topic Publish: +MQTTPUB
Description
To publish a topic
Format
AT+MQTTPUB=<retained>,<qos>,<”topicname”>,<message><CR>
Parameter
<Retained>: Retain mark
<Qos>: Quality of service
<”topicname”>: Topic, the parameter must be marked by quotation marks.
<Message>: Message
Return Value
<CR><LF>OK<CR><LF>
Example
AT+MQTTPUB=0,1,"lixytopic",12345
OK
The topic is published successfully.
AT+MQTTPUB=0,2,"lixytopic",12345
ERROR
The server does not support QoS=2.
After the command times out, the
device disconnects to the MQTT
server. Developers need to reconnect
manually.
Remarks
Topicname must be marked by quotation marks.