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
### 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`
  • Loading branch information
khoih-prog committed Jan 9, 2022
1 parent b097f46 commit a54278f
Show file tree
Hide file tree
Showing 12 changed files with 211 additions and 75 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ 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, STM32 core v2.1.0, etc.)
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, STM32 core v2.2.0, 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,10 +26,10 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.16
Arduino STM32 Core v2.1.0
Arduino IDE version: 1.8.19
Arduino STM32 Core v2.2.0
OS: Ubuntu 20.04 LTS
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
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
150 changes: 99 additions & 51 deletions README.md

Large diffs are not rendered by default.

7 changes: 7 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)
* [Release v1.5.0](#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 @@ -27,6 +28,12 @@

## Changelog

### Release v1.5.0

1. Fix the blocking issue in loop(). Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18)
2. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18#issuecomment-1006197561)
3. 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
17 changes: 16 additions & 1 deletion examples/Mega_ESP8266Shield/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,28 @@
#define BOARD_NAME BOARD_TYPE
#endif

#define ESP_AT_USE_AVR true

// Start location in EEPROM to store config data. Default 0
// Config data Size currently is 116 bytes)
#define EEPROM_START 0

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

#define USE_DYNAMIC_PARAMETERS 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 false //true

#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

/////////////////////////////////////////////
Expand Down
17 changes: 15 additions & 2 deletions examples/RPi_Pico_ESP8266Shield/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,22 @@

// 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 false //true

#define USE_DYNAMIC_PARAMETERS false
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

/////////////////////////////////////////////
Expand Down
17 changes: 15 additions & 2 deletions examples/SAMD_ESP8266Shield/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,22 @@

// 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 false //true

#define USE_DYNAMIC_PARAMETERS false
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

/////////////////////////////////////////////
Expand Down
18 changes: 16 additions & 2 deletions examples/SAM_DUE_ESP8266Shield/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,25 @@
#define EEPROM_START 0

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

// 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 false //true

#define USE_DYNAMIC_PARAMETERS false
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

/////////////////////////////////////////////
Expand Down
17 changes: 15 additions & 2 deletions examples/STM32_ESP8266Shield/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,22 @@

// 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 false //true

#define USE_DYNAMIC_PARAMETERS false
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

/////////////////////////////////////////////
Expand Down
17 changes: 15 additions & 2 deletions examples/nRF52_ESP8266Shield/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,22 @@

// 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 false //true

#define USE_DYNAMIC_PARAMETERS false
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

/////////////////////////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP_AT_WM_Lite",
"version": "1.4.1",
"version": "1.5.0",
"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",
"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.",
"authors":
Expand Down Expand Up @@ -39,7 +39,7 @@
{
"owner": "khoih-prog",
"name": "FlashStorage_SAMD",
"version": "^1.2.0",
"version": "^1.2.1",
"platforms": ["*"]
},
{
Expand All @@ -51,7 +51,7 @@
{
"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=ESP_AT_WM_Lite
version=1.4.1
version=1.5.0
author=Khoi Hoang
maintainer=Khoi Hoang <khoih.prog@gmail.com>
license=MIT
Expand Down
8 changes: 4 additions & 4 deletions platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ lib_compat_mode = strict

lib_deps =
; PlatformIO 4.x
; ESP8266_AT_WebServer@~1.4.0
; ESP8266_AT_WebServer@~1.5.2
; DoubleResetDetector_Generic@~1.7.3
; FlashStorage_STM32@~1.1.0
; FlashStorage_SAMD@~1.2.0
; FlashStorage_SAMD@~1.2.1
; DueFlashStorage@~1.0.0

; PlatformIO 5.x
khoih-prog/ESP8266_AT_WebServer@~1.4.0
khoih-prog/ESP8266_AT_WebServer@~1.5.2
khoih-prog/DoubleResetDetector_Generic@~1.7.3
khoih-prog/FlashStorage_STM32@~1.1.0
khoih-prog/FlashStorage_SAMD@~1.2.0
khoih-prog/FlashStorage_SAMD@~1.2.1
sebnil/DueFlashStorage@~1.0.0

build_flags =
Expand Down

0 comments on commit a54278f

Please sign in to comment.