Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit f28252c

Browse files
authored
v1.7.1 to fix captive-portal bug
### Releases v1.7.1 1. Fix captive-portal bug if Config Portal AP address is not default 192.168.4.1. Check [In AP, DNS server always redirects to 192.168.4.1 no mater what APStaticIP is set to. #58](khoih-prog/ESP_WiFiManager#58) 2. Fix MultiWiFi bug.
1 parent 1f00f9e commit f28252c

File tree

32 files changed

+363
-260
lines changed

32 files changed

+363
-260
lines changed

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [Why Async is better](#why-async-is-better)
1717
* [Currently supported Boards](#currently-supported-boards)
1818
* [Changelog](#changelog)
19+
* [Releases v1.7.1](#releases-v171)
1920
* [Releases v1.7.0](#releases-v170)
2021
* [Releases v1.6.3](#releases-v163)
2122
* [Releases v1.6.2](#releases-v162)
@@ -199,16 +200,22 @@ To appreciate the power of the [ESPAsyncWebServer](https://github.com/me-no-dev/
199200

200201
#### Currently supported Boards
201202

202-
This [**ESPAsync_WiFiManager_Lite** library](https://github.com/khoih-prog/ESPAsync_WiFiManager_Lite) currently supports these following boards:
203+
This [**ESPAsync_WiFiManager** library](https://github.com/khoih-prog/ESPAsync_WiFiManager) currently supports these following boards:
203204

204-
1. **ESP32 including ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.)**
205-
2. **ESP8266**
205+
1. **ESP8266 and ESP32-based boards using EEPROM, SPIFFS or LittleFS**.
206+
2. **ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM, SPIFFS or LittleFS**.
207+
3. **ESP32-C3 (ARDUINO_ESP32C3_DEV) using EEPROM or SPIFFS**.
206208

207209
---
208210
---
209211

210212
## Changelog
211213

214+
### Releases v1.7.1
215+
216+
1. Fix captive-portal bug if Config Portal AP address is not default 192.168.4.1. Check [In AP, DNS server always redirects to 192.168.4.1 no mater what APStaticIP is set to. #58](https://github.com/khoih-prog/ESP_WiFiManager/issues/58)
217+
2. Fix MultiWiFi bug.
218+
212219
### Releases v1.7.0
213220

214221
1. Add **LittleFS and SPIFFS** support to new **ESP32-S2** boards (**Arduino ESP32C3_DEV**). Check [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide).
@@ -2214,7 +2221,7 @@ ESPAsync_wifiManager.setRemoveDuplicateAPs(false);
22142221
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
22152222
#endif
22162223

2217-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.6.3"
2224+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.7.1"
22182225

22192226
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
22202227
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -3396,7 +3403,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Medium
33963403
33973404
```
33983405
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV
3399-
ESPAsync_WiFiManager v1.6.3
3406+
ESPAsync_WiFiManager v1.7.1
34003407
ESP_DoubleResetDetector v1.1.1
34013408
Config File not found
34023409
Can't read Config File, using default values
@@ -3415,7 +3422,7 @@ Opening Configuration Portal. No timeout : DRD or No stored Credentials..
34153422
34163423
```
34173424
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV
3418-
ESPAsync_WiFiManager v1.6.3
3425+
ESPAsync_WiFiManager v1.7.1
34193426
ESP_DoubleResetDetector v1.1.1
34203427
Config File not found
34213428
Can't read Config File, using default values
@@ -3503,7 +3510,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Comple
35033510
35043511
```
35053512
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU
3506-
ESPAsync_WiFiManager v1.6.3
3513+
ESPAsync_WiFiManager v1.7.1
35073514
ESP_DoubleResetDetector Version v1.1.1
35083515
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
35093516
Config File successfully parsed
@@ -3543,7 +3550,7 @@ TWWWW WTWWW
35433550
35443551
```
35453552
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU
3546-
ESPAsync_WiFiManager v1.6.3
3553+
ESPAsync_WiFiManager v1.7.1
35473554
ESP_DoubleResetDetector Version v1.1.1
35483555
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
35493556
Config File successfully parsed
@@ -3633,7 +3640,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
36333640
36343641
```cpp
36353642
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using SPIFFS on ESP32_DEV
3636-
ESPAsync_WiFiManager v1.6.3
3643+
ESPAsync_WiFiManager v1.7.1
36373644
ESP_DoubleResetDetector v1.1.1
36383645
[WM] RFC925 Hostname = ConfigOnDoubleReset
36393646
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
@@ -3692,7 +3699,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
36923699

36933700
```cpp
36943701
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU
3695-
ESPAsync_WiFiManager v1.6.3
3702+
ESPAsync_WiFiManager v1.7.1
36963703
ESP_DoubleResetDetector v1.1.1
36973704
[WM] RFC925 Hostname = ConfigOnDoubleReset
36983705
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
@@ -3752,7 +3759,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/
37523759
37533760
```cpp
37543761
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU
3755-
ESPAsync_WiFiManager v1.6.3
3762+
ESPAsync_WiFiManager v1.7.1
37563763
ESP_DoubleResetDetector v1.1.1
37573764
Opening / directory
37583765
FS File: CanadaFlag_1.png, size: 40.25KB
@@ -3830,7 +3837,7 @@ This is terminal debug output when running [Async_ESP32_FSWebServer_DRD](example
38303837

38313838
```
38323839
Starting Async_ESP32_FSWebServer_DRD using LittleFS on ESP32_DEV
3833-
ESPAsync_WiFiManager v1.6.3
3840+
ESPAsync_WiFiManager v1.7.1
38343841
ESP_DoubleResetDetector v1.1.1
38353842
FS File: /CanadaFlag_1.png, size: 40.25KB
38363843
FS File: /CanadaFlag_2.png, size: 8.12KB
@@ -3941,7 +3948,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
39413948

39423949
```
39433950
Starting Async_ConfigOnDoubleReset using LittleFS on ESP32S2_DEV
3944-
ESPAsync_WiFiManager v1.7.0
3951+
ESPAsync_WiFiManager v1.7.1
39453952
ESP_DoubleResetDetector v1.1.1
39463953
ESP Self-Stored: SSID = HueNet1, Pass = 12345678
39473954
[WM] * Add SSID = HueNet1 , PW = 12345678
@@ -4004,6 +4011,11 @@ Submit issues to: [ESPAsync_WiFiManager issues](https://github.com/khoih-prog/ES
40044011

40054012
## Releases
40064013

4014+
### Releases v1.7.1
4015+
4016+
1. Fix captive-portal bug if Config Portal AP address is not default 192.168.4.1. Check [In AP, DNS server always redirects to 192.168.4.1 no mater what APStaticIP is set to. #58](https://github.com/khoih-prog/ESP_WiFiManager/issues/58)
4017+
2. Fix MultiWiFi bug.
4018+
40074019
### Releases v1.7.0
40084020

40094021
1. Add **LittleFS and SPIFFS** support to new **ESP32-S2** boards (**Arduino ESP32C3_DEV**). Check [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide).
@@ -4121,6 +4133,7 @@ to use the better **asynchronous** [ESPAsyncWebServer](https://github.com/me-no-
41214133
11. Thanks to [Russell Jahn](https://github.com/russelljahn) for reporting [ESPAsync_WiFiManager::startConfigPortal() will cause a watchdog timeout when called from a higher-priority task. #39](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/39) leading to v1.5.0 and v1.6.0
41224134
12. Thanks to [robcazzaro](https://github.com/robcazzaro) for reporting [Minor: examples/Async_ESP32_FSWebServer/ wrongly uses FileFS.begin(true) #47](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/47) leading to v1.6.2
41234135
13. Thanks to [mattbradford83](https://github.com/mattbradford83) for identify, impressively locate, fix the bug and issue PR [Allow captive portal to run more than once by closing dnsServer cleanly. #49](https://github.com/khoih-prog/ESPAsync_WiFiManager/pull/49) leading to v1.6.3
4136+
14. Thanks to [yiancar](https://github.com/yiancar) to report the issue and propose a fix in [In AP, DNS server always redirects to 192.168.4.1 no mater what APStaticIP is set to. #58](https://github.com/khoih-prog/ESP_WiFiManager/issues/58) leading to v1.7.1
41244137

41254138

41264139
<table>
@@ -4144,6 +4157,7 @@ to use the better **asynchronous** [ESPAsyncWebServer](https://github.com/me-no-
41444157
<td align="center"><a href="https://github.com/russelljahn"><img src="https://github.com/russelljahn.png" width="100px;" alt="russelljahn"/><br /><sub><b>Russell Jahn</b></sub></a><br /></td>
41454158
<td align="center"><a href="https://github.com/robcazzaro"><img src="https://github.com/robcazzaro.png" width="100px;" alt="robcazzaro"/><br /><sub><b>robcazzaro</b></sub></a><br /></td>
41464159
<td align="center"><a href="https://github.com/mattbradford83"><img src="https://github.com/mattbradford83.png" width="100px;" alt="mattbradford83"/><br /><sub><b>Matt Bradford</b></sub></a><br /></td>
4160+
<td align="center"><a href="https://github.com/yiancar"><img src="https://github.com/yiancar.png" width="100px;" alt="yiancar"/><br /><sub><b>yiancar</b></sub></a><br /></td>
41474161
</tr>
41484162
</table>
41494163

examples/Async_AutoConnect/Async_AutoConnect.ino

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.7.0
16+
Version: 1.7.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -34,12 +34,13 @@
3434
1.6.2 K Hoang 08/04/2021 Fix example misleading messages.
3535
1.6.3 K Hoang 13/04/2021 Allow captive portal to run more than once by closing dnsServer.
3636
1.7.0 K Hoang 20/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
37+
1.7.1 K Hoang 25/04/2021 Fix MultiWiFi bug. Fix captive-portal bug if CP AP address is not default 192.168.4.1
3738
*****************************************************************************************************************************/
3839
#if !( defined(ESP8266) || defined(ESP32) )
3940
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
4041
#endif
4142

42-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.7.0"
43+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.7.1"
4344

4445
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
4546
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -304,7 +305,7 @@ void configWiFi(WiFi_STA_IPConfig in_WM_STA_IPconfig)
304305
uint8_t connectMultiWiFi()
305306
{
306307
#if ESP32
307-
// For ESP32, this better be 0 to shorten the connect time.
308+
// For ESP32, this better be 0 to shorten the connect time.
308309
// For ESP32-S2/C3, must be > 500
309310
#if ( USING_ESP32_S2 || USING_ESP32_C3 )
310311
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 500L
@@ -317,15 +318,19 @@ uint8_t connectMultiWiFi()
317318
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 2200L
318319
#endif
319320

320-
#define WIFI_MULTI_CONNECT_WAITING_MS 100L
321-
321+
#define WIFI_MULTI_CONNECT_WAITING_MS 500L
322+
322323
uint8_t status;
323324

325+
WiFi.mode(WIFI_STA);
326+
324327
LOGERROR(F("ConnectMultiWiFi with :"));
325-
328+
326329
if ( (Router_SSID != "") && (Router_Pass != "") )
327330
{
328331
LOGERROR3(F("* Flash-stored Router_SSID = "), Router_SSID, F(", Router_Pass = "), Router_Pass );
332+
LOGERROR3(F("* Add SSID = "), Router_SSID, F(", PW = "), Router_Pass );
333+
wifiMulti.addAP(Router_SSID.c_str(), Router_Pass.c_str());
329334
}
330335

331336
for (uint8_t i = 0; i < NUM_WIFI_CREDENTIALS; i++)
@@ -336,10 +341,10 @@ uint8_t connectMultiWiFi()
336341
LOGERROR3(F("* Additional SSID = "), WM_config.WiFi_Creds[i].wifi_ssid, F(", PW = "), WM_config.WiFi_Creds[i].wifi_pw );
337342
}
338343
}
339-
344+
340345
LOGERROR(F("Connecting MultiWifi..."));
341346

342-
WiFi.mode(WIFI_STA);
347+
//WiFi.mode(WIFI_STA);
343348

344349
#if !USE_DHCP_IP
345350
// New in v1.4.0

examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.7.0
16+
Version: 1.7.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -34,13 +34,14 @@
3434
1.6.2 K Hoang 08/04/2021 Fix example misleading messages.
3535
1.6.3 K Hoang 13/04/2021 Allow captive portal to run more than once by closing dnsServer.
3636
1.7.0 K Hoang 20/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
37+
1.7.1 K Hoang 25/04/2021 Fix MultiWiFi bug. Fix captive-portal bug if CP AP address is not default 192.168.4.1
3738
*****************************************************************************************************************************/
3839

3940
#if !( defined(ESP8266) || defined(ESP32) )
4041
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
4142
#endif
4243

43-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.7.0"
44+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.7.1"
4445

4546
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
4647
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -334,7 +335,7 @@ void configWiFi(WiFi_STA_IPConfig in_WM_STA_IPconfig)
334335
uint8_t connectMultiWiFi()
335336
{
336337
#if ESP32
337-
// For ESP32, this better be 0 to shorten the connect time.
338+
// For ESP32, this better be 0 to shorten the connect time.
338339
// For ESP32-S2/C3, must be > 500
339340
#if ( USING_ESP32_S2 || USING_ESP32_C3 )
340341
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 500L
@@ -347,15 +348,19 @@ uint8_t connectMultiWiFi()
347348
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 2200L
348349
#endif
349350

350-
#define WIFI_MULTI_CONNECT_WAITING_MS 100L
351-
351+
#define WIFI_MULTI_CONNECT_WAITING_MS 500L
352+
352353
uint8_t status;
353354

355+
WiFi.mode(WIFI_STA);
356+
354357
LOGERROR(F("ConnectMultiWiFi with :"));
355-
358+
356359
if ( (Router_SSID != "") && (Router_Pass != "") )
357360
{
358361
LOGERROR3(F("* Flash-stored Router_SSID = "), Router_SSID, F(", Router_Pass = "), Router_Pass );
362+
LOGERROR3(F("* Add SSID = "), Router_SSID, F(", PW = "), Router_Pass );
363+
wifiMulti.addAP(Router_SSID.c_str(), Router_Pass.c_str());
359364
}
360365

361366
for (uint8_t i = 0; i < NUM_WIFI_CREDENTIALS; i++)
@@ -366,10 +371,10 @@ uint8_t connectMultiWiFi()
366371
LOGERROR3(F("* Additional SSID = "), WM_config.WiFi_Creds[i].wifi_ssid, F(", PW = "), WM_config.WiFi_Creds[i].wifi_pw );
367372
}
368373
}
369-
374+
370375
LOGERROR(F("Connecting MultiWifi..."));
371376

372-
WiFi.mode(WIFI_STA);
377+
//WiFi.mode(WIFI_STA);
373378

374379
#if !USE_DHCP_IP
375380
// New in v1.4.0

examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.7.0
16+
Version: 1.7.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -34,13 +34,14 @@
3434
1.6.2 K Hoang 08/04/2021 Fix example misleading messages.
3535
1.6.3 K Hoang 13/04/2021 Allow captive portal to run more than once by closing dnsServer.
3636
1.7.0 K Hoang 20/04/2021 Add support to new ESP32-C3 using SPIFFS or EEPROM
37+
1.7.1 K Hoang 25/04/2021 Fix MultiWiFi bug. Fix captive-portal bug if CP AP address is not default 192.168.4.1
3738
*****************************************************************************************************************************/
3839

3940
#if !( defined(ESP8266) || defined(ESP32) )
4041
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
4142
#endif
4243

43-
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.7.0"
44+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.7.1"
4445

4546
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
4647
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
@@ -330,7 +331,7 @@ void configWiFi(WiFi_STA_IPConfig in_WM_STA_IPconfig)
330331
uint8_t connectMultiWiFi()
331332
{
332333
#if ESP32
333-
// For ESP32, this better be 0 to shorten the connect time.
334+
// For ESP32, this better be 0 to shorten the connect time.
334335
// For ESP32-S2/C3, must be > 500
335336
#if ( USING_ESP32_S2 || USING_ESP32_C3 )
336337
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 500L
@@ -343,15 +344,19 @@ uint8_t connectMultiWiFi()
343344
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 2200L
344345
#endif
345346

346-
#define WIFI_MULTI_CONNECT_WAITING_MS 100L
347-
347+
#define WIFI_MULTI_CONNECT_WAITING_MS 500L
348+
348349
uint8_t status;
349350

351+
WiFi.mode(WIFI_STA);
352+
350353
LOGERROR(F("ConnectMultiWiFi with :"));
351-
354+
352355
if ( (Router_SSID != "") && (Router_Pass != "") )
353356
{
354357
LOGERROR3(F("* Flash-stored Router_SSID = "), Router_SSID, F(", Router_Pass = "), Router_Pass );
358+
LOGERROR3(F("* Add SSID = "), Router_SSID, F(", PW = "), Router_Pass );
359+
wifiMulti.addAP(Router_SSID.c_str(), Router_Pass.c_str());
355360
}
356361

357362
for (uint8_t i = 0; i < NUM_WIFI_CREDENTIALS; i++)
@@ -362,10 +367,10 @@ uint8_t connectMultiWiFi()
362367
LOGERROR3(F("* Additional SSID = "), WM_config.WiFi_Creds[i].wifi_ssid, F(", PW = "), WM_config.WiFi_Creds[i].wifi_pw );
363368
}
364369
}
365-
370+
366371
LOGERROR(F("Connecting MultiWifi..."));
367372

368-
WiFi.mode(WIFI_STA);
373+
//WiFi.mode(WIFI_STA);
369374

370375
#if !USE_DHCP_IP
371376
// New in v1.4.0

0 commit comments

Comments
 (0)