EasyManua.ls Logo

Neoway N11 V2 - Setting MQTT Mode: +MQTTMODE

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
102
Format
AT+MQTTSTATE?<CR>
Parameter
N/A
Return Value
+MQTTSTATE:0: Disconnected to the MQTT server
+MQTTSTATE:1: Connected to the MQTT server
Example
AT+MQTTSTATE?
+MQTTSTATE:1
OK
The device is connected to the
MQTT server.
Remarks
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
Description
To set the mode of MQTT connection
Format
AT+MQTTMODE=<mode><CR>
Parameter
<Mode>: MQTT mode
0: MQTT
1: MQTT over TLS
Return Value
<CR><LF>OK<CR><LF>
Example
AT+IMQTTMODE=1
OK
Set the mode of MQTT
connection to MQTT over TLS
Remarks
By default, MQTT communication uses plain TCP connections.
To use MQTT over TLS, execute this command before authentication.

Table of Contents

Related product manuals