esp-at使用at指令来连接阿里云失败
Posted: Wed Mar 02, 2022 1:15 am
我使用官方给的esp32c3固件烧录,我自己使用的是esp32c3-min-1,先用at指令来连接WiFi,然后用at指令来设置服务器的信息:AT+MQTTUSERCFG=0,7,"12345","UserName","UserPassword",0,0,"" 返回OK
再用at指令连接到 MQTT Brokers:AT+MQTTCONN=0,"xxxxxx.iot-as-mqtt.cn-shanghai.aliyuncs.com",1883,0 返回失败,串口打印报错日志:
all parameters are ready [0;31mE (33344) TRANSPORT_WS: Error read response for Upgrade header GET / HTTP/1.1 Connection: Upgrade Host: a1iLwGnfcuL.iot-as-mqtt.cn-shanghai.aliyuncs.com:1883 User-Agent: ESP32 Websocket Client Upgrade: websocket Sec-WebSocket-Version: 13 Sec-WebSocket-Key: FAZBI51XQMCOOpXJJSqudg== Sec-WebSocket-Protocol: mqtt [0m
[0;31mE (33363) MQTT_CLIENT: Error transport connect[0m
MQTT ERROR MQTT DISCONNECTED
再用at指令连接到 MQTT Brokers:AT+MQTTCONN=0,"xxxxxx.iot-as-mqtt.cn-shanghai.aliyuncs.com",1883,0 返回失败,串口打印报错日志:
all parameters are ready [0;31mE (33344) TRANSPORT_WS: Error read response for Upgrade header GET / HTTP/1.1 Connection: Upgrade Host: a1iLwGnfcuL.iot-as-mqtt.cn-shanghai.aliyuncs.com:1883 User-Agent: ESP32 Websocket Client Upgrade: websocket Sec-WebSocket-Version: 13 Sec-WebSocket-Key: FAZBI51XQMCOOpXJJSqudg== Sec-WebSocket-Protocol: mqtt [0m
[0;31mE (33363) MQTT_CLIENT: Error transport connect[0m
MQTT ERROR MQTT DISCONNECTED