EasyManua.ls Logo

Neoway N11 V2 - Publishing a Message (+IMQTTPUB)

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
107
special symbols, add an escape character \ to invoke an alternative
interpretation.
If the command contains only one optional field, it must be format.
If the command contains the fragement_id field, it must contain the format
field too.
If a long message is fragmented, packet_id is returned only to last fragment.
16.6 Subscribing a Message: +IMQTTSUB
Description
To subscribe a message
Format
AT+IMQTTSUB=<topcic>,<qos><CR>
Parameter
<Topic>: Topic to be published
<Qos>: QoS value, ranging from 0 to 2
Return Value
<CR><LF><CR><LF>+IMQTTSUB:<packet_id>
<CR><LF>OK<CR><LF>
Or
<CR><LF><CR><LF>+CME ERROR:<err><CR><LF>
If valid data is input, the module returns OK and then reports result in an unsolicited
manner.
<CR><LF><CR><LF>+IMQTTSUB:<packet_id>,<status><CR><LF>
<Packet_id>: packet ID returned after subscribing the message
<Status>: status returned after subscribing the message
0: successful, QoS0
1: successful, QoS1
2: successful, QoS2
128: Failed
Example
AT+IMQTTSUB=/test_topic_001,2
+IMQTTSUB:24761
OK
+IMQTTSUB:24761,1
The module subscribes a message
successfully.
Remarks
Only last topic subscribed and it QoS are returned to the query command.

Table of Contents

Related product manuals