Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By 6sn7
#29233 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.