-->
Page 1 of 1

WiFi Disconnect Handling

PostPosted: Thu Sep 17, 2015 6:17 am
by 6sn7
What is the best/correct way to recover from WiFi disconnects when running a server on the esp8266?
My unit is about 3 feet from my router and RSSI is normally around -47 dBm and I'm experiencing frequent and random disconnects (WiFi.status returns WL_DISCONNECTED) and RSSI returns 31. When my code detects a disconnect it attempts to reconnect. Sometimes it takes 10 or 20 retries and other times it never reconnects. If I have it call WiFi.scanNetworks() (which reports RSSI as -47 for my network) before attempting to reconnect, it reconnects right away.

Thanks.