Page 1 of 1

Timeout duration WiFi client mode.

Posted: Tue Oct 24, 2023 3:36 pm
by PepeTheGreat
My esp32 is mobile, means it wanders around the house. One WiFi AP is not enough to cover the area, i have multiple AP's conneted by wire with the same SSID but different BSSID /mac on different channels. Now if the esp32 wanders out of one AP range it takes 18 seconds to reset the connection and connect to the new AP.
This timeout is way too long. The esp32 may move 10m during the 18 seconds and end up on the road (happened) because i cant stop it. How can i shorten the time the esp32 needs to realize he has lost "wl_connected"?

Image

Re: Timeout duration WiFi client mode.

Posted: Wed Oct 25, 2023 4:26 pm
by PepeTheGreat
Found a solution.
Instead of WiFi connection i trigger on framerate of the esp32-cam.
If a frame takes longer than 2 sec i stop the motors. Then after 18 sec the esp32 will search a stronger bssid.

Re: Timeout duration WiFi client mode.

Posted: Wed Oct 25, 2023 4:51 pm
by lbernstone
There will also be some timeouts involved, but you can trap the WiFi events for a disconnection.
https://github.com/espressif/arduino-es ... Events.ino

Re: Timeout duration WiFi client mode.

Posted: Wed Oct 25, 2023 4:57 pm
by PepeTheGreat
>you can trap the WiFi events for a disconnection.

Yep, that is the 18 seconds thing.