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

Commit 0287ecf

Browse files
authored
v1.3.0
### Release v1.3.0 1. Fix invalid "blank" Config Data treated as Valid. 2. Permit optionally inputting one set of WiFi SSID/PWD by using `REQUIRE_ONE_SET_SSID_PW == true` 3. Enforce WiFi PWD minimum length of 8 chars 4. Fix bug where EEPROM_SIZE truncated by DRD/MRD to 512, resulting lost and corrupted data. 5. Fix crashing bug in serverSendHeaders()
1 parent 44df0c3 commit 0287ecf

File tree

12 files changed

+206
-140
lines changed

12 files changed

+206
-140
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1515
Please ensure to specify the following:
1616

1717
* Arduino IDE version (e.g. 1.8.13) or Platform.io version
18-
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v2.7.4 or ESP32 v1.0.4)
18+
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v2.7.4 or ESP32 v1.0.6)
1919
* Contextual information (e.g. what you were trying to achieve)
2020
* Simplest possible steps to reproduce
2121
* Anything that might be relevant in your opinion, such as:
@@ -29,7 +29,7 @@ Please ensure to specify the following:
2929
Arduino IDE version: 1.8.13
3030
ESP8266 Core Version 2.7.4
3131
OS: Ubuntu 20.04 LTS
32-
Linux xy-Inspiron-3593 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
32+
Linux xy-Inspiron-3593 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
3333
3434
Context:
3535
The board couldn't autoreconnect to Local Blynk Server after router power recycling.

