Wifi disconnects

ebor65
Posts: 2
Joined: Fri May 31, 2019 9:10 am

Wifi disconnects

Postby ebor65 » Fri May 31, 2019 9:25 am

Hello,
I have the problem that ESP32 Wifi server is working OK but after some hours or even minutes, the WIFI disconnects. I am using ESP32 DEVKIT V1 but I have the same problem with other boards. I have tried more than one board and different WIFI routers ( home, office).
To program it I am using Arduino ID 1.8.9 , boards from "https://dl.espressif.com/dl/package_esp32_index.json" and I select DOIT ESP32 DEVKIT V1 board.
I use the SimpleWifiServer example but it is the same with other Web Wifi servers.
I check the following in the loop function:
if (WiFi.status() != WL_CONNECTED) and I see that the WIFI is disconnected. The code is still running but the WEB server is not responding anymore.
I can try to re-connected in this case but it is not working reliably.
Thank you in advance for any ideas what can be the reason and how to fix it!

hml9083@hotmail.com
Posts: 17
Joined: Mon Nov 30, 2015 12:58 pm

Re: Wifi disconnects

Postby hml9083@hotmail.com » Sun Jun 02, 2019 1:33 pm

I also have this behavior and can not find a fix, I have used the WiFi.status() != WL_CONNECTED test within the loop, it does not appear to be the fix. I have not seen this to occur with my esp8266 modules. I have also seen others post issues with random losing WiFi connection status on esp32. I recently added esp_err_t esp_wifi_set_country(const wifi_country_t *country). I set my country to US. so far web server up for 5 days, can any one assist with why this occurs ?

ebor65
Posts: 2
Joined: Fri May 31, 2019 9:10 am

Re: Wifi disconnects

Postby ebor65 » Mon Jun 03, 2019 9:42 am

How do you call esp_wifi_set_country inside Arduino IDE?

I call now WiFi.setSleep(false);

and inside the loop I check

if (WiFi.status() != WL_CONNECTED) {

in this case, I reconnect. It works for a few days now but sometimes it is not responding. It seems that it needs time to reconnect. So it seems it is not a good solution.

HardyM
Posts: 6
Joined: Fri Oct 29, 2021 10:27 pm

Re: Wifi disconnects

Postby HardyM » Fri Nov 19, 2021 12:21 pm

Hi
Did you ever solve this - I'm getting the same issue.
Thanks

Who is online

Users browsing this forum: No registered users and 102 guests