esp8266mqttat指令集
时间: 2023-09-12 18:11:06 浏览: 218
ESP8266AT指令集
ESP8266MQTTAT指令集主要包括以下几个指令:
1. 设置ESP8266工作模式: AT+CWMODE=1
2. 连接WiFi: AT+CWJAP="wifi","password"
3. 设置本机信息: AT+MQTTCFG=0,1,"id","user","password",0,0,""
4. 连接MQTT服务器: AT+MQTTCONN=0,"IP",1883,0
5. 订阅主题: AT+MQTTSUB=0,"test",1
6. 发送消息: AT+MQTTPUB=0,"test","1",0,0
这些指令可以用于配置ESP8266的工作模式、连接WiFi、设置MQTT服务器等相关功能。其中,+CWMODE指令用于设置工作模式,+CWJAP指令用于连接WiFi,+MQTTCFG指令用于设置本机信息,+MQTTCONN指令用于连接MQTT服务器,+MQTTSUB指令用于订阅主题,+MQTTPUB指令用于发送消息。请注意,不同的AT固件版本可能存在差异,以上是基于安信可官方提供的MQTT透传AT固件(固件号: 1471)给出的指令集。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [ESP8266使用AT指令连接MQTT服务器](https://blog.csdn.net/weixin_55517418/article/details/123421395)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [LoRa通信模块以及各种传感器](https://download.csdn.net/download/m0_73728511/88242639)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文