This multi wifi manager runs your ESP32 in a AP+STA mode. This way you can easily start a softAP and scan for Wifi Networks while beeing conntected to some wifi.
You can store multiple SSIDs and it will try to connect, reconnect and optionally fallback to softAP.
Because all the available solution that I found, where unable to fullfill my requirements.
It is only made and tested it on my ESP32 Microcontroller.
-
First of all, if there is no configuration of a known SSID, it starts an AP. Within the AP you can use your own WebUI using RESTful APIs to configure the AP.
-
When a initial SSID is stored into the local database, the background task will try to connect to it. On success, the AP will timeout and close it self. You can close the AP if you like to speed that up.
-
It's possible to add multiple SSIDs to connect to. If there are more known SSIDs, the WifiManager will scan for SSIDs in range and pick the strongest Signal to connect to.
-
The background task monitors the Wifi status and reconnect if required.
If you want to use this wifi manager, you have to create your own Web UI for it! It won't give you a premade styled UI to configure the SSID credentials.
Method | Request URL | Json Body | Info |
---|---|---|---|
GET | /api/wifi/configlist | none | Get the configured SSID AP list |
GET | /api/wifi/scan | none | Scan for Networks in Range |
GET | /api/wifi/status | none | Show Status of the ESP32 |
POST | /api/wifi/add | { "apName": "mySSID", "apPass": "secret" } |
Add a new SSID to the AP list |
DELETE | /api/wifi/id | { "id": 1 } |
Drop the AP list entry using the ID |
DELETE | /api/wifi/apName | { "apName": "mySSID" } |
Drop the AP list entries identified by the AP (SSID) Name |
POST | /api/wifi/softAp/start | none | Open/Create a softAP. Used to switch from client to AP mode |
POST | /api/wifi/softAp/stop | none | Disconnect the softAP and start to connect to known SSIDs |
POST | /api/wifi/client/stop | none | Disconnect current wifi connection, start to search and connect |
This Wifi manager depends on some external libraries to provide the functionality. These are:
- Arduino
- Preferences
- ESPAsyncWebServer
- ArduinoJson
esp32-wifi-manager (c) by Martin Verges.
esp32-wifi-manager is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You should have received a copy of the license along with this work. If not, see http://creativecommons.org/licenses/by-nc-sa/4.0/.
If you want to use this software on a comercial product, you can get an commercial license on request.