EMQSUBCLOSE – cancel a subscription to a message topic
Cancel a subscription to a topic.
Type
Syntax
Returned Result
Test
AT+EMQSUBCLOSE=?
OK
+EMQSUBCLOSE:(0-7)
Read
AT+EMQSUBCLOSE?
OK
or
ERROR
Write
AT+EMQSUBCLOSE=(
0-7
)
where:
(
0-7
)
is a subscribe index number in the
range from 0, up to and including 7. You
must have already subscribed to the
selected index number, or the command
will return an error.
OK
+EMQSUBCLOSE:(0-7),<status>
or
ERROR
+EMQSUBCLOSE:(0-7),<status>
where:
•
(0-7)
is the subscribe index number
you selected from the range
•
status
is either:
•
0
– subscription cancelled
successfully
•
-1
– broker returned an
unsubnack
•
-2
– no topic was registered
for the given index
Example:
AT+EMQSUBCLOSE=0
OK
+EMQSUBCLOSE: 0,0
AT+EMQSUBOPEN?
OK
Eseye-enabled Quectel BG96 module Developer Guide v1.8
54
MQTT telemetry AT commands