ESP_WiFiManager for ESP32/ESP8266 supporting MultiWiFi/LittleFS and ESP32-S2 now.

khoih-prog
Posts: 53
Joined: Sat Feb 22, 2020 8:16 pm

ESP_WiFiManager for ESP32/ESP8266 supporting MultiWiFi/LittleFS and ESP32-S2 now.

Postby khoih-prog » Sat Feb 22, 2020 8:27 pm

https://github.com/khoih-prog/ESP_WiFiManager

You can install directly from Arduino Library Manager

https://www.ardu-badge.com/ESP_WiFiManager

This is an ESP32 / ESP8266 WiFi Connection Manager with fallback web configuration portal. Use this library for configuring ESP32, ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName. With examples supporting ArduinoJson 6.0.0+ as well as 5.13.5- .

So, how it works?
In Configuration Portal Mode, it starts an access point called ESP_XXXXXX. Connect to it using the configurable password you can define in the code. For example, your_password (see examples):

Code: Select all

// SSID and PW for Config Portal
String ssid = "ESP_" + String(ESP_getChipId(), HEX);
const char* password = "your_password";
After you connected, please, go to http://192.168.4.1, you'll see this Main page:

Image

Select Information to enter the Info page where the board info will be shown (long page)

Image

or short page (default)

Image

Select Configuration to enter this page where you can select an AP and specify its WiFi Credentials

Image

Enter your credentials, then click Save. The WiFi Credentials will be saved and the board reboots to connect to the selected WiFi AP.

If you're already connected to a listed WiFi AP and don't want to change anything, just select Exit Portal from the Main page to reboot the board and connect to the previously-stored AP. The WiFi Credentials are still intact.

Releases 1.0.6

New in v1.0.6

