everything works fine while being connected with one access point but as soon as it is out of range the esp32 stops and needs to reset.
I used [Basecamp] (https://github.com/ct-Open-Source/Basecamp)
[Async MQTT Client] (https://github.com/marvinroger/async-mqtt-client)
I can go into detail with the code but I’d like to know first if someone also encountered this.
Thanks and have a nice day !
You have to handle this yourself. Check out this article for useful WIFI functions. In your loop you would check if the WIFI has disconnected. Then try to reconnect. For different SSID/passwords you can use the “WIFI Scan” example (Should have been installed when you installed the ESP32) to find all the local networks available. If there is one you know try to connect with saved SSID/passwords (Perhaps use the Preferences library to save these).
Note that the iPhone had this issue a while back that it would not switch between routers automatically even with the same SSID/password. It took Apple over six months to bring out a fix. Hopefully yours will be easier.
As Steve suggested, you need to handle that yourself. Besides the tutorials mentioned, this might also help: