BeyondRobotix / mavesp8266

ESP8266 WiFi Access Point and MAVLink Bridge
Other
182 stars 173 forks source link

Remove AP DHCPC wait #28

Closed dennisss closed 7 years ago

dennisss commented 7 years ago

I noticed this when using a static IP in STA mode with bad parameters: the AP fallback mode would hang as the static IP code turns off the DHCP client.

I'm not sure if this code is necessary. Currently it checks for the status of the DHCP client (wifi_station_dhcpc_status) when in AP mode. WiFi.softAP(..) already internally checks the status of the DHCP server with wifi_softap_dhcps_status.

dogmaphobic commented 7 years ago

That was a left over from my original code. It used to wait for a DHCP client to connect and I would get its address from there. It turned out the ESP SDK function to get the list of DHCP client was broken and always returned a bogus address. I then resorted to broadcasting until getting a first heartbeat.