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

Commit a54278f

Browse files
authored
v1.5.0 to fix the blocking issue in loop()
### Release v1.5.0 1. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 2. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 3. Update `Packages' Patches`
1 parent b097f46 commit a54278f

File tree

12 files changed

+211
-75
lines changed

12 files changed

+211
-75
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1414

1515
Please ensure to specify the following:
1616

17-
* Arduino IDE version (e.g. 1.8.16) or Platform.io version
18-
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, STM32 core v2.1.0, etc.)
17+
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18+
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, STM32 core v2.2.0, etc.)
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:
@@ -26,10 +26,10 @@ Please ensure to specify the following:
2626
### Example
2727

2828
```
29-
Arduino IDE version: 1.8.16
30-
Arduino STM32 Core v2.1.0
29+
Arduino IDE version: 1.8.19
30+
Arduino STM32 Core v2.2.0
3131
OS: Ubuntu 20.04 LTS
32-
Linux xy-Inspiron-3593 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
32+
Linux xy-Inspiron-3593 5.4.0-92-generic #103-Ubuntu SMP Fri Nov 26 16:13:00 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: 99 additions & 51 deletions
Large diffs are not rendered by default.

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
## Table of Contents
1313

1414
* [Changelog](#changelog)
15+
* [Release v1.5.0](#release-v150)
1516
* [Release v1.4.1](#release-v141)
1617
* [Major Release v1.4.0](#major-release-v140)
1718
* [Major Release v1.3.0](#major-release-v130)
@@ -27,6 +28,12 @@
2728

2829
## Changelog
2930

31+
### Release v1.5.0
32+
33+
1. Fix the blocking issue in loop(). Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18)
34+
2. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18#issuecomment-1006197561)
35+
3. Update `Packages' Patches`
36+
3037
### Release v1.4.1
3138

3239
1. Update `platform.ini` and `library.json` to use original `khoih-prog` instead of `khoih.prog` after PIO fix

examples/Mega_ESP8266Shield/defines.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,28 @@
4646
#define BOARD_NAME BOARD_TYPE
4747
#endif
4848

49+
#define ESP_AT_USE_AVR true
50+
4951
// Start location in EEPROM to store config data. Default 0
5052
// Config data Size currently is 116 bytes)
5153
#define EEPROM_START 0
5254

5355
/////////////////////////////////////////////
5456

55-
#define USE_DYNAMIC_PARAMETERS false
57+
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
58+
// Default 1 if not defined, and minimum 1.
59+
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
60+
61+
// Default no interval between recon WiFi if lost
62+
// Max permitted interval will be 10mins
63+
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
64+
// Only use whenever urgent tasks in loop() can't be delayed. But if so, it's better you have to rewrite your code, e.g. using higher priority tasks.
65+
#define WIFI_RECON_INTERVAL 30000
66+
67+
/////////////////////////////////////////////
68+
69+
#define USE_DYNAMIC_PARAMETERS false //true
70+
5671
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD
5772

5873
/////////////////////////////////////////////

examples/RPi_Pico_ESP8266Shield/defines.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,22 @@
9595

9696
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
9797
// Default is false (if not defined) => must input 2 sets of SSID/PWD
98-
#define REQUIRE_ONE_SET_SSID_PW false
98+
#define REQUIRE_ONE_SET_SSID_PW true //false
99+
100+
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
101+
// Default 1 if not defined, and minimum 1.
102+
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
103+
104+
// Default no interval between recon WiFi if lost
105+
// Max permitted interval will be 10mins
106+
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
107+
// Only use whenever urgent tasks in loop() can't be delayed. But if so, it's better you have to rewrite your code, e.g. using higher priority tasks.
108+
#define WIFI_RECON_INTERVAL 30000
109+
110+
/////////////////////////////////////////////
111+
112+
#define USE_DYNAMIC_PARAMETERS false //true
99113

100-
#define USE_DYNAMIC_PARAMETERS false
101114
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD
102115

103116
/////////////////////////////////////////////

examples/SAMD_ESP8266Shield/defines.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,22 @@
101101

102102
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
103103
// Default is false (if not defined) => must input 2 sets of SSID/PWD
104-
#define REQUIRE_ONE_SET_SSID_PW false
104+
#define REQUIRE_ONE_SET_SSID_PW true //false
105+
106+
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
107+
// Default 1 if not defined, and minimum 1.
108+
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
109+
110+
// Default no interval between recon WiFi if lost
111+
// Max permitted interval will be 10mins
112+
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
113+
// Only use whenever urgent tasks in loop() can't be delayed. But if so, it's better you have to rewrite your code, e.g. using higher priority tasks.
114+
#define WIFI_RECON_INTERVAL 30000
115+
116+
/////////////////////////////////////////////
117+
118+
#define USE_DYNAMIC_PARAMETERS false //true
105119

106-
#define USE_DYNAMIC_PARAMETERS false
107120
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD
108121

109122
/////////////////////////////////////////////

examples/SAM_DUE_ESP8266Shield/defines.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,25 @@
5959
#define EEPROM_START 0
6060

