乐鑫技术交流
直播中

卢表镜

7年用户 970经验值
私信 关注
[问答]

esp32-wroom-32E mqtt异常断开是什么原因造成的?如何解决?

我在使用mqtt在接受处理后发布消息时,mqtt接受消息不定时的出现接受发布有延时的情况、mqtt断开重连,有时会出现wifi:bcn_timout,ap_probe_send_start,WiFi也会有断开的情况,这是wifi断开时的log
Code: Select all
I (710643) wifi:bcn_timout,ap_probe_send_start
W (715733) TRANSPORT_BASE: Poll timeout or error, errno=Connection already in progress, fd=54, timeout_ms=10000
E (715733) MQTT_CLIENT: Writing didn't complete in specified timeout: errno=119
I (715733) USER_MQTT: MQTT_EVENT_ERROR
I (715743) USER_MQTT: Last errno string (Success)
E (715743) MQTT_CLIENT: Error to resend data
I (715753) USER_MQTT: MQTT_EVENT_DISCONNECTED
E (715753) MQTT_CLIENT: Client has started

W (725783) TRANSPORT_BASE: Poll timeout or error, errno=Connection already in progress, fd=-1, timeout_ms=10000
E (725783) MQTT_CLIENT: Writing didn't complete in specified timeout: errno=119
I (725783) USER_MQTT: MQTT_EVENT_ERROR
I (725793) USER_MQTT: Last errno string (Success)
E (725793) MQTT_CLIENT: Error sending ping
E (725803) MQTT_CLIENT: Can't send ping, disconnected
I (725803) USER_MQTT: MQTT_EVENT_DISCONNECTED
E (725813) MQTT_CLIENT: Client has started

I (727373) wifi:bcn_timout,ap_probe_send_start
I (735823) USER_MQTT: Other event id:7
I (736893) wifi:bcn_timout,ap_probe_send_start
I (739393) wifi:ap_probe_send over, resett wifi status to disassoc
I (739393) wifi:state: run -> init (c800)
I (739393) wifi:pm stop, total sleep time: 16178413 us / 735831852 us

W (739393) wifi:idx
I (739403) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
E (739413) TRANSPORT_BASE: poll_read select error 113, errno = Software caused connection abort, fd = 54
I (739413) wifi station: retry to connect to the AP
E (739413) MQTT_CLIENT: mqtt_message_receive: transport_read() error: errno=119
I (739433) USER_MQTT: MQTT_EVENT_ERROR
E (739433) USER_MQTT: Last error captured as transport's socket errno: 0x71
I (739443) USER_MQTT: Last errno string (Software caused connection abort)
E (739453) MQTT_CLIENT: esp_mqtt_connect: mqtt_message_receive() returned -1
E (739453) MQTT_CLIENT: MQTT connect failed
free heap size: 187676 bytes
I (739463) USER_MQTT: MQTT_EVENT_DISCONNECTED
E (739473) MQTT_CLIENT: Client has started
I (740073) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
I (740073) wifi:state: init -> auth (b0)
I (740093) wifi:state: auth -> assoc (0)
I (740133) wifi:state: assoc -> run (10)
I (740283) wifi:connected with ICkey-GC-Tmp, aid = 1, channel 6, BW20, bssid = f0:5c:19:84:d2:82
I (740283) wifi:security: WPA2-PSK, phy: bgn, rssi: -79
I (740383) wifi:pm start, type: 1

I (740383) wifi:AP's beacon interval = 102400 us, DTIM period = 1
W (740453) wifi:idx:0 (ifx:0, f0:5c:19:84:d2:82), tid:0, ssn:2, winSize:64
W (740703) wifi:idx:1 (ifx:0, f0:5c:19:84:d2:82), tid:7, ssn:0, winSize:64
I (741693) esp_netif_handlers: sta ip: 10.8.85.154, mask: 255.255.255.0, gw: 10.8.85.254
I (741693) wifi station: got ip:10.8.85.154
I (749483) USER_MQTT: Other event id:7
I (749633) USER_MQTT: MQTT_EVENT_CONNECTED
I (749633) USER_MQTT: sent subscribe successful, msg_id=65052
I (749673) USER_MQTT: MQTT_EVENT_SUBSCRIBED, msg_id=12091
I (749683) USER_MQTT: sent publish successful, msg_id=3348
I (749703) USER_MQTT: MQTT_EVENT_SUBSCRIBED, msg_id=65052
I (749703) USER_MQTT: sent publish successful, msg_id=522
I (749733) USER_MQTT: MQTT_EVENT_PUBLISHED, msg_id=3348
I (749753) USER_MQTT: MQTT_EVENT_PUBLISHED, msg_id=522

请问这是什么问题导致的呢

更多回帖

发帖
×
20
完善资料,
赚取积分