查看: 1291|回复: 17

[已解答] ESP8266 无法连接MQTT会卡住

[复制链接]

该用户从未签到

发表于 2021-4-25 23:52 | 显示全部楼层 |阅读模式
[71]
__       __                __
/\ \     /\ \    __        /\ \              v0.3.6
\ \ \___ \ \ \  /\_\    ___\ \ \/'\      __   _ __   
\ \ '__`\\ \ \ \/\ \ /' _ `\ \ , <    /'__`\/\`'__\
  \ \ \L\ \\ \ \_\ \ \/\ \/\ \ \ \\`\ /\  __/\ \ \./
   \ \_,__/ \ \__\\ \_\ \_\ \_\ \_\ \_\ \____\\ \_\  
    \/___/   \/__/ \/_/\/_/\/_/\/_/\/_/\/____/ \/_/  
    To better use blinker with your IoT project!
    Download latest blinker library here!
    => https://github.com/blinker-iot/blinker-library

[105] _aliType:
[106] _duerType:
[108] _miType:
[109] _authKey: f3a19ef9ba64
[112] Connecting to Misaka_Network
[119] ESP8266_MQTT initialized...
[119]
===========================================================
================== Blinker Timer loaded! ==================
     EEPROM address 1536-2431 is used for Blinker Timer!
========= PLEASE AVOID USING THESE EEPROM ADDRESS! ========
===========================================================

