为什么esp8266/esp32 wifi接入app显示设备离线-Arduino中文社区 - Powered by Discuz! Archiver

一一之情 发表于 2021-7-4 19:16

本帖最后由 一一之情 于 2021-7-4 19:21 编辑

_disFreshTime: 381782
_disconnectCount: 12
Connecting to MQTT...
reconnect_time: 3
Connection failed
Retrying MQTT connection in 5 seconds...
_disFreshTime: 386782
_disconnectCount: 12
Connecting to MQTT...
reconnect_time: 4
Connection failed
Retrying MQTT connection in 5 seconds...
_disFreshTime: 391782
_disconnectCount: 12
Connecting to MQTT...
reconnect_time: 5
Connection failed
Retrying MQTT connection in 5 seconds...
HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts
GET... code: 200
reply was:
==============================
{"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397342572^14d24b17215a9fd", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000}
==============================
_num: 5
====================
DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN
MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN
MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000
MQTT_KEY_MQTT: ^1^1625397342572^14d24b17215a9fd
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: 37828dc4dbc111eba8885254
====================
BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s
BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r
Freeheap: 213444
_reRegister_times2: 0
Connecting to MQTT...
reconnect_time: 0
Connection failed
Retrying MQTT connection in 5 seconds...
_disFreshTime: 396782
_disconnectCount: 12
Connecting to MQTT...
reconnect_time: 1
Connection failed
Retrying MQTT connection in 5 seconds...
_disFreshTime: 401782
_disconnectCount: 12
我的串口监视器显示是这个,设备在点灯科技的APP上也是离线状态,这是什么情况,怎么解决

一一之情 发表于 2021-7-4 19:19

_disFreshTime: 381782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 386782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 391782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed Retrying MQTT connection in 5 seconds... HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts GET... code: 200 reply was: ============================== {"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397342572^14d24b17215a9fd", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000} ============================== _num: 5 ==================== DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000 MQTT_KEY_MQTT: ^1^1625397342572^14d24b17215a9fd 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: 37828dc4dbc111eba8885254 ==================== BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r Freeheap: 213444 _reRegister_times2: 0 Connecting to MQTT... reconnect_time: 0 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 396782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 1 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 401782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 2 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 406782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 411782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 416782 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed Retrying MQTT connection in 5 seconds... HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts GET... code: 200 reply was: ============================== {"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397369676^e8b358c67646a64", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000} ============================== _num: 5 ==================== DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000 MQTT_KEY_MQTT: ^1^1625397369676^e8b358c67646a64 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: 37828dc4dbc111eba8885254 ==================== BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r Freeheap: 213444 _reRegister_times2: 0 Connecting to MQTT... reconnect_time: 0 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 423494 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 1 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 428495 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 2 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 433496 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 438497 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 443498 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed Retrying MQTT connection in 5 seconds... HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts GET... code: 200 reply was: ============================== {"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397396903^6f9de0be9b8f470", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000} ============================== _num: 5 ==================== DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000 MQTT_KEY_MQTT: ^1^1625397396903^6f9de0be9b8f470 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: 37828dc4dbc111eba8885254 ==================== BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r Freeheap: 213452 _reRegister_times2: 0 _disFreshTime: 450520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 0 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 455520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 1 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 460520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 2 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 465520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 470520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 475520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed Retrying MQTT connection in 5 seconds... HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts GET... code: 200 reply was: ============================== {"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397423957^258dca1f601636e", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000} ============================== _num: 5 ==================== DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000 MQTT_KEY_MQTT: ^1^1625397423957^258dca1f601636e 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: 37828dc4dbc111eba8885254 ==================== BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r Freeheap: 213448 _reRegister_times2: 0 Connecting to MQTT... reconnect_time: 0 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 480520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 1 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 485520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 2 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 490520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 495520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 500520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed Retrying MQTT connection in 5 seconds... HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts GET... code: 200 reply was: ============================== {"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397451205^c3d58005b1ee462", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000} ============================== _num: 5 ==================== DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000 MQTT_KEY_MQTT: ^1^1625397451205^c3d58005b1ee462 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: 37828dc4dbc111eba8885254 ==================== BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r Freeheap: 213452 _reRegister_times2: 0 Connecting to MQTT... reconnect_time: 0 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 505520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 1 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 510520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 2 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 515520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 520520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 525520 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed Retrying MQTT connection in 5 seconds... HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts GET... code: 200 reply was: ============================== {"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397478448^112b83850b868d7", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000} ============================== _num: 5 ==================== DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000 MQTT_KEY_MQTT: ^1^1625397478448^112b83850b868d7 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: 37828dc4dbc111eba8885254 ==================== BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r Freeheap: 213452 _reRegister_times2: 0 _disFreshTime: 532232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 0 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 537232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 1 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 542232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 2 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 547232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 552232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 557232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed Retrying MQTT connection in 5 seconds... HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=5ee5477d180f&version=0.1.0&protocol=mqtts GET... code: 200 reply was: ============================== {"detail": {"broker": "aliyun", "deviceName": "B0BEE344C710LCQ16XD4FAEN", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "Y3JkVkN2Fo7DaohmD070000000", "iotToken": "^1^1625397505658^b8e42016ba97970", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "37828dc4dbc111eba8885254"}, "message": 1000} ============================== _num: 5 ==================== DEVICE_NAME_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz MQTT_ID_MQTT: B0BEE344C710LCQ16XD4FAEN MQTT_NAME_MQTT: Y3JkVkN2Fo7DaohmD070000000 MQTT_KEY_MQTT: ^1^1625397505658^b8e42016ba97970 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: 37828dc4dbc111eba8885254 ==================== BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/s BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/B0BEE344C710LCQ16XD4FAEN/r Freeheap: 213452 _reRegister_times2: 0 Connecting to MQTT... reconnect_time: 0 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 562232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 1 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 567232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 2 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 572232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 3 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 577232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 4 Connection failed Retrying MQTT connection in 5 seconds... _disFreshTime: 582232 _disconnectCount: 12 Connecting to MQTT... reconnect_time: 5 Connection failed
我的串口监视器是这样,请问是什么原因,怎么解决呢

