Copyright © Neoway Technology Co., Ltd
+MQTTSTATE:0: Disconnected to the MQTT server
+MQTTSTATE:1: Connected to the MQTT server
AT+MQTTSTATE?
+MQTTSTATE:1
OK
The device is connected to the
MQTT server.
The device sends keepalive packets to the MQTT server by default. If the
server does not respond with ACK, the device automatically reconnects to the
server.
Developers can also send this command to check the connection status and
decide whether to reconnect automatically after detecting disconnection.
To reconnect manually, execute +MQTTDISCONN to release resources and
execute +MQTTDISCONN to set up a new connection.
15.10 Setting MQTT Mode: +MQTTMODE
To set the mode of MQTT connection
<Mode>: MQTT mode
0: MQTT
1: MQTT over TLS
Set the mode of MQTT
connection to MQTT over TLS
By default, MQTT communication uses plain TCP connections.
To use MQTT over TLS, execute this command before authentication.