我的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!
可能是您的程序触发了broker限制(比如发送频率过高)
测试下例程
页:
[1]