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

Commit

Permalink
v1.3.0 to enable scan of WiFi networks
Browse files Browse the repository at this point in the history
### Major Release v1.3.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-6 for ESP8266-AT or 2-15 for other)
2. Minor enhancement to not display garbage when data is invalid
3. Tested with new [Arduino Core for STM32 v2.0.0](https://github.com/stm32duino/Arduino_Core_STM32) and add support to new STM32L5 boards.
  • Loading branch information
khoih-prog committed Apr 25, 2021
1 parent e4e34cc commit 8498c80
Show file tree
Hide file tree
Showing 36 changed files with 2,037 additions and 164 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
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v2.7.4, etc.)
* Board Core Version (e.g. Arduino SAMD core v1.8.11, ESP8266 core v2.7.4, 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 @@ -27,9 +27,9 @@ Please ensure to specify the following:

```
Arduino IDE version: 1.8.13
Arduino SAM DUE Core Version 1.6.12
Arduino SAMD Core Version 1.8.11
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-71-generic #79-Ubuntu SMP Wed Mar 24 10:56:57 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
236 changes: 210 additions & 26 deletions README.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions examples/MKR1000_WiFi101/MKR1000_WiFi101.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Generic_Lite
Licensed under MIT license
Version: 1.2.0
Version: 1.3.0

Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -19,7 +19,8 @@
Add customs HTML header feature. Fix bug.
1.1.2 K Hoang 30/03/2021 Fix MultiWiFi connection bug.
1.1.3 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid.
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.3.0 Michael H 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
*****************************************************************************************************************************/

#include "defines.h"
Expand Down
14 changes: 12 additions & 2 deletions examples/MKR1000_WiFi101/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,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 false

#define USE_DYNAMIC_PARAMETERS true
#define USE_DYNAMIC_PARAMETERS true

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

#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

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

Expand Down
5 changes: 3 additions & 2 deletions examples/MKR1000_WiFi101_MQTT/MKR1000_WiFi101_MQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Generic_Lite
Licensed under MIT license
Version: 1.2.0
Version: 1.3.0

Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -19,7 +19,8 @@
Add customs HTML header feature. Fix bug.
1.1.2 K Hoang 30/03/2021 Fix MultiWiFi connection bug.
1.1.3 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid.
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.3.0 Michael H 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
*****************************************************************************************************************************/
/****************************************************************************************************************************
You have to modify file ./libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp as follows to avoid dtostrf error, if exists
Expand Down
14 changes: 12 additions & 2 deletions examples/MKR1000_WiFi101_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,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 false

#define USE_DYNAMIC_PARAMETERS true
#define USE_DYNAMIC_PARAMETERS true

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

#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

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

Expand Down
5 changes: 3 additions & 2 deletions examples/SAMD_WiFi/SAMD_WiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Generic_Lite
Licensed under MIT license
Version: 1.2.0
Version: 1.3.0

Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -19,7 +19,8 @@
Add customs HTML header feature. Fix bug.
1.1.2 K Hoang 30/03/2021 Fix MultiWiFi connection bug.
1.1.3 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid.
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.3.0 Michael H 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
*****************************************************************************************************************************/

#include "defines.h"
Expand Down
25 changes: 21 additions & 4 deletions examples/SAMD_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define DEBUG_WIFI_WEBSERVER_PORT Serial
#define WIFI_GENERIC_DEBUG_OUTPUT Serial

#define _WIFI_GENERIC_LOGLEVEL_ 4
#define _WIFI_GENERIC_LOGLEVEL_ 1

#define DRD_GENERIC_DEBUG true

Expand Down Expand Up @@ -152,9 +152,9 @@

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

#define USE_WIFI_NINA true
#define USE_WIFI_NINA false
#define USE_WIFI101 false
#define USE_WIFI_CUSTOM false
#define USE_WIFI_CUSTOM true

#if USE_WIFI_NINA

Expand Down Expand Up @@ -232,13 +232,30 @@

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

#define SCAN_WIFI_NETWORKS true

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

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

#if (USE_WIFI_CUSTOM && USE_ESP_AT_SHIELD)
// ESP-AT can use longer than 2K HTML and DYNAMIC_PARAMETERS
// ESP-AT can't use longer than 2K HTML and DYNAMIC_PARAMETERS
#undef USE_DYNAMIC_PARAMETERS
#define USE_DYNAMIC_PARAMETERS false
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

// From 2-6 to keep HTML short for ESP8266-AT. Limited 6 in WiFiEspAT library anyway
#define MAX_SSID_IN_LIST 6

#else

// From 2-15
#define MAX_SSID_IN_LIST 8
#endif

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

#include <WiFiManager_Generic_Lite_SAMD.h>

#define HOST_NAME "SAMD-Master-Controller"
Expand Down
5 changes: 3 additions & 2 deletions examples/SAMD_WiFi_MQTT/SAMD_WiFi_MQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Generic_Lite
Licensed under MIT license
Version: 1.2.0
Version: 1.3.0

Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -19,7 +19,8 @@
Add customs HTML header feature. Fix bug.
1.1.2 K Hoang 30/03/2021 Fix MultiWiFi connection bug.
1.1.3 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid.
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.3.0 Michael H 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
*****************************************************************************************************************************/
/****************************************************************************************************************************
You have to modify file ./libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp as follows to avoid dtostrf error, if exists
Expand Down
21 changes: 19 additions & 2 deletions examples/SAMD_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,30 @@

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

#define SCAN_WIFI_NETWORKS true

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

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

#if (USE_WIFI_CUSTOM && USE_ESP_AT_SHIELD)
// ESP-AT can use longer than 2K HTML and DYNAMIC_PARAMETERS
// ESP-AT can't use longer than 2K HTML and DYNAMIC_PARAMETERS
#undef USE_DYNAMIC_PARAMETERS
#define USE_DYNAMIC_PARAMETERS false
#error Can't use with ESP_AT_SHIELD
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

// From 2-6 to keep HTML short for ESP8266-AT. Limited 6 in WiFiEspAT library anyway
#define MAX_SSID_IN_LIST 6

#else

// From 2-15
#define MAX_SSID_IN_LIST 8
#endif

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

#include <WiFiManager_Generic_Lite_SAMD.h>

#define HOST_NAME "SAMD-MQTT-Controller"
Expand Down
5 changes: 3 additions & 2 deletions examples/SAM_DUE_WiFi/SAM_DUE_WiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Generic_Lite
Licensed under MIT license
Version: 1.2.0
Version: 1.3.0

Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -19,7 +19,8 @@
Add customs HTML header feature. Fix bug.
1.1.2 K Hoang 30/03/2021 Fix MultiWiFi connection bug.
1.1.3 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid.
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.3.0 Michael H 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
*****************************************************************************************************************************/
#include "defines.h"
#include "Credentials.h"
Expand Down
19 changes: 18 additions & 1 deletion examples/SAM_DUE_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,30 @@

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

#define SCAN_WIFI_NETWORKS true

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

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

#if (USE_WIFI_CUSTOM && USE_ESP_AT_SHIELD)
// ESP-AT can use longer than 2K HTML and DYNAMIC_PARAMETERS
// ESP-AT can't use longer than 2K HTML and DYNAMIC_PARAMETERS
#undef USE_DYNAMIC_PARAMETERS
#define USE_DYNAMIC_PARAMETERS false
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

// From 2-6 to keep HTML short for ESP8266-AT. Limited 6 in WiFiEspAT library anyway
#define MAX_SSID_IN_LIST 6

#else

// From 2-15
#define MAX_SSID_IN_LIST 8
#endif

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

#include <WiFiManager_Generic_Lite_DUE.h>

#define HOST_NAME "DUE-Master-Controller"
Expand Down
5 changes: 3 additions & 2 deletions examples/SAM_DUE_WiFi_MQTT/SAM_DUE_WiFi_MQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Generic_Lite
Licensed under MIT license
Version: 1.2.0
Version: 1.3.0

Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -19,7 +19,8 @@
Add customs HTML header feature. Fix bug.
1.1.2 K Hoang 30/03/2021 Fix MultiWiFi connection bug.
1.1.3 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid.
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.3.0 Michael H 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
*****************************************************************************************************************************/
/****************************************************************************************************************************
You have to modify file ./libraries/Adafruit_MQTT_Library/Adafruit_MQTT.cpp as follows to avoid dtostrf error
Expand Down
21 changes: 19 additions & 2 deletions examples/SAM_DUE_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,30 @@

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

#define SCAN_WIFI_NETWORKS true

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

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

#if (USE_WIFI_CUSTOM && USE_ESP_AT_SHIELD)
// ESP-AT can use longer than 2K HTML and DYNAMIC_PARAMETERS
// ESP-AT can't use longer than 2K HTML and DYNAMIC_PARAMETERS
#undef USE_DYNAMIC_PARAMETERS
#define USE_DYNAMIC_PARAMETERS false
#error Can't use with ESP_AT_SHIELD
#warning Disable USE_DYNAMIC_PARAMETERS for ESP_AT_SHIELD

// From 2-6 to keep HTML short for ESP8266-AT. Limited 6 in WiFiEspAT library anyway
#define MAX_SSID_IN_LIST 6

#else

// From 2-15
#define MAX_SSID_IN_LIST 8
#endif

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

#include <WiFiManager_Generic_Lite_DUE.h>

#define HOST_NAME "DUE-MQTT-Controller"
Expand Down
5 changes: 3 additions & 2 deletions examples/STM32_WiFi/STM32_WiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Generic_Lite
Licensed under MIT license
Version: 1.2.0
Version: 1.3.0

Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -19,7 +19,8 @@
Add customs HTML header feature. Fix bug.
1.1.2 K Hoang 30/03/2021 Fix MultiWiFi connection bug.
1.1.3 K Hoang 12/04/2021 Fix invalid "blank" Config Data treated as Valid.
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.2.0 K Hoang 14/04/2021 Optional one set of WiFi Credentials. Enforce WiFi PWD minimum 8 chars
1.3.0 Michael H 24/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
*****************************************************************************************************************************/
#include "defines.h"
#include "Credentials.h"
Expand Down
Loading

0 comments on commit 8498c80

Please sign in to comment.