Mqtt Application Configuration - Ebyte EA01-S User Manual

Nb-iot module
Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co., Ltd

3.14 MQTT application configuration

3.14.1 Instructions for using MQTT command set
First, AT+MQTTMODE is used to configure the working mode of MQTT to take effect after software reset and restart.
Second, AT+PDUTYPE is used to confirm whether the data frame type is MQTT transmission. Secondly,
AT+MQTTCONN is used to configure the three elements of the connection. AT+MQTTSUBTOP and
AT+MQTTPUBTOP are used to configure subscription and publishing topics. Finally, ATD*98 is used to enter the
transmission mode for data interaction. After the interaction is completed, use the command +++ to enter the AT
command mode. When low power consumption is required, enter AT+WORKLOCK=0 command to release the work
lock and enter the deep sleep mode.
3.14.2 MQTT mode configuration
AT command
AT+MQTTMODE=<mode>\r\n
AT+MQTTMODE \r\n
<type>: 0 means to disable the mqtt function, 1 means to access the Aliyun platform, 2 means to access the Onenet
platform and other IoT platforms that support the standard MQTT protocol, and 3 means to access the Baidu cloud
platform.
Note: When power-off saving is required, input AT+NRB command will save the parameters to the flash, and the
automatic restart will take effect.
3.14.3 MQTT address and port configuration
AT command
AT+MQTTADDR=<addr>,<port>\r\n
AT+MQTTADDR \r\n
(1) When theMQTT mode is 0, input this command will prompt "MQTT closed". When the MQTT mode is 1, configure
the address and port of the Aliyun platform. When the MQTT mode is 2, configure the address and port of the Onenet
platform or other platforms. When the mqtt mode is 3, configure the address and port of the Baidu cloud platform.
Note: The domain name addresses of the three major platforms of Baidu cloud, Onenet, and Aliyun will generally not
Copyright ©2012–2020,Chengdu Ebyte Electronic Technology Co., Ltd
Response
OK
OK
mode:< mode >
Response
OK
OK
address: <addr>,port: <port>
EA01-S User Manual
14

Advertisement

Table of Contents
loading

Table of Contents