Chengdu Ebyte Electronic Technology Co.,Ltd
E840-DTU(4G-02E) User Manual
Copyright ©2012–2019
,
Chengdu Ebyte Electronic Technology Co.,Ltd
30
Parameters: mode, MQTT mode
Remarks: The value of mode is as follows:
0, MQTT mode is off;
1, Alibaba Cloud platform;
2, oneNET platform;
3, Baidu cloud platform, and other IoT platforms supporting the standard MQTT protocol;
AT+MQTT_ADDRESS
Function: set / query MQTT platform address, port
Format: Configuration
Send: AT+ MQTT_ADDRESS =<addr><port> <CR>
Returns: <CR><LF>+OK<CR><LF>
Inquire
Send: AT+ MQTT_ADDRESS<CR>
Returns: <CR><LF>+OK=<addr><port><CR><LF>
Parameters: addr platform address
Port platform port
AT+MQTT_CONNECT
Function: Set/query the necessary parameters for accessing the MQTT platform. You do not need to complete
this configuration when using Alibaba Cloud, but you need
Use AT+ MQTT_ALIAUTH to complete the configuration of the three elements
Format: Configuration
Send: AT+ MQTT_CONNECT =<value0><value1><value2> <CR>
Returns: <CR><LF>+OK<CR><LF>
Inquire
Send: AT+ MQTT_CONNECT<CR>
Returns: <CR><LF>+OK=<value0><value1><value2><CR><LF>
Parameter: <value0> When the MQTT mode is set to 2, access to oneNET, value0 is the device ID; when the
MQTT mode is set to 3,
That is, access Baidu cloud or other platforms that support the standard MQTT protocol, value0 is the device
name.
<value1> When the MQTT mode is set to 2, that is, access to oneNET, value1 is the product ID; when the
MQTT mode is set to 3,
That is to access Baidu cloud or other platforms that support the standard MQTT protocol, value1 is the
username
<value2> When the MQTT mode is set to 2, access to oneNET, value2 is authentication information; when
the MQTT mode is set to 3,
That is to access Baidu cloud or other platforms that support the standard MQTT protocol, value2 is the
password.
AT+MQTT_SUBSCRIBE_TOPIC
Function: set / query MQTT platform address, port
Format: Configuration