ESP32 wifi stops fonctionning after a while

michel.vachon
Posts: 3
Joined: Tue Jan 18, 2022 2:01 am

ESP32 wifi stops fonctionning after a while

Postby michel.vachon » Tue Feb 01, 2022 6:31 pm

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!

alanesq
Posts: 86
Joined: Thu Dec 14, 2017 8:38 pm

Re: ESP32 wifi stops fonctionning after a while

Postby alanesq » Wed Feb 02, 2022 7:11 am

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);

michel.vachon
Posts: 3
Joined: Tue Jan 18, 2022 2:01 am

Re: ESP32 wifi stops fonctionning after a while

Postby michel.vachon » Wed Feb 02, 2022 6:11 pm

tks for the suggestion,

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

alanesq
Posts: 86
Joined: Thu Dec 14, 2017 8:38 pm

Re: ESP32 wifi stops fonctionning after a while

Postby alanesq » Thu Feb 03, 2022 8:22 am

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.

Who is online

Users browsing this forum: Baidu [Spider] and 87 guests