Timeout duration WiFi client mode.

PepeTheGreat
Posts: 20
Joined: Mon Sep 18, 2023 3:54 am

Timeout duration WiFi client mode.

Postby PepeTheGreat » Tue Oct 24, 2023 3:36 pm

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

PepeTheGreat
Posts: 20
Joined: Mon Sep 18, 2023 3:54 am

Re: Timeout duration WiFi client mode.

Postby PepeTheGreat » Wed Oct 25, 2023 4:26 pm

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.

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: Timeout duration WiFi client mode.

Postby lbernstone » Wed Oct 25, 2023 4:51 pm

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

PepeTheGreat
Posts: 20
Joined: Mon Sep 18, 2023 3:54 am

Re: Timeout duration WiFi client mode.

Postby PepeTheGreat » Wed Oct 25, 2023 4:57 pm

>you can trap the WiFi events for a disconnection.

Yep, that is the 18 seconds thing.

Who is online

Users browsing this forum: No registered users and 129 guests