Page 1 of 1

ESP32 wifi stops fonctionning after a while

Posted: Tue Feb 01, 2022 6:31 pm
by michel.vachon
After a few minutes, my ESP32:
-stops accepting websocket connections
-does not respond to pings
-is unable to do http requests

This only happens on 1 of the 2 wifi routers I have here.
Turning the wifi off and on of the esp32 restores all wifi fonctions.
I run arduino-esp32 version 4.4.0.
I tried with a dev board as well as a bare WROOM-32 module.

I use the netconn library for the websocket server.
I don't get any error message.
Log level is set to verbose.
I tried the arduino esp32 Wifi library, same issue.
I also rewrote that wifi library with direct esp_wifi_ calls, same issue.
The esp32 stills receives wifi packets, I verified that using the promiscuous packet capture mode.

How can I debug this?
What kind of router settings could cause this?
Wifi router is a Technicolor CGM4331COM

Thanks!

Re: ESP32 wifi stops fonctionning after a while

Posted: Wed Feb 02, 2022 7:11 am
by alanesq
Hi,

I had similar problems with my esp8266 projects and it turned out the wifi was going in to a sleep mode after a length of inactivity

On the ESP32 (Arduino IDE) the command to prevent this is: WiFi.setSleep(false);

Re: ESP32 wifi stops fonctionning after a while

Posted: Wed Feb 02, 2022 6:11 pm
by michel.vachon
tks for the suggestion,

but sometimes the wifi stops working after just 5 seconds,
that's quite before the inactivity timeout occurs.

Re: ESP32 wifi stops fonctionning after a while

Posted: Thu Feb 03, 2022 8:22 am
by alanesq
Another thing always worth checking with an esp project is the power supply, I can't tell you how many times I have forgotten this myself and wasted hours on a problem only to discover it was just an issue with the 5v supply.