Hello,
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)
which includes
[ESPAsyncWebServer] (https://github.com/me-no-dev/ESPAsyncWebServer)
[ArduinoJSON] (https://github.com/bblanchon/ArduinoJson)
[Async MQTT Client] (https://github.com/marvinroger/async-mqtt-client)
[AsyncTCP] (https://github.com/me-no-dev/AsyncTCP)
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.
Hi.
As Steve suggested, you need to handle that yourself. Besides the tutorials mentioned, this might also help:
Regards,
Sara