Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Commit

Permalink
Major Releases v1.2.0
Browse files Browse the repository at this point in the history
### Major Releases v1.2.0

 1. Enable scan of WiFi networks for selection in Configuration Portal. Check [PR for v1.3.0 - Enable scan of WiFi networks #10](khoih-prog/WiFiManager_NINA_Lite#10). Now you can select optional **SCAN_WIFI_NETWORKS**, **MANUAL_SSID_INPUT_ALLOWED** to be able to manually input SSID, not only from a scanned SSID lists and **MAX_SSID_IN_LIST** (from 2-15)
 2. Fix invalid "blank" Config Data treated as Valid.
 3. Permit optionally inputting one set of WiFi SSID/PWD by using `REQUIRE_ONE_SET_SSID_PW == true`
 4. Enforce WiFi PWD minimum length of 8 chars
 5. Minor enhancement to not display garbage when data is invalid
 6. Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32. Check [Custom Blynk port not working for BlynkSimpleEsp32_Async_WM.h #4](khoih-prog/Blynk_Async_WM#4)
 7. To permit auto-reset after configurable timeout if DRD/MRD or non-persistent forced-CP. Check [**Good new feature: Blynk.resetAndEnterConfigPortal() Thanks & question #27**](khoih-prog/Blynk_WM#27)
 8. Fix rare Config Portal bug not updating Config and dynamic Params data successfully in very noisy or weak WiFi situation
 9. Tested with [**Latest ESP32 Core 1.0.6**](https://github.com/espressif/arduino-esp32) for ESP32-based boards.
10. Update examples
  • Loading branch information
khoih-prog committed Apr 26, 2021
1 parent f97288f commit aa6dcbf
Show file tree
Hide file tree
Showing 29 changed files with 1,544 additions and 318 deletions.
6 changes: 3 additions & 3 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.13) or Platform.io version
* `ESP32` Core Version (e.g. ESP32 core v1.0.4)
* `ESP32` Core Version (e.g. ESP32 core v1.0.6)
* 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 @@ -27,9 +27,9 @@ Please ensure to specify the following:

```
Arduino IDE version: 1.8.13
ESP32 Core Version 1.0.4
ESP32 Core Version 1.0.6
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-64-generic #72-Ubuntu SMP Fri Jan 15 10:27:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35: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
346 changes: 292 additions & 54 deletions README.md

Large diffs are not rendered by default.

62 changes: 45 additions & 17 deletions examples/Async_ESP32_BLE_WF/Async_ESP32_BLE_WF.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_Async_ESP32_BT_WF
Licensed under MIT license
Version: 1.1.1
Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -18,6 +18,7 @@
1.1.0 K Hoang 30/12/2020 Add support to LittleFS. Remove possible compiler warnings. Update examples
1.1.1 K Hoang 31/01/2021 Add functions to control Config Portal (CP) from software or Virtual Switches
Fix CP and Dynamic Params bugs. To permit autoreset after timeout if DRD/MRD or forced CP
1.2.0 K Hoang 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal and many new features.
*****************************************************************************************************************************/
/****************************************************************************************************************************
Important Notes:
Expand Down Expand Up @@ -135,6 +136,11 @@ void checkStatus()

char BLE_Device_Name[] = "GeigerCounter-BLE";

#if USING_CUSTOMS_STYLE
const char NewCustomsStyle[] /*PROGMEM*/ = "<style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}\
button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>";
#endif

void setup()
{
Serial.begin(115200);
Expand Down Expand Up @@ -198,6 +204,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 232), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));

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

#if USING_CUSTOMS_STYLE
Blynk.setCustomsStyle(NewCustomsStyle);
#endif

#if USING_CUSTOMS_HEAD_ELEMENT
Blynk.setCustomsHeadElement("<style>html{filter: invert(10%);}</style>");
#endif

#if USING_CORS_FEATURE
Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
#endif

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

// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
Expand Down Expand Up @@ -266,23 +288,9 @@ void displayCredentials()
Serial.println(myMenuItems[i].pdata);
}
}
#endif

void loop()
void displayCredentialsInLoop()
{
#if BLYNK_USE_BLE_ONLY
Blynk_BLE.run();
#else
if (USE_BLE)
Blynk_BLE.run();
else
Blynk_WF.run();
#endif

timer.run();
checkStatus();

#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;

if (!displayedCredentials)
Expand All @@ -301,5 +309,25 @@ void loop()
}
}
}
#endif
}

#endif

void loop()
{
#if BLYNK_USE_BLE_ONLY
Blynk_BLE.run();
#else
if (USE_BLE)
Blynk_BLE.run();
else
Blynk_WF.run();
#endif

timer.run();
checkStatus();

#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
displayCredentialsInLoop();
#endif
}
25 changes: 24 additions & 1 deletion examples/Async_ESP32_BLE_WF/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define ESP32_BLE_WF_DEBUG true

#define DOUBLERESETDETECTOR_DEBUG true
#define BLYNK_WM_DEBUG 3
#define BLYNK_WM_DEBUG 1

// Not use #define USE_LITTLEFS and #define USE_SPIFFS => using SPIFFS for configuration data in WiFiManager
// (USE_LITTLEFS == false) and (USE_SPIFFS == false) => using EEPROM for configuration data in WiFiManager
Expand All @@ -42,6 +42,15 @@
#define EEPROM_START 0
#endif

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

// Add customs headers from v1.2.0
#define USING_CUSTOMS_STYLE true
#define USING_CUSTOMS_HEAD_ELEMENT true
#define USING_CORS_FEATURE true

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

// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
Expand All @@ -61,6 +70,20 @@
#if !BLYNK_USE_BLE_ONLY
#if USE_BLYNK_WM
#define USE_DYNAMIC_PARAMETERS true

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

#define REQUIRE_ONE_SET_SSID_PW false

#define SCAN_WIFI_NETWORKS true

// To be able to manually input SSID, not from a scanned SSID lists
#define MANUAL_SSID_INPUT_ALLOWED true

// From 2-15
#define MAX_SSID_IN_LIST 8

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

#warning Please select 1.3MB+ for APP (Minimal SPIFFS (1.9MB APP, OTA), HugeAPP(3MB APP, NoOTA) or NoOA(2MB APP)
#include <BlynkSimpleEsp32_Async_WFM.h>
Expand Down
62 changes: 45 additions & 17 deletions examples/Async_ESP32_BT_WF/Async_ESP32_BT_WF.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_Async_ESP32_BT_WF
Licensed under MIT license
Version: 1.1.1
Version: 1.2.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -18,6 +18,7 @@
1.1.0 K Hoang 30/12/2020 Add support to LittleFS. Remove possible compiler warnings. Update examples
1.1.1 K Hoang 31/01/2021 Add functions to control Config Portal (CP) from software or Virtual Switches
Fix CP and Dynamic Params bugs. To permit autoreset after timeout if DRD/MRD or forced CP
1.2.0 K Hoang 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal and many new features.
*****************************************************************************************************************************/
/****************************************************************************************************************************
Important Notes:
Expand Down Expand Up @@ -135,6 +136,11 @@ void checkStatus()

char BT_Device_Name[] = "GeigerCounter-BT";

#if USING_CUSTOMS_STYLE
const char NewCustomsStyle[] /*PROGMEM*/ = "<style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}\
button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>";
#endif

void setup()
{
Serial.begin(115200);
Expand Down Expand Up @@ -197,6 +203,22 @@ void setup()
//Blynk.setSTAStaticIPConfig(IPAddress(192, 168, 2, 232), IPAddress(192, 168, 2, 1), IPAddress(255, 255, 255, 0),
// IPAddress(4, 4, 4, 4), IPAddress(8, 8, 8, 8));

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

#if USING_CUSTOMS_STYLE
Blynk.setCustomsStyle(NewCustomsStyle);
#endif

#if USING_CUSTOMS_HEAD_ELEMENT
Blynk.setCustomsHeadElement("<style>html{filter: invert(10%);}</style>");
#endif

#if USING_CORS_FEATURE
Blynk.setCORSHeader("Your Access-Control-Allow-Origin");
#endif

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

// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
//Blynk.begin();
// Use this to personalize DHCP hostname (RFC952 conformed)
Expand Down Expand Up @@ -265,23 +287,9 @@ void displayCredentials()
Serial.println(myMenuItems[i].pdata);
}
}
#endif

void loop()
void displayCredentialsInLoop()
{
#if BLYNK_USE_BT_ONLY
Blynk_BT.run();
#else
if (USE_BT)
Blynk_BT.run();
else
Blynk_WF.run();
#endif

timer.run();
checkStatus();

#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
static bool displayedCredentials = false;

if (!displayedCredentials)
Expand All @@ -300,5 +308,25 @@ void loop()
}
}
}
#endif
}

#endif

void loop()
{
#if BLYNK_USE_BT_ONLY
Blynk_BT.run();
#else
if (USE_BT)
Blynk_BT.run();
else
Blynk_WF.run();
#endif

timer.run();
checkStatus();

#if (USE_BLYNK_WM && USE_DYNAMIC_PARAMETERS)
displayCredentialsInLoop();
#endif
}
23 changes: 23 additions & 0 deletions examples/Async_ESP32_BT_WF/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
#define EEPROM_START 0
#endif

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

// Add customs headers from v1.2.0
#define USING_CUSTOMS_STYLE true
#define USING_CUSTOMS_HEAD_ELEMENT true
#define USING_CORS_FEATURE true

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

// Force some params in Blynk, only valid for library version 1.0.1 and later
#define TIMEOUT_RECONNECT_WIFI 10000L
#define RESET_IF_CONFIG_TIMEOUT true
Expand All @@ -59,6 +68,20 @@
#if !BLYNK_USE_BT_ONLY
#if USE_BLYNK_WM
#define USE_DYNAMIC_PARAMETERS true

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

#define REQUIRE_ONE_SET_SSID_PW false

#define SCAN_WIFI_NETWORKS true

// To be able to manually input SSID, not from a scanned SSID lists
#define MANUAL_SSID_INPUT_ALLOWED true

// From 2-15
#define MAX_SSID_IN_LIST 8

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

#warning Please select 1.3MB+ for APP (Minimal SPIFFS (1.9MB APP, OTA), HugeAPP(3MB APP, NoOTA) or NoOA(2MB APP)
#include <BlynkSimpleEsp32_Async_WFM.h>
Expand Down
Loading

0 comments on commit aa6dcbf

Please sign in to comment.