sanana 发表于 2021-7-13 20:45

WiFi Connected.
IP Address:
192.168.137.200
begin: https://iotdev.clz.me/api/v1/user/device/diy/auth?authKey=777a07ca9f55
GET... code: 502
reply was:
==============================

==============================
ERROR: Maybe you have put in the wrong AuthKey!
ERROR: Or maybe your request is too frequently!
ERROR: Or maybe your network is disconnected!

大佬可以帮忙看看这是哪里出错了吗

coloz 发表于 2021-7-14 08:58

sanana 发表于 2021-7-13 20:45
WiFi Connected.
IP Address:
192.168.137.200


用的lib太老了,可能是一年前的了,按文档下载即可

xiaomadema 发表于 2021-8-2 10:15

调用这两个函数#define BLINKER_WIFI #define BLINKER_MQTT loop()函数中还得加入Blinker.run()这个函数才能显示在线 不知道为什么,单我试了可以在线了

奈何col 发表于 2021-8-2 10:16

xiaomadema 发表于 2021-8-2 10:15
调用这两个函数#define BLINKER_WIFI #define BLINKER_MQTT loop()函数中还得加入Blinker.run()这个函 ...

Blinker.run是必须存在的,建议先过一遍教程

18743800177 发表于 2021-8-6 18:41

8266的板子不能接5G频段的WIFI,换成2.4G可以显示

奈何col 发表于 2021-8-6 19:14

18743800177 发表于 2021-8-6 18:41
8266的板子不能接5G频段的WIFI,换成2.4G可以显示

8266/32都不能连接5G网络,这是硬件层面的限制和软件无关

xiaomadema 发表于 2021-8-9 09:05

如果你用手机开热点的话 请检查以下你的热点是不是2.4G网络,现在手机很多默认开启5G网络

kidnp3 发表于 2021-10-6 18:29

ssid有中文影响链接吗?
页: 1 2 3 4 [5] 6
查看完整版本: 为什么esp8266/esp32 wifi接入app显示设备离线