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

Commit

Permalink
v1.5.0 to fix the blocking issue in loop()
Browse files Browse the repository at this point in the history
### Major Release v1.5.0

1. Add support to RP2040-based boards, such as **NANO_RP2040_CONNECT**, using [**Earle Philhower's arduino-pico** core](https://github.com/earlephilhower/arduino-pico)
2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18)
3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment))
4. Update `Packages' Patches`
  • Loading branch information
khoih-prog committed Jan 7, 2022
1 parent a59bcbc commit 485da85
Show file tree
Hide file tree
Showing 27 changed files with 1,342 additions and 350 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.16) or Platform.io version
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v2.5.2, etc.)
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v2.6.1, etc.)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
* Anything that might be relevant in your opinion, such as:
Expand All @@ -26,11 +26,11 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.16
RASPBERRY_PI_PICO board
ArduinoCore-mbed v2.5.2
Arduino IDE version: 1.8.19
Nano_RP2040_Connect board
ArduinoCore-mbed v2.6.1
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
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
Context:
The board couldn't autoreconnect to Local Blynk Server after router power recycling.
Expand Down
162 changes: 106 additions & 56 deletions README.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Major Release v1.5.0](#major-release-v150)
* [Release v1.4.1](#release-v141)
* [Major Release v1.4.0](#major-release-v140)
* [Major Release v1.3.0](#major-release-v130)
Expand All @@ -29,6 +30,13 @@

## Changelog

### Major Release v1.5.0

1. Add support to RP2040-based boards, such as **NANO_RP2040_CONNECT**, using [**Earle Philhower's arduino-pico** core](https://github.com/earlephilhower/arduino-pico)
2. Fix the blocking issue in loop(). Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18)
3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18#issuecomment-1006197561)
4. Update `Packages' Patches`

### Release v1.4.1

1. Update `platform.ini` and `library.json` to use original `khoih-prog` instead of `khoih.prog` after PIO fix
Expand Down
16 changes: 14 additions & 2 deletions examples/MKR1000_WiFi101/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,21 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

#define USE_DYNAMIC_PARAMETERS true
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

/////////////////////////////////////////////

Expand Down
16 changes: 14 additions & 2 deletions examples/MKR1000_WiFi101_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,21 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

#define USE_DYNAMIC_PARAMETERS true
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

/////////////////////////////////////////////

Expand Down
14 changes: 13 additions & 1 deletion examples/RP2040_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/RP2040_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/SAMD_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/SAMD_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/SAM_DUE_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/SAM_DUE_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/STM32_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/STM32_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/Teensy_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/Teensy_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/nRF52_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
14 changes: 13 additions & 1 deletion examples/nRF52_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,19 @@

// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
// Default is false (if not defined) => must input 2 sets of SSID/PWD
#define REQUIRE_ONE_SET_SSID_PW false
#define REQUIRE_ONE_SET_SSID_PW true //false

// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
// Default 1 if not defined, and minimum 1.
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2

// Default no interval between recon WiFi if lost
// Max permitted interval will be 10mins
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
// 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.
//#define WIFI_RECON_INTERVAL 30000

/////////////////////////////////////////////

#define USE_DYNAMIC_PARAMETERS true

Expand Down
8 changes: 4 additions & 4 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "WiFiManager_Generic_Lite",
"version": "1.4.1",
"version": "1.5.0",
"keywords": "wifi, multi-wifi, WiFiNINA, WiFi101, ESP32-AT, ESP8266-AT, Teensy, SAM-DUE, SAMD, STM32, nRF52, rpi-pico, rp2040, nano-rp2040-connect, config-portal, Double-Reset, dynamic-params, LittleFS, FlashStorage-SAMD, FlashStorage-STM32, Credentials, wi-fi, FlashStorage",
"description": "Library to configure MultiWiFi/Credentials at runtime for Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52, RP2040-based (Nano RP2040 Connect, RASPBERRY_PI_PICO) boards, etc. using Generic WiFi (WiFiNINA, WiFi101, ESP8266-AT, ESP32-AT, etc.) modules/shields. 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/InternalFS, (emulated-)EEPROM, FlashStorage_SAMD, FlashStorage_STM32 or DueFlashStorage. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. DoubleDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested.",
"authors":
Expand All @@ -27,7 +27,7 @@
{
"owner": "khoih-prog",
"name": "WiFiNINA_Generic",
"version": "^1.8.13",
"version": "^1.8.14-3",
"platforms": ["*"]
},
{
Expand Down Expand Up @@ -57,13 +57,13 @@
{
"owner": "khoih-prog",
"name": "WiFiWebServer",
"version": "^1.4.1",
"version": "^1.5.3",
"platforms": ["*"]
},
{
"owner": "khoih-prog",
"name": "ESP8266_AT_WebServer",
"version": "^1.4.0",
"version": "^1.5.2",
"platforms": ["*"]
},
{
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=WiFiManager_Generic_Lite
version=1.4.1
version=1.5.0
author=Khoi Hoang
maintainer=Khoi Hoang <khoih.prog@gmail.com>
license=MIT
Expand Down
Loading

0 comments on commit 485da85

Please sign in to comment.