SUBSCRIBE


P4M-440G, as an MQTT client, can request to subscribe to a specific topic on the MQTT broker or request to unsubscribe from topics it has subscribed to.

SUBSCRIBE Request: +MBS

AT+MBS="<Topic>"
AT+MBS=<An ID of a Topic Buffer>

at+mbs="test/test_topic"
OK
at+mqns
+MQNS:4
OK

at+mbt=0,"test/test_topic"
OK
at+mbs=0
OK
at+mqns
+MQNS:4
OK

UNSUBSCRIBE Request: +MBU

AT+MBU="<Topic>"
AT+MBU=<An ID of a Topic Buffer>

at+mbu="test/test_topic"
OK
at+mqns
+MQNS:4
OK

at+mbt=0,"test/test_topic"
OK
at+mbu=0
OK
at+mqns
+MQNS:4
OK