mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
20064978ba
get IP address after connecting to the softap. Now the default netif is station in station+softap mode. The UDP pcb of DHCP server is binded to IP 0.0.0.0. When other device connects to softap, the DHCP offer will be sent by softap.But because the destination IP of DHCP offer is broadcast IP and the source IP of it is 0.0.0.0, it will be sent from default netif, that is station interface. Other device can not receive the DHCP offer sent from station interface. As a result, other device can not get IP address. The resolution is that bind UDP pcb to the IP address of softap. So, the source IP of DHCP offer is that of softap. DHCP offer can be sent from softap interface by source IP route method. |
||
---|---|---|
.. | ||
ping | ||
sntp | ||
dhcpserver.c |