DHCP报错ffffffff,可能是因为内存不足?[WIFI-2436]
Posted: Mon May 25, 2020 2:23 am
020-05-23 22:19:04:795-< [0;32mI (13998124) Wi-Fi: heap_size=118816[0m
2020-05-23 22:19:05:043-< I (13998334) wifi: new:<1,1>, old:<1,1>, ap:<1,1>, sta:<1,1>, prof:1
I (13998334) wifi: station: c8:2b:96:b9:7a:3c join, AID=1, bgn, 40U
D (13998344) event: SYSTEM_EVENT_AP_STACONNECTED, mac:c8:2b:96:b9:7a:3c, aid:1[0m
[0;32mI (13998344) Wi-Fi:
*********SYSTEM_EVENT_AP_STACONNECTED*********
[0m
[0;32mI (13998354) Wi-Fi: station:c8:2b:96:b9:7a:3c join, AID=1[0m
2020-05-23 22:19:05:164-< dhcps: handle_dhcp-> receive a packet
dhcps: handle_dhcp malloc_len=548 rx_len=308dhcps: handle_dhcp-> p->tot_len = 308
dhcps: handle_dhcp-> p->len = 308
01 01 06 00 cc c7 c6 a4 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 c8 2b 96 b9
7a 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63
35 01 01 39 02 05 dc 0c 09 65 73 70 72 65 73 73
69 66 37 0c 01 03 1c 06 0f 2c 2e 2f 1f 21 79 2b
ff 00 00 00 00 00
2020-05-23 22:19:05:320-< 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 dhcps: handle_dhcp-> parse_msg(p)
dhcps: len = 68
dhcps: (s16_t)*optptr = 53
dhcps: (s16_t)*optptr = 57
dhcps: (s16_t)*optptr = 12
dhcps: (s16_t)*optptr = 55
dhcps: (s16_t)*optptr = 255
dhcps: DHCPD_STATE_OFFER
dhcps: return s.state = 1
dhcps: xid changed
dhcps: client_address.addr = 20aa8c0
dhcps: handle_dhcp-> DHCPD_STATE_OFFER
udhcp: send_offer>>p->ref = 1
dhcps: send_offer>>pbuf_alloc succeed
dhcps: send_offer>>p->tot_len = 548
dhcps: send_offer>>p->len = 548
02 01 06 00 cc c7 c6 a4 00 00 80 00 00 00 00 00
c0 a8 0a 02 00 00 00 00 00 00 00 00 c8 2b 96 b9
7a 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63
35 01 02 01 04 ff ff ff 00 33 04 00 06 97 80 36
04 c0 a8 0a 01 03 04 c0 a8 0a 01 06 04 c0 a8 0a
01 1c 04 c0 a8 0a ff 1a 02 05 dc 1f 01 00 2b 06
01 04 00 00 00 02 ff 00 00 00 00 00 00 00 00 00
00 00 0
2020-05-23 22:19:05:467-< 0 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 [0;32mI (13998604) UART1: ESP->MCU:Get Date_time
[0m
dhcps: send_offer>>udp_sendto result ffffffff
udhcp: send_offer>>free pbuf
当前模式是STA+AP模式。
上面是Debug,可见在第二个步骤OFFER时,通过UDP发送提示udp_sendto result ffffffff
值得注意的是,出现此现象的时候,heap的大小仍有118816字节;并且在此过程中,还有另外一个UDP正在向外广播数据,并且UDP偶尔报错 errno 12。
这种现象导致了其他STA再也无法连接上这个AP了,只有重启才能够重新连接上。
此现象的复现过程是:这个ESP32频繁连接断开一个目标路由器,并且有另一个STA频繁连接断开这个STA。
问题:1、出现这个问题的可能原因有哪些?2、heap空间大小是足够的,但是UDP偶尔报错12提示内存不足,是否是因为heap分为了几个区域,虽然总的大小有118816字节,但是实际上留给UDP或者DHCP使用的已经不足?
问题困扰多时,影响项目进度,感谢支持!
2020-05-23 22:19:05:043-< I (13998334) wifi: new:<1,1>, old:<1,1>, ap:<1,1>, sta:<1,1>, prof:1
I (13998334) wifi: station: c8:2b:96:b9:7a:3c join, AID=1, bgn, 40U
D (13998344) event: SYSTEM_EVENT_AP_STACONNECTED, mac:c8:2b:96:b9:7a:3c, aid:1[0m
[0;32mI (13998344) Wi-Fi:
*********SYSTEM_EVENT_AP_STACONNECTED*********
[0m
[0;32mI (13998354) Wi-Fi: station:c8:2b:96:b9:7a:3c join, AID=1[0m
2020-05-23 22:19:05:164-< dhcps: handle_dhcp-> receive a packet
dhcps: handle_dhcp malloc_len=548 rx_len=308dhcps: handle_dhcp-> p->tot_len = 308
dhcps: handle_dhcp-> p->len = 308
01 01 06 00 cc c7 c6 a4 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 c8 2b 96 b9
7a 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63
35 01 01 39 02 05 dc 0c 09 65 73 70 72 65 73 73
69 66 37 0c 01 03 1c 06 0f 2c 2e 2f 1f 21 79 2b
ff 00 00 00 00 00
2020-05-23 22:19:05:320-< 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 dhcps: handle_dhcp-> parse_msg(p)
dhcps: len = 68
dhcps: (s16_t)*optptr = 53
dhcps: (s16_t)*optptr = 57
dhcps: (s16_t)*optptr = 12
dhcps: (s16_t)*optptr = 55
dhcps: (s16_t)*optptr = 255
dhcps: DHCPD_STATE_OFFER
dhcps: return s.state = 1
dhcps: xid changed
dhcps: client_address.addr = 20aa8c0
dhcps: handle_dhcp-> DHCPD_STATE_OFFER
udhcp: send_offer>>p->ref = 1
dhcps: send_offer>>pbuf_alloc succeed
dhcps: send_offer>>p->tot_len = 548
dhcps: send_offer>>p->len = 548
02 01 06 00 cc c7 c6 a4 00 00 80 00 00 00 00 00
c0 a8 0a 02 00 00 00 00 00 00 00 00 c8 2b 96 b9
7a 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63
35 01 02 01 04 ff ff ff 00 33 04 00 06 97 80 36
04 c0 a8 0a 01 03 04 c0 a8 0a 01 06 04 c0 a8 0a
01 1c 04 c0 a8 0a ff 1a 02 05 dc 1f 01 00 2b 06
01 04 00 00 00 02 ff 00 00 00 00 00 00 00 00 00
00 00 0
2020-05-23 22:19:05:467-< 0 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 [0;32mI (13998604) UART1: ESP->MCU:Get Date_time
[0m
dhcps: send_offer>>udp_sendto result ffffffff
udhcp: send_offer>>free pbuf
当前模式是STA+AP模式。
上面是Debug,可见在第二个步骤OFFER时,通过UDP发送提示udp_sendto result ffffffff
值得注意的是,出现此现象的时候,heap的大小仍有118816字节;并且在此过程中,还有另外一个UDP正在向外广播数据,并且UDP偶尔报错 errno 12。
这种现象导致了其他STA再也无法连接上这个AP了,只有重启才能够重新连接上。
此现象的复现过程是:这个ESP32频繁连接断开一个目标路由器,并且有另一个STA频繁连接断开这个STA。
问题:1、出现这个问题的可能原因有哪些?2、heap空间大小是足够的,但是UDP偶尔报错12提示内存不足,是否是因为heap分为了几个区域,虽然总的大小有118816字节,但是实际上留给UDP或者DHCP使用的已经不足?
问题困扰多时,影响项目进度,感谢支持!