设备连不上mqtt,但能联网
使用的开发板时wifiduino32,使用蓝牙连接没有问题,使用WiFi连接时能在路由器里看到,也没问题,就是一直连不上mqtt,使用的是阿里云Retrying MQTT connection in 5 seconds...
HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5107d6fede86&version=0.1.0&protocol=mqtts
GET... code: 200
reply was:
==============================
{"detail": {"broker": "aliyun", "deviceName": "BB667DD26G9KCGG461P0Y52U", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "NyHGU0VChlflYypGmExL000000", "iotToken": "^1^1617539018743^75742a4dca2dfb0", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "7def0eae8e2d11eb89785254"}, "message": 1000}
==============================
_num: 5
====================
DEVICE_NAME_MQTT: BB667DD26G9KCGG461P0Y52U
MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
MQTT_ID_MQTT: BB667DD26G9KCGG461P0Y52U
MQTT_NAME_MQTT: NyHGU0VChlflYypGmExL000000
MQTT_KEY_MQTT: ^1^1617539018743^75742a4dca2dfb0
MQTT_BROKER: aliyun
HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
PORT: 1883
HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
PORT: 1883
UUID_MQTT: 7def0eae8e2d11eb89785254
====================
BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/BB667DD26G9KCGG461P0Y52U/s
BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/BB667DD26G9KCGG461P0Y52U/r
Freeheap: 215100
_reRegister_times2: 0
Connecting to MQTT...
reconnect_time: 0
connect(): start_ssl_client: -1
Connection failed
库是0.3.5
lib版本老了,通过官方网站下载,不要用其他人发你的。 lib更新一下 就好 ahua7336 发表于 2021-4-5 13:42
lib更新一下 就好
谢谢,解决了
页:
[1]