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

Commit 031e379

Browse files
authored
v1.4.3
### Releases v1.4.3 1. Fix examples' bug not saving Static IP in certain cases. 2. Add feture to warn if using examples with old library versions
1 parent fe215fd commit 031e379

File tree

32 files changed

+431
-186
lines changed

32 files changed

+431
-186
lines changed

README.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
* [Why do we need this ESPAsync_WiFiManager library](#why-do-we-need-this-async-espasync_wifimanager-library)
1515
* [Changelog](#changelog)
16+
* [Releases v1.4.3](#releases-v143)
1617
* [Releases v1.4.2](#releases-v142)
1718
* [Releases v1.4.1](#releases-v141)
1819
* [Major Releases v1.4.0](#major-releases-v140)
@@ -159,6 +160,11 @@ To appreciate the power of the [ESPAsyncWebServer](https://github.com/me-no-dev/
159160

160161
## Changelog
161162

163+
### Releases v1.4.3
164+
165+
1. Fix examples' bug not saving Static IP in certain cases.
166+
2. Add feture to warn if using examples with old library versions
167+
162168
### Releases v1.4.2
163169

164170
1. Fix examples' bug not using saved WiFi Credentials after losing all WiFi connections.
@@ -1988,6 +1994,8 @@ ESPAsync_wifiManager.setRemoveDuplicateAPs(false);
19881994
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
19891995
#endif
19901996

1997+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.4.3"
1998+
19911999
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
19922000
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
19932001

@@ -2255,7 +2263,7 @@ bool initialConfig = false;
22552263
#define USE_DHCP_IP false
22562264
#endif
22572265

2258-
#if ( USE_DHCP_IP || ( defined(USE_STATIC_IP_CONFIG_IN_CP) && !USE_STATIC_IP_CONFIG_IN_CP ) )
2266+
#if ( USE_DHCP_IP )
22592267
// Use DHCP
22602268
#warning Using DHCP IP
22612269
IPAddress stationIP = IPAddress(0, 0, 0, 0);
@@ -2578,6 +2586,8 @@ void saveConfigData()
25782586
{
25792587
file.write((uint8_t*) &WM_config, sizeof(WM_config));
25802588

2589+
displayIPConfigStruct(WM_STA_IPconfig);
2590+
25812591
// New in v1.4.0
25822592
file.write((uint8_t*) &WM_STA_IPconfig, sizeof(WM_STA_IPconfig));
25832593
//////
@@ -2802,7 +2812,6 @@ void wifi_manager()
28022812

28032813
// New in v1.4.0
28042814
ESPAsync_wifiManager.getSTAStaticIPConfig(WM_STA_IPconfig);
2805-
displayIPConfigStruct(WM_STA_IPconfig);
28062815
//////
28072816

28082817
saveConfigData();
@@ -3022,6 +3031,12 @@ void setup()
30223031
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION);
30233032
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
30243033

3034+
if ( ESP_ASYNC_WIFIMANAGER_VERSION < ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET )
3035+
{
3036+
Serial.print("Warning. Must use this example on Version later than : ");
3037+
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET);
3038+
}
3039+
30253040
Serial.setDebugOutput(false);
30263041

30273042
// Mount the filesystem
@@ -3158,7 +3173,7 @@ Opening Configuration Portal. No timeout : DRD or No stored Credentials..
31583173
31593174
```
31603175
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV
3161-
ESPAsync_WiFiManager v1.4.2
3176+
ESPAsync_WiFiManager v1.4.3
31623177
ESP_DoubleResetDetector v1.1.1
31633178
Config File not found
31643179
Can't read Config File, using default values
@@ -3246,7 +3261,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Comple
32463261
32473262
```
32483263
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU
3249-
ESPAsync_WiFiManager v1.4.2
3264+
ESPAsync_WiFiManager v1.4.3
32503265
ESP_DoubleResetDetector Version v1.1.1
32513266
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
32523267
Config File successfully parsed
@@ -3286,7 +3301,7 @@ TWWWW WTWWW
32863301
32873302
```
32883303
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU
3289-
ESPAsync_WiFiManager v1.4.2
3304+
ESPAsync_WiFiManager v1.4.3
32903305
ESP_DoubleResetDetector Version v1.1.1
32913306
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
32923307
Config File successfully parsed
@@ -3376,7 +3391,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
33763391
33773392
```cpp
33783393
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using SPIFFS on ESP32_DEV
3379-
ESPAsync_WiFiManager v1.4.2
3394+
ESPAsync_WiFiManager v1.4.3
33803395
ESP_DoubleResetDetector v1.1.1
33813396
[WM] RFC925 Hostname = ConfigOnDoubleReset
33823397
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
@@ -3435,7 +3450,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
34353450

34363451
```cpp
34373452
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU
3438-
ESPAsync_WiFiManager v1.4.2
3453+
ESPAsync_WiFiManager v1.4.3
34393454
ESP_DoubleResetDetector v1.1.1
34403455
[WM] RFC925 Hostname = ConfigOnDoubleReset
34413456
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
@@ -3495,7 +3510,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/
34953510
34963511
```cpp
34973512
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU
3498-
ESPAsync_WiFiManager v1.4.2
3513+
ESPAsync_WiFiManager v1.4.3
34993514
ESP_DoubleResetDetector v1.1.1
35003515
Opening / directory
35013516
FS File: CanadaFlag_1.png, size: 40.25KB
@@ -3573,7 +3588,7 @@ This is terminal debug output when running [Async_ESP32_FSWebServer_DRD](example
35733588

35743589
```
35753590
Starting Async_ESP32_FSWebServer_DRD using LittleFS on ESP32_DEV
3576-
ESPAsync_WiFiManager v1.4.2
3591+
ESPAsync_WiFiManager v1.4.3
35773592
ESP_DoubleResetDetector v1.1.1
35783593
FS File: /CanadaFlag_1.png, size: 40.25KB
35793594
FS File: /CanadaFlag_2.png, size: 8.12KB
@@ -3713,6 +3728,11 @@ Submit issues to: [ESPAsync_WiFiManager issues](https://github.com/khoih-prog/ES
37133728

37143729
## Releases
37153730

3731+
### Releases v1.4.3
3732+
3733+
1. Fix examples' bug not saving Static IP in certain cases.
3734+
2. Add feture to warn if using examples with old library versions
3735+
37163736
### Releases v1.4.2
37173737

37183738
1. Fix examples' bug not using saved WiFi Credentials after losing all WiFi connections.

examples/Async_AutoConnect/Async_AutoConnect.ino

Lines changed: 12 additions & 2 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.4.2
16+
Version: 1.4.3
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -27,11 +27,14 @@
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
2828
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2929
1.4.2 K Hoang 21/12/2020 Fix examples' bug not using saved WiFi Credentials after losing all WiFi connections.
30+
1.4.3 K Hoang 23/12/2020 Fix examples' bug not saving Static IP in certain cases.
3031
*****************************************************************************************************************************/
3132
#if !( defined(ESP8266) || defined(ESP32) )
3233
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
3334
#endif
3435

36+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.4.3"
37+
3538
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
3639
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3740

@@ -463,6 +466,8 @@ void saveConfigData()
463466
{
464467
file.write((uint8_t*) &WM_config, sizeof(WM_config));
465468

469+
displayIPConfigStruct(WM_STA_IPconfig);
470+
466471
// New in v1.4.0
467472
file.write((uint8_t*) &WM_STA_IPconfig, sizeof(WM_STA_IPconfig));
468473
//////
@@ -488,6 +493,12 @@ void setup()
488493
Serial.println(" on " + String(ARDUINO_BOARD));
489494
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION);
490495

496+
if ( ESP_ASYNC_WIFIMANAGER_VERSION < ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET )
497+
{
498+
Serial.print("Warning. Must use this example on Version later than : ");
499+
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET);
500+
}
501+
491502
if (FORMAT_FILESYSTEM)
492503
FileFS.format();
493504

@@ -628,7 +639,6 @@ void setup()
628639

629640
// New in v1.4.0
630641
ESPAsync_wifiManager.getSTAStaticIPConfig(WM_STA_IPconfig);
631-
displayIPConfigStruct(WM_STA_IPconfig);
632642
//////
633643

634644
saveConfigData();

examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino

Lines changed: 13 additions & 3 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.4.2
16+
Version: 1.4.3
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -27,11 +27,14 @@
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
2828
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2929
1.4.2 K Hoang 21/12/2020 Fix examples' bug not using saved WiFi Credentials after losing all WiFi connections.
30+
1.4.3 K Hoang 23/12/2020 Fix examples' bug not saving Static IP in certain cases.
3031
*****************************************************************************************************************************/
3132
#if !( defined(ESP8266) || defined(ESP32) )
3233
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
3334
#endif
3435

36+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.4.3"
37+
3538
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
3639
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3740

@@ -207,7 +210,7 @@ String AP_PASS;
207210
#define USE_DHCP_IP false
208211
#endif
209212

210-
#if ( USE_DHCP_IP || ( defined(USE_STATIC_IP_CONFIG_IN_CP) && !USE_STATIC_IP_CONFIG_IN_CP ) )
213+
#if ( USE_DHCP_IP )
211214
// Use DHCP
212215
#warning Using DHCP IP
213216
IPAddress stationIP = IPAddress(0, 0, 0, 0);
@@ -670,6 +673,8 @@ void saveConfigData()
670673
{
671674
file.write((uint8_t*) &WM_config, sizeof(WM_config));
672675

676+
displayIPConfigStruct(WM_STA_IPconfig);
677+
673678
// New in v1.4.0
674679
file.write((uint8_t*) &WM_STA_IPconfig, sizeof(WM_STA_IPconfig));
675680
//////
@@ -693,6 +698,12 @@ void setup()
693698
Serial.println(" on " + String(ARDUINO_BOARD));
694699
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION);
695700

701+
if ( ESP_ASYNC_WIFIMANAGER_VERSION < ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET )
702+
{
703+
Serial.print("Warning. Must use this example on Version later than : ");
704+
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET);
705+
}
706+
696707
if (FORMAT_FILESYSTEM)
697708
FileFS.format();
698709

@@ -859,7 +870,6 @@ void setup()
859870

860871
// New in v1.4.0
861872
ESPAsync_wifiManager.getSTAStaticIPConfig(WM_STA_IPconfig);
862-
displayIPConfigStruct(WM_STA_IPconfig);
863873
//////
864874

865875
saveConfigData();

examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino

Lines changed: 14 additions & 4 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.4.2
16+
Version: 1.4.3
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -27,12 +27,15 @@
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
2828
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2929
1.4.2 K Hoang 21/12/2020 Fix examples' bug not using saved WiFi Credentials after losing all WiFi connections.
30+
1.4.3 K Hoang 23/12/2020 Fix examples' bug not saving Static IP in certain cases.
3031
*****************************************************************************************************************************/
3132

3233
#if !( defined(ESP8266) || defined(ESP32) )
33-
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
34+
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
3435
#endif
3536

37+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.4.3"
38+
3639
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
3740
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3841

@@ -206,7 +209,7 @@ String AP_PASS;
206209
#define USE_DHCP_IP false
207210
#endif
208211

209-
#if ( USE_DHCP_IP || ( defined(USE_STATIC_IP_CONFIG_IN_CP) && !USE_STATIC_IP_CONFIG_IN_CP ) )
212+
#if ( USE_DHCP_IP )
210213
// Use DHCP
211214
#warning Using DHCP IP
212215
IPAddress stationIP = IPAddress(0, 0, 0, 0);
@@ -511,6 +514,8 @@ void saveConfigData()
511514
{
512515
file.write((uint8_t*) &WM_config, sizeof(WM_config));
513516

517+
displayIPConfigStruct(WM_STA_IPconfig);
518+
514519
// New in v1.4.0
515520
file.write((uint8_t*) &WM_STA_IPconfig, sizeof(WM_STA_IPconfig));
516521
//////
@@ -538,6 +543,12 @@ void setup()
538543
Serial.println(" on " + String(ARDUINO_BOARD));
539544
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION);
540545

546+
if ( ESP_ASYNC_WIFIMANAGER_VERSION < ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET )
547+
{
548+
Serial.print("Warning. Must use this example on Version later than : ");
549+
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET);
550+
}
551+
541552
//clean FS, for testing
542553
//FileFS.format();
543554

@@ -761,7 +772,6 @@ void setup()
761772

762773
// New in v1.4.0
763774
ESPAsync_wifiManager.getSTAStaticIPConfig(WM_STA_IPconfig);
764-
displayIPConfigStruct(WM_STA_IPconfig);
765775
//////
766776

767777
saveConfigData();

examples/Async_AutoConnectWithFeedback/Async_AutoConnectWithFeedback.ino

Lines changed: 13 additions & 3 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.4.2
16+
Version: 1.4.3
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -27,11 +27,14 @@
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
2828
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2929
1.4.2 K Hoang 21/12/2020 Fix examples' bug not using saved WiFi Credentials after losing all WiFi connections.
30+
1.4.3 K Hoang 23/12/2020 Fix examples' bug not saving Static IP in certain cases.
3031
*****************************************************************************************************************************/
3132
#if !( defined(ESP8266) || defined(ESP32) )
3233
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
3334
#endif
3435

36+
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.4.3"
37+
3538
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
3639
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3740

@@ -197,7 +200,7 @@ String AP_PASS;
197200
#define USE_DHCP_IP false
198201
#endif
199202

200-
#if ( USE_DHCP_IP || ( defined(USE_STATIC_IP_CONFIG_IN_CP) && !USE_STATIC_IP_CONFIG_IN_CP ) )
203+
#if ( USE_DHCP_IP )
201204
// Use DHCP
202205
#warning Using DHCP IP
203206
IPAddress stationIP = IPAddress(0, 0, 0, 0);
@@ -467,6 +470,8 @@ void saveConfigData()
467470
{
468471
file.write((uint8_t*) &WM_config, sizeof(WM_config));
469472

473+
displayIPConfigStruct(WM_STA_IPconfig);
474+
470475
// New in v1.4.0
471476
file.write((uint8_t*) &WM_STA_IPconfig, sizeof(WM_STA_IPconfig));
472477
//////
@@ -498,6 +503,12 @@ void setup()
498503
Serial.println(" on " + String(ARDUINO_BOARD));
499504
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION);
500505

506+
if ( ESP_ASYNC_WIFIMANAGER_VERSION < ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET )
507+
{
508+
Serial.print("Warning. Must use this example on Version later than : ");
509+
Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET);
510+
}
511+
501512
if (FORMAT_FILESYSTEM)
502513
FileFS.format();
503514

@@ -641,7 +652,6 @@ void setup()
641652

642653
// New in v1.4.0
643654
ESPAsync_wifiManager.getSTAStaticIPConfig(WM_STA_IPconfig);
644-
displayIPConfigStruct(WM_STA_IPconfig);
645655
//////
646656

647657
saveConfigData();

0 commit comments

Comments
 (0)