设备连不上mqtt,但能联网-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1704|回复: 4

[已解答] 设备连不上mqtt,但能联网

[复制链接]
发表于 2021-4-4 20:24 | 显示全部楼层 |阅读模式
使用的开发板时wifiduino32,使用蓝牙连接没有问题,使用WiFi连接时能在路由器里看到,也没问题,就是一直连不上mqtt,使用的是阿里云

一直显示设备离线,偶尔能看到online

一直显示设备离线,偶尔能看到online

[6823772] Retrying MQTT connection in 5 seconds...
[6823777] HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5107d6fede86&version=0.1.0&protocol=mqtts
[6825150] [HTTP] GET... code: 200
[6825152] reply was:
[6825152] ==============================
[6825152] {"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}
[6825176] ==============================
[6825181] _num: 5
[6825182] ====================
[6825184] DEVICE_NAME_MQTT: BB667DD26G9KCGG461P0Y52U
[6825189] MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
[6825193] MQTT_ID_MQTT: BB667DD26G9KCGG461P0Y52U
[6825197] MQTT_NAME_MQTT: NyHGU0VChlflYypGmExL000000
[6825202] MQTT_KEY_MQTT: ^1^1617539018743^75742a4dca2dfb0
[6825207] MQTT_BROKER: aliyun
[6825210] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[6825215] PORT: 1883
[6825217] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[6825222] PORT: 1883
[6825224] UUID_MQTT: 7def0eae8e2d11eb89785254
[6825228] ====================
[6825231] BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/BB667DD26G9KCGG461P0Y52U/s
[6825237] BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/BB667DD26G9KCGG461P0Y52U/r
[6825244] Freeheap: 215100
[6825252] _reRegister_times2: 0
[6825253] Connecting to MQTT...
[6825253] reconnect_time: 0
[E][WiFiClientSecure.cpp:133] connect(): start_ssl_client: -1
[6825260] Connection failed

 楼主| 发表于 2021-4-4 20:31 | 显示全部楼层
库是0.3.5 屏幕截图 2021-04-04 203109.png
发表于 2021-4-4 21:32 | 显示全部楼层
lib版本老了,通过官方网站下载,不要用其他人发你的。
发表于 2021-4-5 13:42 | 显示全部楼层
lib更新一下 就好
 楼主| 发表于 2021-4-10 18:39 | 显示全部楼层
ahua7336 发表于 2021-4-5 13:42
lib更新一下 就好

谢谢,解决了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 13:52 , Processed in 0.081883 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表