Copyright © Neoway Technology Co., Ltd
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
AT+IMQTTSUB=<topcic>,<qos><CR>
<Topic>: Topic to be published
<Qos>: QoS value, ranging from 0 to 2
<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
AT+IMQTTSUB=“/test_topic_001”,2
+IMQTTSUB:24761
OK
+IMQTTSUB:24761,1
The module subscribes a message
successfully.
Only last topic subscribed and it QoS are returned to the query command.