C
hengdu Ebyte Electronic Technology Co., Ltd
Copyright ©2012–2020
,
C
hengdu Ebyte Electronic Technology Co., Ltd
14
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 c++ 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
Response
AT+MQTTMODE=<mode>\r\n
OK
AT+MQTTMODE \r\n
OK
mode:< mode >
<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
Response
AT+MQTTADDR=<addr>,<port>\r\n
OK
AT+MQTTADDR \r\n
OK
address: <addr>,port: <port>
(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
Содержание EA01-S
Страница 1: ...EA01 S User Manual NB IoT Module ...