我的esp8266显示的串口内容MQTT一直连接,时不时设备就掉线了-Arduino中文社区 - Powered by Discuz! Archiver

q1127957008 发表于 2020-9-20 11:27

我的esp8266显示的串口内容MQTT一直连接,时不时设备就掉线了

Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
MQTT Connected!
Freeheap: 5040
Connecting to MQTT...
MQTT Connected!
Freeheap: 4656
MQTT Ping!
MQTT Ping!
MQTT Ping!
MQTT Ping!
Connecting to MQTT...
Connection failed
Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
MQTT Connected!
Freeheap: 6528
MQTT Ping!
Connecting to MQTT...
Connection failed
Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
Failed to subscribe
Retrying MQTT connection in 5 seconds...
MQTT Ping!
Connecting to MQTT...
Failed to subscribe
Retrying MQTT connection in 5 seconds...
MQTT Ping!
MQTT Ping!
MQTT Ping!
Connecting to MQTT...
MQTT Connected!
Freeheap: 9064
MQTT Ping!
MQTT Ping!
Connecting to MQTT...
Connection failed
Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
Connection failed
Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
Connection failed
Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
Connection failed
Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
MQTT Connected!
Freeheap: 9064
MQTT Ping!

奈何col 发表于 2020-9-20 16:07

可能是您的程序触发了broker限制(比如发送频率过高)
测试下例程
页: [1]
查看完整版本: 我的esp8266显示的串口内容MQTT一直连接,时不时设备就掉线了