README.md

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* [Features](#features)
1616
* [Currently supported Boards](#currently-supported-boards)
1717
* [Changelog](#changelog)
18+
* [Release v1.3.0](#release-v130)
1819
* [Release v1.2.0](#release-v120)
1920
* [Release v1.1.0](#release-v110)
2021
* [Release v1.0.0](#release-v100)
@@ -54,6 +55,7 @@
5455
* [8. To use custom HTML Style](#8-to-use-custom-html-style)
5556
* [9. To use custom Head Elements](#9-to-use-custom-head-elements)
5657
* [10. To use CORS Header](#10-to-use-cors-header)
58+
* [11. To use and input only one set of WiFi SSID and PWD](#11-to-use-and-input-only-one-set-of-wifi-ssid-and-pwd)
5759
* [Examples](#examples)
5860
* [ 1. ESP_WiFi](examples/ESP_WiFi)
5961
* [ 2. ESP_WiFi_MQTT](examples/ESP_WiFi_MQTT)
@@ -141,6 +143,14 @@ This [**ESP_WiFiManager_Lite** library](https://github.com/khoih-prog/ESP_WiFiMa
141143

142144
## Changelog
143145

146+
### Release v1.3.0
147+
148+
1. Fix invalid "blank" Config Data treated as Valid.
149+
2. Permit optionally inputting one set of WiFi SSID/PWD by using `REQUIRE_ONE_SET_SSID_PW == true`
150+
3. Enforce WiFi PWD minimum length of 8 chars
151+
4. Fix bug where EEPROM_SIZE truncated by DRD/MRD to 512, resulting lost and corrupted data.
152+
5. Fix crashing bug in serverSendHeaders()
153+
144154
### Release v1.2.0
145155

146156
1. Configurable **Customs HTML Headers**, including Customs Style, Customs Head Elements, CORS Header.
@@ -163,11 +173,11 @@ This [**ESP_WiFiManager_Lite** library](https://github.com/khoih-prog/ESP_WiFiMa
163173

164174
1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
165175
2. [`ESP8266 Core 2.7.4+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/)
166-
3. [`ESP32 Core 1.0.4+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
176+
3. [`ESP32 Core 1.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
167177
4. [`ESP32S2 Core 1.0.4+`](https://github.com/espressif/arduino-esp32/tree/esp32s2) for ESP32S2-based boards.
168178
5. [`ESP_DoubleResetDetector v1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector).
169179
6. [`ESP_MultiResetDetector v1.1.1+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector).
170-
7. [`LittleFS_esp32 v1.0.5+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32).
180+
7. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32).
171181

172182
---
173183

@@ -546,6 +556,26 @@ While in AP mode, connect to it using its `SSID` (ESP_ABCDEF) / `Password` ("MyE
546556
547557
Once Credentials / WiFi network information is saved in the host non-volatile memory, it will try to autoconnect to WiFi every time it is started, without requiring any function calls in the sketch.
548558
559+
560+
#### 11. To use and input only one set of WiFi SSID and PWD
561+
562+
#### If you need to use and input only one set of WiFi SSID/PWD.
563+
564+
```
565+
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
566+
// Default is false (if not defined) => must input 2 sets of SSID/PWD
567+
#define REQUIRE_ONE_SET_SSID_PW true
568+
```
569+
But it's always advisable to use and input both sets for reliability.
570+
571+
#### If you need to use both sets of WiFi SSID/PWD
572+
573+
```
574+
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
575+
// Default is false (if not defined) => must input 2 sets of SSID/PWD
576+
#define REQUIRE_ONE_SET_SSID_PW false
577+
```
578+
549579
---
550580
---
551581
@@ -589,7 +619,7 @@ If you're already connected to a listed WiFi AP and don't want to change anythin
589619
590620
1. Now you can use special chars such as **~, !, @, #, $, %, ^, &, _, -, space,etc.** thanks to [brondolin](https://github.com/brondolin) to provide the amazing fix in [**No save the char # at end of the wifi password**](https://github.com/khoih-prog/Blynk_WM/issues/3) to permit input special chars such as **%** and **#** into data fields.
591621
2. The SSIDs, Passwords must be input (or to make them different from **blank**). Otherwise, the Config Portal will re-open until those fields have been changed. If you don't need any field, just input anything or use duplicated data from similar field.
592-
3. WiFi password max length now is 63 chars according to WPA2 standard.
622+
3. WiFi password min length now is 8, max length is 63 chars according to WPA2 standard.
593623
594624
---
595625
@@ -998,16 +1028,28 @@ void loop()
9981028

9991029
/////////////////////////////////////////////
10001030

1031+
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
1032+
// Default is false (if not defined) => must input 2 sets of SSID/PWD
1033+
#define REQUIRE_ONE_SET_SSID_PW false
1034+
10011035
// Force some params
10021036
#define TIMEOUT_RECONNECT_WIFI 10000L
1037+
1038+
// Permit running CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET times before reset hardware
1039+
// to permit user another chance to config. Only if Config Data is valid.
1040+
// If Config Data is invalid, this has no effect as Config Portal will persist
10031041
#define RESET_IF_CONFIG_TIMEOUT true
1042+
1043+
// Permitted range of user-defined CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET between 2-100
10041044
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
10051045

1006-
// Config Timeout 120s (default 60s)
1007-
#define CONFIG_TIMEOUT 120000L
1046+
// Config Timeout 120s (default 60s). Applicable only if Config Data is Valid
1047+
#define CONFIG_TIMEOUT 120000L
10081048

10091049
#define USE_DYNAMIC_PARAMETERS true
10101050

1051+
/////////////////////////////////////////////
1052+
10111053
#include <ESP_WiFiManager_Lite.h>
10121054

10131055
#if ESP8266
@@ -1200,7 +1242,7 @@ This is the terminal output when running [**ESP_WiFi**](examples/ESP_WiFi) examp
12001242

12011243
```
12021244
Starting ESP_WiFi using LittleFS on ESP32_DEV
1203-
ESP_WiFiManager_Lite v1.2.0
1245+
ESP_WiFiManager_Lite v1.3.0
12041246
ESP_MultiResetDetector v1.1.1
12051247
LittleFS Flag read = 0xFFFC0003
12061248
multiResetDetectorFlag = 0xFFFC0003
@@ -1271,7 +1313,7 @@ FFFFFFFFF
12711313

12721314
```
12731315
Starting ESP_WiFi using LittleFS on ESP32_DEV
1274-
ESP_WiFiManager_Lite v1.2.0
1316+
ESP_WiFiManager_Lite v1.3.0
12751317
ESP_MultiResetDetector v1.1.1
12761318
LittleFS Flag read = 0xFFFE0001
12771319
multiResetDetectorFlag = 0xFFFE0001
@@ -1343,7 +1385,7 @@ This is the terminal output when running [**ESP_WiFi_MQTT**](examples/ESP_WiFi_M
13431385

13441386
```
13451387
Starting ESP_WiFi_MQTT using LittleFS on ESP8266_NODEMCU
1346-
ESP_WiFiManager_Lite v1.2.0
1388+
ESP_WiFiManager_Lite v1.3.0
13471389
ESP_MultiResetDetector v1.1.1
13481390
LittleFS Flag read = 0xFFFE0001
13491391
multiResetDetectorFlag = 0xFFFE0001
@@ -1418,7 +1460,7 @@ NNN
14181460
14191461
14201462
Starting ESP_WiFi_MQTT using LittleFS on ESP8266_NODEMCU
1421-
ESP_WiFiManager_Lite v1.2.0
1463+
ESP_WiFiManager_Lite v1.3.0
14221464
ESP_MultiResetDetector v1.1.1
14231465
LittleFS Flag read = 0xFFFE0001
14241466
multiResetDetectorFlag = 0xFFFE0001
@@ -1511,7 +1553,7 @@ This is the terminal output when running [**ESP_WiFi_MQTT**](examples/ESP_WiFi_M
15111553

15121554
```
15131555
Starting ESP_WiFi_MQTT using LittleFS on ESP32S2_DEV
1514-
ESP_WiFiManager_Lite v1.2.0
1556+
ESP_WiFiManager_Lite v1.3.0
15151557
ESP_MultiResetDetector v1.1.1
15161558
LittleFS Flag read = 0xFFFE0001
15171559
multiResetDetectorFlag = 0xFFFE0001
@@ -1624,7 +1666,7 @@ entry 0x4004c190
16241666
16251667
16261668
Starting ESP_WiFi_MQTT using LittleFS on ESP32S2_DEV
1627-
ESP_WiFiManager_Lite v1.2.0
1669+
ESP_WiFiManager_Lite v1.3.0
16281670
ESP_MultiResetDetector v1.1.1
16291671
LittleFS Flag read = 0xFFFE0001
16301672
multiResetDetectorFlag = 0xFFFE0001
@@ -1749,6 +1791,14 @@ If you get compilation errors, more often than not, you may need to install a ne
17491791

17501792
## Releases
17511793

1794+
### Release v1.3.0
1795+
1796+
1. Fix invalid "blank" Config Data treated as Valid.
1797+
2. Permit optionally inputting one set of WiFi SSID/PWD by using `REQUIRE_ONE_SET_SSID_PW == true`
1798+
3. Enforce WiFi PWD minimum length of 8 chars
1799+
4. Fix bug where EEPROM_SIZE truncated by DRD/MRD to 512, resulting lost and corrupted data.
1800+
5. Fix crashing bug in serverSendHeaders()
1801+
17521802
### Release v1.2.0
17531803

17541804
1. Configurable **Customs HTML Headers**, including Customs Style, Customs Head Elements, CORS Header.
@@ -1800,6 +1850,8 @@ Submit issues to: [ESP_WiFiManager_Lite issues](https://github.com/khoih-prog/ES
18001850
16. Re-structure all examples to separate Credentials / Defines / Dynamic Params / Code so that you can change Credentials / Dynamic Params quickly for each device.
18011851
17. Add Table of Contents and Version String
18021852
18. Configurable **Customs HTML Headers**, including Customs Style, Customs Head Elements, CORS Header
1853+
19. Permit optionally inputting one set of WiFi SSID/PWD by using `REQUIRE_ONE_SET_SSID_PW == true`
1854+
20. Enforce WiFi PWD minimum length of 8 chars
18031855

18041856
---
18051857
---

examples/ESP_WiFi/defines.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,28 @@
6161

6262
/////////////////////////////////////////////
6363

64+
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
65+
// Default is false (if not defined) => must input 2 sets of SSID/PWD
66+
#define REQUIRE_ONE_SET_SSID_PW false
67+
6468
// Force some params
6569
#define TIMEOUT_RECONNECT_WIFI 10000L
70+
71+
// Permit running CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET times before reset hardware
72+
// to permit user another chance to config. Only if Config Data is valid.
73+
// If Config Data is invalid, this has no effect as Config Portal will persist
6674
#define RESET_IF_CONFIG_TIMEOUT true
75+
76+
// Permitted range of user-defined CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET between 2-100
6777
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
6878

69-
// Config Timeout 120s (default 60s)
70-
#define CONFIG_TIMEOUT 120000L
79+
// Config Timeout 120s (default 60s). Applicable only if Config Data is Valid
80+
#define CONFIG_TIMEOUT 120000L
7181

7282
#define USE_DYNAMIC_PARAMETERS true
7383

84+
/////////////////////////////////////////////
85+
7486
#include <ESP_WiFiManager_Lite.h>
7587

7688
#if ESP8266

examples/ESP_WiFi_MQTT/defines.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,27 @@
6161

6262
/////////////////////////////////////////////
6363

64+
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
65+
// Default is false (if not defined) => must input 2 sets of SSID/PWD
66+
#define REQUIRE_ONE_SET_SSID_PW false
67+
6468
// Force some params
6569
#define TIMEOUT_RECONNECT_WIFI 10000L
70+
71+
// Permit running CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET times before reset hardware
72+
// to permit user another chance to config. Only if Config Data is valid.
73+
// If Config Data is invalid, this has no effect as Config Portal will persist
6674
#define RESET_IF_CONFIG_TIMEOUT true
75+
76+
// Permitted range of user-defined CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET between 2-100
6777
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
6878

69-
// Config Timeout 120s (default 60s)
70-
#define CONFIG_TIMEOUT 120000L
79+
// Config Timeout 120s (default 60s). Applicable only if Config Data is Valid
80+
#define CONFIG_TIMEOUT 120000L
7181

72-
// This must be true or error
73-
#define USE_DYNAMIC_PARAMETERS true
82+
#define USE_DYNAMIC_PARAMETERS true
83+
84+
/////////////////////////////////////////////
7485

7586
#include <ESP_WiFiManager_Lite.h>
7687

library.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ESP_WiFiManager_Lite",
3-
"version": "1.2.0",
4-
"keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, ESP32, ESP32-S2, ESP8266, Credentials, Manager, Config Portal, config-portal, DoubleReset, MultiReset, Detector, dynamic-params, dynamic, customs-header",
3+
"version": "1.3.0",
4+
"keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, ESP32, ESP32-S2, ESP8266, Credentials, Manager, Config Portal, config-portal, DoubleReset, MultiReset, Detector, dynamic-params, dynamic, customs-header, littlefs, littlefs_esp32, spiffs",
55
"description": "Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2) and ESP8266 boards. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.",
66
"authors":
77
{
@@ -39,7 +39,7 @@
3939
{
4040
"owner": "lorol",
4141
"name": "LittleFS_esp32",
42-
"version": ">=1.0.5",
42+
"version": ">=1.0.6",
4343
"platforms": ["espressif32"]
4444
}
4545
],

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP_WiFiManager_Lite
2-
version=1.2.0
2+
version=1.3.0
33
author=Khoi Hoang
44
maintainer=Khoi Hoang <[email protected]>
55
license=MIT

pics/MQTT.png

-1.44 KB
Loading

pics/Main.png

620 Bytes
Loading

pics/Save.png

-5.82 KB
Loading

platformio/platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ lib_deps =
3131
; PlatformIO 4.x
3232
ESP_DoubleResetDetector@>=1.1.1
3333
ESP_MultiResetDetector@>=1.1.1
34-
LittleFS_esp32@>=1.0.5
34+
LittleFS_esp32@>=1.0.6
3535
; PlatformIO 5.x
3636
; khoih.prog/ESP_DoubleResetDetector@>=1.1.1
3737
; khoih.prog/ESP_MultiResetDetector@>=1.1.1
38-
; lorol/LittleFS_esp32@>=1.0.5
38+
; lorol/LittleFS_esp32@>=1.0.6
3939

4040

4141
build_flags =

0 commit comments

Comments
 (0)