6161
/////////////////////////////////////////////
62+
6263
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
6364
// Default is false (if not defined) => must input 2 sets of SSID/PWD
64-
#define REQUIRE_ONE_SET_SSID_PW false
65+
#define REQUIRE_ONE_SET_SSID_PW true //false
66+
67+
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
68+
// Default 1 if not defined, and minimum 1.
69+
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
70+
71+
// Default no interval between recon WiFi if lost
72+
// Max permitted interval will be 10mins
73+
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
74+
// Only use whenever urgent tasks in loop() can't be delayed. But if so, it's better you have to rewrite your code, e.g. using higher priority tasks.
75+
#define WIFI_RECON_INTERVAL 30000
76+
77+
/////////////////////////////////////////////
78+
79+
#define USE_DYNAMIC_PARAMETERS false //true
6580

66-
#define USE_DYNAMIC_PARAMETERS false
6781
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD
6882

6983
/////////////////////////////////////////////

examples/STM32_ESP8266Shield/defines.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,22 @@
126126

127127
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
128128
// Default is false (if not defined) => must input 2 sets of SSID/PWD
129-
#define REQUIRE_ONE_SET_SSID_PW false
129+
#define REQUIRE_ONE_SET_SSID_PW true //false
130+
131+
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
132+
// Default 1 if not defined, and minimum 1.
133+
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
134+
135+
// Default no interval between recon WiFi if lost
136+
// Max permitted interval will be 10mins
137+
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
138+
// Only use whenever urgent tasks in loop() can't be delayed. But if so, it's better you have to rewrite your code, e.g. using higher priority tasks.
139+
#define WIFI_RECON_INTERVAL 30000
140+
141+
/////////////////////////////////////////////
142+
143+
#define USE_DYNAMIC_PARAMETERS false //true
130144

131-
#define USE_DYNAMIC_PARAMETERS false
132145
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD
133146

134147
/////////////////////////////////////////////

examples/nRF52_ESP8266Shield/defines.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,22 @@
8383

8484
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
8585
// Default is false (if not defined) => must input 2 sets of SSID/PWD
86-
#define REQUIRE_ONE_SET_SSID_PW false
86+
#define REQUIRE_ONE_SET_SSID_PW true //false
87+
88+
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
89+
// Default 1 if not defined, and minimum 1.
90+
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
91+
92+
// Default no interval between recon WiFi if lost
93+
// Max permitted interval will be 10mins
94+
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
95+
// Only use whenever urgent tasks in loop() can't be delayed. But if so, it's better you have to rewrite your code, e.g. using higher priority tasks.
96+
#define WIFI_RECON_INTERVAL 30000
97+
98+
/////////////////////////////////////////////
99+
100+
#define USE_DYNAMIC_PARAMETERS false //true
87101

88-
#define USE_DYNAMIC_PARAMETERS false
89102
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD
90103

91104
/////////////////////////////////////////////

library.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ESP_AT_WM_Lite",
3-
"version": "1.4.1",
3+
"version": "1.5.0",
44
"keywords": "wifi, MultiWiFi, ESP8266-AT, ESP32-AT, SAM DUE, SAMD, nRF52, STM32, rpi-pico, rp2040, nano-rp2040-connect, Credentials, config-portal, dynamic-params, EEPROM, FlashStorage-SAMD, FlashStorage-STM32, LittleFS, DueFlashStorage, AVR Mega, Double-Reset, FlashStorage, light-weight",
55
"description": "Light-Weight WiFi/Credentials Manager for AVR Mega, SAM DUE, SAMD21, SAMD51, nRF52, STM32, RP2040-based Nano_RP2040_connect, RASPBERRY_PI_PICO boards, etc. using ESP8266/ESP32-AT-command shields with web configuration portal. Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters. You can also specify 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. Credentials and dynamic custom parameters are saved in EPROM, FlashStorage_SAMD, FlashStorage_STM32, DueFlashStorage or nRF52/RP2040 LittleFS.",
66
"authors":
@@ -39,7 +39,7 @@
3939
{
4040
"owner": "khoih-prog",
4141
"name": "FlashStorage_SAMD",
42-
"version": "^1.2.0",
42+
"version": "^1.2.1",
4343
"platforms": ["*"]
4444
},
4545
{
@@ -51,7 +51,7 @@
5151
{
5252
"owner": "khoih-prog",
5353
"name": "ESP8266_AT_WebServer",
54-
"version": "^1.4.0",
54+
"version": "^1.5.2",
5555
"platforms": ["*"]
5656
}
5757
],

library.properties

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

platformio/platformio.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ lib_compat_mode = strict
3838

3939
lib_deps =
4040
; PlatformIO 4.x
41-
; ESP8266_AT_WebServer@~1.4.0
41+
; ESP8266_AT_WebServer@~1.5.2
4242
; DoubleResetDetector_Generic@~1.7.3
4343
; FlashStorage_STM32@~1.1.0
44-
; FlashStorage_SAMD@~1.2.0
44+
; FlashStorage_SAMD@~1.2.1
4545
; DueFlashStorage@~1.0.0
4646

4747
; PlatformIO 5.x
48-
khoih-prog/ESP8266_AT_WebServer@~1.4.0
48+
khoih-prog/ESP8266_AT_WebServer@~1.5.2
4949
khoih-prog/DoubleResetDetector_Generic@~1.7.3
5050
khoih-prog/FlashStorage_STM32@~1.1.0
51-
khoih-prog/FlashStorage_SAMD@~1.2.0
51+
khoih-prog/FlashStorage_SAMD@~1.2.1
5252
sebnil/DueFlashStorage@~1.0.0
5353

5454
build_flags =

0 commit comments

Comments
 (0)