- Add function getConfigPortalPW()
- Add 4 new complicated examples compatible with ArduinoJson 6.0.0+ :AutoConnect(https://github.com/khoih-prog/ESP_WiFiM ... utoConnect), AutoConnectWithFeedback(https://github.com/khoih-prog/ESP_WiFiM ... thFeedback), AutoConnectWithFeedbackLED(https://github.com/khoih-prog/ESP_WiFiM ... eedbackLED) and AutoConnectWithFSParameters(https://github.com/khoih-prog/ESP_WiFiM ... Parameters)

Releases 1.0.6-beta

New in v1.0.6-beta

- Add NTP data
- Add support to ArduinoJson 6.0.0+ as well as 5.13.5- to examples

Releases 1.0.5

New in v1.0.5

- Add option to specify static DNS servers, besides static IP, Gateway and Subnet Mask
- Modify and add examples. Enhance README.md

Releases 1.0.4

New in v1.0.4

- Add ESP_WiFiManager setHostname feature
- Modify and add examples. Enhance README.md

Releases 1.0.3

New in v1.0.3

- Add option not displaying AvailablePages in Info page.
- Delete unnecessary files
- Modify examples, Images and enhance README.md

Releases 1.0.2

- Forked, modified, bug-fixed and improved from these versions of WiFiManager.

See Tzapu's version(https://github.com/tzapu/WiFiManager) for previous release information.
See KenTaylor's version(https://github.com/kentaylor/WiFiManager) for previous release information.

New in v1.0.2

- Fix bug that keeps ConfigPortal in endless loop if Portal/Router SSID or Password is NULL.
- Add example ConfigPortalParamsOnSwitch to enable ConfigPortal credentials to be reconfigurable using ConfigPortal.
Last edited by khoih-prog on Sat Feb 13, 2021 6:13 am, edited 2 times in total.

khoih-prog
Posts: 53
Joined: Sat Feb 22, 2020 8:16 pm

Re: ESP_WiFiManager for ESP32 and ESP8266

Postby khoih-prog » Thu Jul 30, 2020 11:52 pm

Releases 1.0.9

1. Fix ESP32 STAstaticIP bug.
2. Enable changing from DHCP <-> static IP using Config Portal.
3. Enable NTP configuration from sketch (USE_ESP_WIFIMANAGER_NTP, USE_CLOUDFLARE_NTP). See Issue #21: CloudFlare link in the default portal.
4. Add, enhance examples (fix MDNS for ESP32 examples, add DRD feature).

Releases 1.0.8
1. Fix setSTAStaticIPConfig issue. See Static Station IP doesn't work
2. Add LittleFS support for ESP8266 core 2.7.1+ in examples to replace deprecated SPIFFS.
3. Restructure code.

Releases 1.0.7

1. Use `just-in-time` scanWiFiNetworks() to reduce connection time necessary for battery-operated DeepSleep application. Thanks to CrispinP for identifying, requesting and testing. See Starting WiFIManger is very slow (2000ms)
2. Fix bug relating SPIFFS in examples :
- ConfigOnSwitchFS
- ConfigPortalParamsOnSwitch (now support ArduinoJson 6.0.0+ as well as 5.13.5-)
- AutoConnectWithFSParameters
See Having issue to read the SPIFF file, Thanks to OttoKlaasen to report.
3. Fix README. See Accessing manager after connection

khoih-prog
Posts: 53
Joined: Sat Feb 22, 2020 8:16 pm

Re: ESP_WiFiManager for ESP32 and ESP8266

Postby khoih-prog » Sat Aug 29, 2020 7:34 am

Major Releases v1.1.0

1. Add MultiWiFi feature to auto(Re)connect to the best WiFi at runtime
2. Fix bug.
3. Completely enhanced examples to use new MultiWiFi feature.

Image

Image

Image

Debug Termimal Output Samples

This is terminal debug output when running ESP32_FSWebServer_DRD on ESP32 ESP32_DEV. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi AP HueNet1 using new Static IP successfully. WiFi AP HueNet1 is then lost, and board autoreconnects itself to backup WiFi AP HueNet2.

Code: Select all

Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32_DEV
FS File: /ConfigSW.json, size: 150B
FS File: /CanadaFlag_1.png, size: 40.25KB
FS File: /CanadaFlag_2.png, size: 8.12KB
FS File: /CanadaFlag_3.jpg, size: 10.89KB
FS File: /edit.htm.gz, size: 4.02KB
FS File: /favicon.ico, size: 1.12KB
FS File: /graphs.js.gz, size: 1.92KB
FS File: /index.htm, size: 3.63KB
FS File: /drd.dat, size: 4B
FS File: /wifi_cred.dat, size: 192B

[WM] RFC925 Hostname = ESP32-FSWebServerDRD
[WM] setAPStaticIPConfig
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
Stored: SSID = HueNet2, Pass = 12345678
[WM] * Add SSID =  HueNet2 , PW =  12345678
Got stored Credentials. Timeout 120s for Config Portal
SPIFFS Flag read = 0xd0d04321
No doubleResetDetected
Saving config file...
Saving config file OK
[WM] LoadWiFiCfgFile 
[WM] OK
[WM] * Add SSID =  HueNet1 , PW =  12345678
[WM] * Add SSID =  HueNet2 , PW =  12345678
ConnectMultiWiFi in setup
[WM] ConnectMultiWiFi with :
[WM] * Flash-stored Router_SSID =  HueNet2 , Router_Pass =  12345678
[WM] * Additional SSID =  HueNet1 , PW =  12345678
[WM] * Additional SSID =  HueNet2 , PW =  12345678
[WM] Connecting MultiWifi...
[WM] WiFi connected after time:  1
[WM] SSID: HueNet1 ,RSSI= -27
[WM] Channel: 2 ,IP address: 192.168.2.232
After waiting 5 secs more in setup(), connection result is connected. Local IP: 192.168.2.232
HTTP server started @ 192.168.2.232
Open http://esp32-fs-browser.local/edit to see the file browser
[WM] freeing allocated params!
Stop doubleResetDetecting
Saving config file...
Saving config file OK

WiFi lost. Call connectMultiWiFi in loop
[WM] ConnectMultiWiFi with :
[WM] * Flash-stored Router_SSID =  HueNet2 , Router_Pass =  12345678
[WM] * Additional SSID =  HueNet1 , PW =  12345678
[WM] * Additional SSID =  HueNet2 , PW =  12345678
[WM] Connecting MultiWifi...
[WM] WiFi connected after time:  3
[WM] SSID: HueNet2 ,RSSI= -59
[WM] Channel: 4 ,IP address: 192.168.2.232
HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH

khoih-prog
Posts: 53
Joined: Sat Feb 22, 2020 8:16 pm

Re: ESP_WiFiManager for ESP32/ESP8266 supporting MultiWiFi, LittleFS

Postby khoih-prog » Fri Dec 04, 2020 4:14 am

Releases v1.3.0

1. Add LittleFS support to ESP32-related examples to use LITTLEFS Library
2. Add Version String

Releases v1.2.0

1. Restore cpp code besides Impl.h code to use in case of multiple definition linker error.
2. Fix bug /close does not close the config portal

khoih-prog
Posts: 53
Joined: Sat Feb 22, 2020 8:16 pm

Re: ESP_WiFiManager for ESP32/ESP8266 supporting MultiWiFi/LittleFS and ESP32-S2 now.

Postby khoih-prog » Sat Feb 13, 2021 6:13 am

Releases v1.5.0

1. Add support to ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, ESP32S2 Dev Module, UM FeatherS2, UM ProS2, microS2, etc.)
2. Add Instructions to install ESP32-S2 core

Releases v1.4.3

1. Fix examples' bug not saving Static IP in certain cases.
2. Add feature to warn if using examples with old library versions

Releases v1.4.2

1. Fix examples' bug not using saved WiFi Credentials after losing all WiFi connections.
2. Fix compiler warnings.

Major Releases v1.4.1

1. Fix staticIP not saved in examples.
2. Add structures and functions to handle AP and STA IPs.
3. Add complex examples
4. Add simple minimal examples
5. Fix bug.
6. Fix compiler warnings.
7. Modify Version String
8. Add Table of Contents

legaxus
Posts: 1
Joined: Tue Jan 18, 2022 2:27 pm

Re: ESP_WiFiManager for ESP32/ESP8266 supporting MultiWiFi/LittleFS and ESP32-S2 now.

Postby legaxus » Tue Jan 18, 2022 2:36 pm

Hi,
Thanks for sharing.
I just tested with ConfigOnDRD_FS_MQTT_Ptr example and found out a bug which it won't save the data field of AIO SERVER for MQTT. Thanks.

Who is online

Users browsing this forum: No registered users and 8 guests