[146] countdown state: false
[147] _cdRunState: 0
[149] _totalTime: 0
[151] _runTime: 0
[153] _action:
[155] loop state: false
[156] _lpRunState: 0
[158] _times: 0
[160] _tri_times: 0
[161] _time1: 0
[163] _action1:
[164] _time2: 0
[166] _action2:
[167] _lpData: 0
[169] checkNum count: 1
[682] WiFi Connected.
[682] IP Address:
[682] 192.168.2.100
[693] [HTTP] begin: http://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=f3a19ef9ba64&version=0.1.0&protocol=mqtt
[773] [HTTP] GET... code: 200
[777] reply was:
[777] ==============================
[777] {"detail": {"broker": "aliyun", "deviceName": "10473A58FCX8|securemode=3,signmethod=hmacsha1|", "host": "mqtt://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "10473A58FCX8DQHUL9C3IWQS&JgCGbHlndgz", "iotToken": "61fb03987aae486efc96309d471c7c77935fd5d5", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "59aafd14a56611eb89795254"}, "message": 1000}
[803] ==============================
[807] _num: 4
[808] ====================
[810] DEVICE_NAME_MQTT: 10473A58FCX8DQHUL9C3IWQS
[814] MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
[818] MQTT_ID_MQTT: 10473A58FCX8|securemode=3,signmethod=hmacsha1|
[824] MQTT_NAME_MQTT: 10473A58FCX8DQHUL9C3IWQS&JgCGbHlndgz
[829] MQTT_KEY_MQTT: 61fb03987aae486efc96309d471c7c77935fd5d5
[835] MQTT_BROKER: aliyun
[837] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[842] PORT: 1883
[843] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[848] PORT: 1883
[850] UUID_MQTT: 59aafd14a56611eb89795254
[854] ====================
[856] BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/10473A58FCX8DQHUL9C3IWQS/s
[862] BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/10473A58FCX8DQHUL9C3IWQS/r
[869] Freeheap: 35872
[874] mDNS responder started
[875] webSocket_MQTT server started
[876] ws://10473A58FCX8DQHUL9C3IWQS.local:81
然后就卡在这里不动了,换了流量热点可以用,但是WiFi就是不行,换了个别人寝室的WiFi也不行

该用户从未签到

发表于 2021-4-26 00:54 | 显示全部楼层
lib太老了,请通过官网下载

该用户从未签到

 楼主| 发表于 2021-4-26 07:45 | 显示全部楼层
奈何col 发表于 2021-4-26 00:54
lib太老了,请通过官网下载

更新了也是一样的,就是会卡在这里不动,不会继续下去

该用户从未签到

 楼主| 发表于 2021-4-26 07:59 | 显示全部楼层
奈何col 发表于 2021-4-26 00:54
lib太老了,请通过官网下载

[70]
__       __                __
/\ \     /\ \    __        /\ \              v0.3.7.210421
\ \ \___ \ \ \  /\_\    ___\ \ \/'\      __   _ __   
\ \ '__`\\ \ \ \/\ \ /' _ `\ \ , <    /'__`\/\`'__\
  \ \ \L\ \\ \ \_\ \ \/\ \/\ \ \ \\`\ /\  __/\ \ \./
   \ \_,__/ \ \__\\ \_\ \_\ \_\ \_\ \_\ \____\\ \_\  
    \/___/   \/__/ \/_/\/_/\/_/\/_/\/_/\/____/ \/_/  
    To better use blinker with your IoT project!
    Download latest blinker library here!
    => https://github.com/blinker-iot/blinker-library

[104] _aliType:
[105] _duerType:
[107] _miType:
[108] _authKey: f3a19ef9ba64
[111] Connecting to Misaka_Network
[119] ESP8266_MQTT initialized...
[119]
===========================================================
================== Blinker Timer loaded! ==================
     EEPROM address 1536-2431 is used for Blinker Timer!
========= PLEASE AVOID USING THESE EEPROM ADDRESS! ========
===========================================================

[146] countdown state: false
[146] _cdRunState: 0
[148] _totalTime: 0
[150] _runTime: 0
[152] _action:
[154] loop state: false
[155] _lpRunState: 0
[157] _times: 0
[159] _tri_times: 0
[161] _time1: 0
[162] _action1:
[164] _time2: 0
[165] _action2:
[167] _lpData: 0
[168] checkNum count: 1
[681] WiFi Connected.
[681] IP Address:
[681] 192.168.2.100
[692] [HTTP] begin: http://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=f3a19ef9ba64&version=0.1.0&protocol=mqtt
[778] [HTTP] GET... code: 200
[783] reply was:
[783] ==============================
[783] {"detail": {"broker": "aliyun", "deviceName": "10473A58FCX8|securemode=3,signmethod=hmacsha1|", "host": "mqtt://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "10473A58FCX8DQHUL9C3IWQS&JgCGbHlndgz", "iotToken": "61fb03987aae486efc96309d471c7c77935fd5d5", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "59aafd14a56611eb89795254"}, "message": 1000}
[809] ==============================
[813] _num: 4
[814] ====================
[816] DEVICE_NAME_MQTT: 10473A58FCX8DQHUL9C3IWQS
[820] MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
[824] MQTT_ID_MQTT: 10473A58FCX8|securemode=3,signmethod=hmacsha1|
[830] MQTT_NAME_MQTT: 10473A58FCX8DQHUL9C3IWQS&JgCGbHlndgz
[835] MQTT_KEY_MQTT: 61fb03987aae486efc96309d471c7c77935fd5d5
[840] MQTT_BROKER: aliyun
[843] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[848] PORT: 1883
[849] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[854] PORT: 1883
[856] UUID_MQTT: 59aafd14a56611eb89795254
[860] ====================
[862] BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/10473A58FCX8DQHUL9C3IWQS/s
[868] BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/10473A58FCX8DQHUL9C3IWQS/r
[874] Freeheap: 35568
[879] mDNS responder started
[881] webSocket_MQTT server started
[882] ws://10473A58FCX8DQHUL9C3IWQS.local:81
也是卡在这里过不去

点评

package是2.7.4吗?更换个开发板试试呢  详情 回复 发表于 2021-4-26 09:08

该用户从未签到

发表于 2021-4-26 09:08 | 显示全部楼层
Aurora211 发表于 2021-4-26 07:59
[70]
__       __                __
/\ \     /\ \    __        /\ \              v0.3.7.210421

package是2.7.4吗?更换个开发板试试呢

该用户从未签到

 楼主| 发表于 2021-4-28 21:55 | 显示全部楼层
奈何col 发表于 2021-4-26 09:08
package是2.7.4吗?更换个开发板试试呢

是2.7.4的呀,换了几个寝室的WiFi都是不行
IL4C{12CC3}IUJK(0RE1YVM.png

点评

校园网?你确定你们校园网不用认证就可以连?  详情 回复 发表于 2021-4-28 23:07

该用户从未签到

发表于 2021-4-28 23:07 | 显示全部楼层
Aurora211 发表于 2021-4-28 21:55
是2.7.4的呀,换了几个寝室的WiFi都是不行

校园网?你确定你们校园网不用认证就可以连?

该用户从未签到

 楼主| 发表于 2021-4-29 21:13 | 显示全部楼层
奈何col 发表于 2021-4-28 23:07
校园网?你确定你们校园网不用认证就可以连?

校园网经过我们自己的路由器不用认证了,路由器已经拨号了

点评

那不太清楚了,你可以拿个手机开热点试试  详情 回复 发表于 2021-4-29 22:22

该用户从未签到

发表于 2021-4-29 22:22 | 显示全部楼层
Aurora211 发表于 2021-4-29 21:13
校园网经过我们自己的路由器不用认证了,路由器已经拨号了

那不太清楚了,你可以拿个手机开热点试试

该用户从未签到

 楼主| 发表于 2021-5-5 21:23 | 显示全部楼层
奈何col 发表于 2021-4-29 22:22
那不太清楚了,你可以拿个手机开热点试试

手机热点是可以的,就是WiFi不行

点评

wifi不能是5G的,8266只支持2.4G  详情 回复 发表于 2021-5-5 21:53
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热门推荐

20sffactory 三自由度3D打印机械手臂 - 高速移动
20sffactory 三自由度3D打
这款机械臂作者没有给他起名字,用作者的名字来命名. 目前为止,生态最好,做的最完
多位数码管显示项目——以TM1650为例
多位数码管显示项目——以
以下是用搭载TM1650的4位数码管,显示电位器所代表0到1023的模拟信号数值 示意图:
智能“百味”勺子开发实战营,为你的生活添滋味!
智能“百味”勺子开发实战
想不想拥有一把神奇的“百味”勺子,把索然无味的食物变出酸甜苦辣咸的丰富滋味
新手小白付费拜师求教:TM1650四位时钟数码管的具体用法
新手小白付费拜师求教:TM
从淘宝购买的TM16504位数码管的时钟模块,卖家给了程序,但是完全不会用。求一位老师
【Arduino】168种传感器模块系列实验(76)---TTL转RS-485模块
【Arduino】168种传感器模
37款传感器与执行器的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定
Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   
快速回复 返回顶部 返回列表