From 572cff450a31e602703f4eeae0b3f3b7a1949dba Mon Sep 17 00:00:00 2001
From: Khoi Hoang <57012152+khoih-prog@users.noreply.github.com>
Date: Wed, 27 Apr 2022 20:33:36 -0400
Subject: [PATCH] v1.6.0 to use WiFiMulti_Generic library
### Release v1.6.0
1. Use [WiFiMulti_Generic](https://github.com/khoih-prog/WiFiMulti_Generic) library to connect to the best of **multi-WiFi APs**, with **auto-checking / auto-reconnecting** features when WiFi connection is lost
2. Rewrite for new mbed_portenta core v3.0.1+
3. Update `Packages' Patches`
---
CONTRIBUTING.md | 7 +-
README.md | 119 +++++---
changelog.md | 13 +
.../Portenta_H7_WiFi/Portenta_H7_WiFi.ino | 5 +-
examples/Portenta_H7_WiFi/defines.h | 8 +-
.../Portenta_H7_WiFi_MQTT.ino | 3 +-
examples/Portenta_H7_WiFi_MQTT/defines.h | 2 +
keywords.txt | 1 -
library.json | 12 +-
library.properties | 6 +-
platformio/platformio.ini | 12 +-
src/FlashIAPLimits.h | 5 +-
src/WiFiManager_Portenta_H7_Lite.h | 257 +++++++-----------
src/WiFiManager_Portenta_H7_Lite_Debug.h | 5 +-
14 files changed, 235 insertions(+), 220 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a12cadf..b1bd6eb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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.19) or Platform.io version
-* `ArduinoCore-mbed` Core Version (e.g. `ArduinoCore-mbed` mbed_portenta core v2.6.1)
+* `ArduinoCore-mbed` Core Version (e.g. `ArduinoCore-mbed` mbed_portenta core v3.0.1)
* `Portenta_H7` Board type (e.g. Portenta_H7 Rev2 ABX00042, etc.)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
@@ -28,10 +28,10 @@ Please ensure to specify the following:
```
Arduino IDE version: 1.8.19
-`ArduinoCore-mbed` mbed_portenta core v2.6.1
+`ArduinoCore-mbed` mbed_portenta core v3.0.1
Portenta_H7 Rev2 ABX00042
OS: Ubuntu 20.04 LTS
-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
+Linux xy-Inspiron-3593 5.13.0-40-generic #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered a crash while using TimerInterrupt.
@@ -53,3 +53,4 @@ There are usually some outstanding feature requests in the [existing issues list
### Sending Pull Requests
Pull Requests with changes and fixes are also welcome!
+
diff --git a/README.md b/README.md
index 93a3dd5..04a7b83 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,8 @@
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/WiFiManager_Portenta_H7_Lite.svg)](http://github.com/khoih-prog/WiFiManager_Portenta_H7_Lite/issues)
-
+
+
---
@@ -20,6 +21,7 @@
* [WiFi.begin() bug](#wifibegin-bug)
* [Why do we need this WiFiManager_Portenta_H7_Lite library](#why-do-we-need-this-WiFiManager_Portenta_H7_Lite-library)
* [Features](#features)
+ * [WiFiMulti_Generic library usage](#WiFiMulti_Generic-library-usage)
* [Currently supported Boards](#currently-supported-boards)
* [Currently supported WiFi shields/modules](#currently-supported-wifi-shieldsmodules)
* [Changelog](changelog.md)
@@ -175,6 +177,14 @@ New recent features:
- Use new Portenta_H7 LittleFS features
- **Scan WiFi networks** for selection in Configuration Portal
+---
+
+#### WiFiMulti_Generic library usage
+
+The usage the new [WiFiMulti_Generic](https://github.com/khoih-prog/WiFiMulti_Generic) library to help connect to the best of **multi-WiFi APs**, with **auto-checking / auto-reconnecting** features when WiFi connection is lost.
+
+
+
---
#### Currently supported Boards
@@ -196,13 +206,14 @@ This [**WiFiManager_Portenta_H7_Lite** library](https://github.com/khoih-prog/Wi
## Prerequisites
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
-2. [`ArduinoCore-mbed mbed_portenta core 2.6.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino **Portenta_H7** boards, such as **Portenta_H7 Rev2 ABX00042, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
+2. [`ArduinoCore-mbed mbed_portenta core 3.0.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino **Portenta_H7** boards, such as **Portenta_H7 Rev2 ABX00042, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
3. [`Functional-Vlpp library v1.0.2+`](https://github.com/khoih-prog/functional-vlpp) to use server's lambda function. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Functional-Vlpp.svg?)](https://www.ardu-badge.com/Functional-Vlpp)
-4. [`WiFiWebServer library v1.5.5-1+`](https://github.com/khoih-prog/WiFiWebServer). To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiWebServer.svg?)](https://www.ardu-badge.com/WiFiWebServer)
+4. [`WiFiWebServer library v1.8.0+`](https://github.com/khoih-prog/WiFiWebServer). To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiWebServer.svg?)](https://www.ardu-badge.com/WiFiWebServer)
5. [`LittleFS_Portenta_H7 v1.1.0+`](https://github.com/khoih-prog/LittleFS_Portenta_H7). To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_Portenta_H7.svg?)](https://www.ardu-badge.com/LittleFS_Portenta_H7)
-6. [`DoubleResetDetector_Generic v1.8.0+`](https://github.com/khoih-prog/DoubleResetDetector_Generic). To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/DoubleResetDetector_Generic.svg?)](https://www.ardu-badge.com/DoubleResetDetector_Generic)
+6. [`DoubleResetDetector_Generic v1.8.1+`](https://github.com/khoih-prog/DoubleResetDetector_Generic). To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/DoubleResetDetector_Generic.svg?)](https://www.ardu-badge.com/DoubleResetDetector_Generic)
+7. [`WiFiMulti_Generic library v1.1.1+`](https://github.com/khoih-prog/WiFiMulti_Generic) to use WiFiMulti function. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiMulti_Generic.svg?)](https://www.ardu-badge.com/WiFiMulti_Generic). **New**
---
@@ -225,7 +236,7 @@ You can also use this link [![arduino-library-badge](https://www.ardu-badge.com/
1. Install [VS Code](https://code.visualstudio.com/)
2. Install [PlatformIO](https://platformio.org/platformio-ide)
-3. Install [**WiFiManager_Portenta_H7_Lite** library](https://platformio.org/lib/show/12823/WiFiManager_Portenta_H7_Lite) by using [Library Manager](https://platformio.org/lib/show/12823/WiFiManager_Portenta_H7_Lite/installation). Search for **WiFiManager_Portenta_H7_Lite** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
+3. Install [**WiFiManager_Portenta_H7_Lite** library](https://registry.platformio.org/libraries/khoih-prog/WiFiManager_Portenta_H7_Lite) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/WiFiManager_Portenta_H7_Lite/installation). Search for **WiFiManager_Portenta_H7_Lite** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html)
---
@@ -235,12 +246,12 @@ You can also use this link [![arduino-library-badge](https://www.ardu-badge.com/
#### 1. For Portenta_H7 boards using Arduino IDE in Linux
- **To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.)**, you have to copy the file [portenta_post_install.sh](Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh) into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh).
+ **To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.)**, you have to copy the file [portenta_post_install.sh](Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh) into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh).
Then run the following command using `sudo`
```
-$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/2.6.1
+$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/3.0.1
$ chmod 755 portenta_post_install.sh
$ sudo ./portenta_post_install.sh
```
@@ -253,9 +264,9 @@ This will create the file `/etc/udev/rules.d/49-portenta_h7.rules` as follows:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666"
```
-Supposing the ArduinoCore-mbed core version is 2.6.1. Now only one file must be copied into the directory:
+Supposing the ArduinoCore-mbed core version is 3.0.1. Now only one file must be copied into the directory:
-- `~/.arduino15/packages/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh`
+- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh`
Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz
@@ -541,7 +552,7 @@ Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManage
In `Configuration Portal Mode`, it starts an AP called `WIFI_GENERIC_XXXXXX`. Connect to it using the `configurable password` you can define in the code. For example, `MyWIFI_GENERIC_XXXXXX` (see examples):
-After you connected, please, go to http://192.168.4.1 or newly configured AP IP, you'll see this `Main` page:
+After you connected, please, go to http://192.168.3.1, you'll see this `Main` page:
@@ -1206,33 +1217,41 @@ This is the terminal output when running [**Portenta_H7_WiFi**](examples/Portent
```
Start Portenta_H7_WiFi on PORTENTA_H7_M7 with Portenta_H7 WiFi
-WiFiManager_Portenta_H7_Lite v1.5.0
+WiFiMulti_Generic v1.1.1
+WiFiManager_Portenta_H7_Lite v1.6.0
[WG] Hostname=Portenta-Controller
Flash Size: (KB) = 2048.00
FlashIAP Start Address: = 0x80A0000
LittleFS size (KB) = 1280.00
-LittleFS Mount Fail
-Formatting...
-Loading DRD file failed
-Flag read = 0x1060a5b
+LittleFS Mount OK
+LittleFS Flag read = 0xd0d04321
+Flag read = 0xd0d04321
No doubleResetDetected
Saving DOUBLERESETDETECTOR_FLAG to DRD file : 0xd0d01234
Saving DRD file OK
-SetFlag write = 0xd0d01234
+LittleFS Flag read = 0xd0d04321
+ClearFlag write = 0xd0d04321
+[WG] Double Reset Detected
+[WG] CCSum=0x1467,RCSum=0x1467
+[WG] CrCCsum=0x1981,CrRCsum=0x1981
+[WG] Valid Stored Dynamic Data
+[WG] ======= Start Stored Config Data =======
+[WG] Hdr=PORTENTA-H7-WIFI,SSID=HueNet1,PW=12345678
+[WG] SSID1=HueNet2,PW1=12345678
+[WG] BName=Portenta_H7
+[WG] i=0,id=sv1,data=account.duckdns.org
+[WG] i=1,id=tk1,data=token1
+[WG] i=2,id=sv2,data=account.ddns.net
+[WG] i=3,id=tk2,data=token2
+[WG] i=4,id=prt,data=8080
+[WG] i=5,id=mqt,data=mqtt.duckdns.org
[WG] bg: isForcedConfigPortal = false
-[WG] bg:Stay forever in CP:No ConfigDat
+[WG] bg:Stay forever in CP:DRD/MRD
[WG] clearForcedCP
[WG] SaveCPFile
[WG] OK
-[WG] SaveBkUpCPFile
-[WG] OK
[WG] SSID=WIFI_GENERIC_51F485,PW=MyWIFI_GENERIC_51F485
-[WG] IP=192.168.4.1,CH=4
-Stop doubleResetDetecting
-Saving to DRD file : 0xd0d04321
-Saving DRD file OK
-LittleFS Flag read = 0xd0d04321
-ClearFlag write = 0xd0d04321
+[WG] IP=192.168.3.1,CH=5
F
Your stored Credentials :
Blynk Server1 = account.duckdns.org
@@ -1241,8 +1260,8 @@ Blynk Server2 = account.ddns.net
Token2 = token2
Port = 8080
MQTT Server = mqtt.duckdns.org
-FFFFFFFFF FFFFF
-[WG] h:UpdLittleFS
+FFFFF[WG]
+h:UpdLittleFS
[WG] h:Rst
```
@@ -1251,7 +1270,8 @@ FFFFFFFFF FFFFF
```
Start Portenta_H7_WiFi on PORTENTA_H7_M7 with Portenta_H7 WiFi
-WiFiManager_Portenta_H7_Lite v1.5.0
+WiFiMulti_Generic v1.1.1
+WiFiManager_Portenta_H7_Lite v1.6.0
[WG] Hostname=Portenta-Controller
Flash Size: (KB) = 2048.00
FlashIAP Start Address: = 0x80A0000
@@ -1263,24 +1283,22 @@ No doubleResetDetected
Saving DOUBLERESETDETECTOR_FLAG to DRD file : 0xd0d01234
Saving DRD file OK
SetFlag write = 0xd0d01234
-[WG] CCSum=0x1435,RCSum=0x1435
-[WG] CrCCsum=0x163b,CrRCsum=0x163b
+[WG] CCSum=0x1467,RCSum=0x1467
+[WG] CrCCsum=0x1981,CrRCsum=0x1981
[WG] Valid Stored Dynamic Data
[WG] ======= Start Stored Config Data =======
[WG] Hdr=PORTENTA-H7-WIFI,SSID=HueNet1,PW=12345678
-[WG] SSID1=HueNet,PW1=12345678
+[WG] SSID1=HueNet2,PW1=12345678
[WG] BName=Portenta_H7
-[WG] i=0,id=sv1,data=new.duckdns.org
+[WG] i=0,id=sv1,data=account.duckdns.org
[WG] i=1,id=tk1,data=token1
-[WG] i=2,id=sv2,data=new.ddns.net
+[WG] i=2,id=sv2,data=account.ddns.net
[WG] i=3,id=tk2,data=token2
[WG] i=4,id=prt,data=8080
[WG] i=5,id=mqt,data=mqtt.duckdns.org
-[WG] con2WF:SSID=HueNet1,PW=12345678
-[WG] con2WF:OK
-[WG] IP=192.168.2.130
-[WG] SSID=HueNet1,RSSI=-32
-[WG] IP=192.168.2.130
+[WG] WiFi connected after time: 1
+[WG] SSID:HueNet1,RSSI=-45
+[WG] IP address:192.168.2.105
[WG] b:WOK
Stop doubleResetDetecting
Saving to DRD file : 0xd0d04321
@@ -1288,15 +1306,21 @@ Saving DRD file OK
LittleFS Flag read = 0xd0d04321
ClearFlag write = 0xd0d04321
H
+
Your stored Credentials :
-Blynk Server1 = new.duckdns.org
+Blynk Server1 = account.duckdns.org
Token1 = token1
-Blynk Server2 = new.ddns.net
+Blynk Server2 = account.ddns.net
Token2 = token2
Port = 8080
MQTT Server = mqtt.duckdns.org
-HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH
-HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH
+H[WG] r:Check&WLost <====== WiFi Lost, and auto-reconnected
+[WG] r:WLost.ReconW
+[WG] WiFi connected after time: 1
+[WG] SSID:HueNet2,RSSI=-55
+[WG] IP address:192.168.2.105
+[WG] r:WOK
+H
```
@@ -1315,7 +1339,8 @@ This is the terminal output when running [**Portenta_H7_WiFi_MQTT**](examples/Po
```
Start Portenta_H7_WiFi_MQTT on PORTENTA_H7_M7 with Portenta_H7 WiFi
-WiFiManager_Portenta_H7_Lite v1.5.0
+WiFiMulti_Generic v1.1.1
+WiFiManager_Portenta_H7_Lite v1.6.0
[WG] Hostname=Portenta-MQTT
Flash Size: (KB) = 2048.00
FlashIAP Start Address: = 0x80A0000
@@ -1334,7 +1359,7 @@ SetFlag write = 0xd0d01234
[WG] SaveCPFile
[WG] OK
[WG] SSID=WIFI_GENERIC_51F485,PW=MyWIFI_GENERIC_51F485
-[WG] IP=192.168.4.1,CH=9
+[WG] IP=192.168.3.1,CH=9
Stop doubleResetDetecting
Saving to DRD file : 0xd0d04321
Saving DRD file OK
@@ -1359,7 +1384,8 @@ NNNN NNNNN NNNNN NNNNN NNNNN NNNNN NNNNN NN
```
Start Portenta_H7_WiFi_MQTT on PORTENTA_H7_M7 with Portenta_H7 WiFi
-WiFiManager_Portenta_H7_Lite v1.5.0
+WiFiMulti_Generic v1.1.1
+WiFiManager_Portenta_H7_Lite v1.6.0
[WG] Hostname=Portenta-MQTT
Flash Size: (KB) = 2048.00
FlashIAP Start Address: = 0x80A0000
@@ -1489,6 +1515,9 @@ Submit issues to: [WiFiManager_Portenta_H7_Lite issues](https://github.com/khoih
22. Add `LibraryPatches` for [**Adafruit_MQTT_Library**](https://github.com/adafruit/Adafruit_MQTT_Library) to fix compiler error for Portenta_H7, RP2040-based and many other boards.
23. Fix the blocking issue in loop() with configurable `WIFI_RECON_INTERVAL`
24. Workaround for core WiFi.status() bug, which does not detect WiFi lost.
+25. Use [WiFiMulti_Generic](https://github.com/khoih-prog/WiFiMulti_Generic) library to connect to the best of **multi-WiFi APs**, with **auto-checking / auto-reconnecting** features when WiFi connection is lost
+26. Rewrite for new mbed_portenta core v3.0.1+
+
---
---
diff --git a/changelog.md b/changelog.md
index cd2b8c6..7149e8d 100644
--- a/changelog.md
+++ b/changelog.md
@@ -12,6 +12,8 @@
## Table of Contents
* [Changelog](#changelog)
+ * [Release v1.6.0](#release-v160)
+ * [Release v1.5.1](#release-v151)
* [Release v1.5.0](#release-v150)
* [Release v1.4.1](#release-v141)
* [Initial Release v1.4.0](#initial-release-v140)
@@ -21,6 +23,17 @@
## Changelog
+### Release v1.6.0
+
+1. Use [WiFiMulti_Generic](https://github.com/khoih-prog/WiFiMulti_Generic) library to connect to the best of **multi-WiFi APs**, with **auto-checking / auto-reconnecting** features when WiFi connection is lost
+2. Rewrite for new mbed_portenta core v3.0.1+
+3. Update `Packages' Patches`
+
+### Release v1.5.1
+
+1. Optional Board_Name in Menu
+2. Optimize code by using passing by reference
+
### Release v1.5.0
1. Workaround for core WiFi.status() bug, which does not detect WiFi lost.
diff --git a/examples/Portenta_H7_WiFi/Portenta_H7_WiFi.ino b/examples/Portenta_H7_WiFi/Portenta_H7_WiFi.ino
index 4817d70..abed27c 100644
--- a/examples/Portenta_H7_WiFi/Portenta_H7_WiFi.ino
+++ b/examples/Portenta_H7_WiFi/Portenta_H7_WiFi.ino
@@ -64,12 +64,13 @@ void setup()
{
// Debug console
Serial.begin(115200);
- while (!Serial);
+ while (!Serial && millis() < 5000);
- delay(200);
+ delay(1000);
Serial.print(F("\nStart Portenta_H7_WiFi on ")); Serial.print(BOARD_NAME);
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
+ Serial.println(WIFIMULTI_GENERIC_VERSION);
Serial.println(WIFI_MANAGER_PORTENTA_H7_LITE_VERSION);
WiFiManager_Portenta_H7 = new WiFiManager_Portenta_H7_Lite();
diff --git a/examples/Portenta_H7_WiFi/defines.h b/examples/Portenta_H7_WiFi/defines.h
index 29b5be7..b1935cb 100644
--- a/examples/Portenta_H7_WiFi/defines.h
+++ b/examples/Portenta_H7_WiFi/defines.h
@@ -13,6 +13,8 @@
#ifndef defines_h
#define defines_h
+#define USING_MBED_PORTENTA_CORE_2_7_2 false
+
/* Comment this out to disable prints and save space */
#define DEBUG_WIFI_WEBSERVER_PORT Serial
#define WIFI_GENERIC_DEBUG_OUTPUT Serial
@@ -98,11 +100,11 @@
/////////////////////////////////////////////
-#define USE_DYNAMIC_PARAMETERS true
+#define USE_DYNAMIC_PARAMETERS true
/////////////////////////////////////////////
-#define SCAN_WIFI_NETWORKS true
+#define SCAN_WIFI_NETWORKS false //true
// To be able to manually input SSID, not from a scanned SSID lists
#define MANUAL_SSID_INPUT_ALLOWED true
@@ -114,6 +116,8 @@
/////////////////////////////////////////////
+#define USE_WIFI_PORTENTA_H7 true
+
#include
#define HOST_NAME "Portenta-Controller"
diff --git a/examples/Portenta_H7_WiFi_MQTT/Portenta_H7_WiFi_MQTT.ino b/examples/Portenta_H7_WiFi_MQTT/Portenta_H7_WiFi_MQTT.ino
index 71c311f..840d0b0 100644
--- a/examples/Portenta_H7_WiFi_MQTT/Portenta_H7_WiFi_MQTT.ino
+++ b/examples/Portenta_H7_WiFi_MQTT/Portenta_H7_WiFi_MQTT.ino
@@ -297,7 +297,7 @@ void setup()
{
// Debug console
Serial.begin(115200);
- while (!Serial);
+ while (!Serial && millis() < 5000);
pinMode(LED_PIN, OUTPUT);
@@ -305,6 +305,7 @@ void setup()
Serial.print(F("\nStart Portenta_H7_WiFi_MQTT on ")); Serial.print(BOARD_NAME);
Serial.print(F(" with ")); Serial.println(SHIELD_TYPE);
+ Serial.println(WIFIMULTI_GENERIC_VERSION);
Serial.println(WIFI_MANAGER_PORTENTA_H7_LITE_VERSION);
WiFiManager_Portenta_H7 = new WiFiManager_Portenta_H7_Lite();
diff --git a/examples/Portenta_H7_WiFi_MQTT/defines.h b/examples/Portenta_H7_WiFi_MQTT/defines.h
index f0a5c49..cc210dc 100644
--- a/examples/Portenta_H7_WiFi_MQTT/defines.h
+++ b/examples/Portenta_H7_WiFi_MQTT/defines.h
@@ -114,6 +114,8 @@
/////////////////////////////////////////////
+#define USE_WIFI_PORTENTA_H7 true
+
#include
#define HOST_NAME "Portenta-MQTT"
diff --git a/keywords.txt b/keywords.txt
index 02c97e2..e059612 100644
--- a/keywords.txt
+++ b/keywords.txt
@@ -21,7 +21,6 @@ connectWiFi KEYWORD2
begin KEYWORD2
run KEYWORD2
setHostname
-setConfigPortalIP KEYWORD2
setConfigPortalChannel KEYWORD2
setConfigPortal KEYWORD2
setSTAStaticIPConfig KEYWORD2
diff --git a/library.json b/library.json
index 9eee5cc..0143d96 100644
--- a/library.json
+++ b/library.json
@@ -1,6 +1,6 @@
{
"name": "WiFiManager_Portenta_H7_Lite",
- "version": "1.5.0",
+ "version": "1.6.0",
"keywords": "wifi, wi-fi, multi-wifi, config-portal, Double-Reset, dynamic-params, LittleFS, LittleFS-Portenta, Credentials, littlefs-mbed, posix, file-system, mbed, mbed-portenta, portenta-h7, portentah7, portenta-h7-m7, portenta-h7-m4, portentah7-m7, portentah7-m4",
"description": "Library to configure MultiWiFi/Credentials at runtime for Portenta_H7 boards, using built-in WiFi (Murata) 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. 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":
@@ -27,13 +27,19 @@
{
"owner": "khoih-prog",
"name": "WiFiWebServer",
- "version": "^1.5.3",
+ "version": "^1.8.0",
+ "platforms": ["*"]
+ },
+ {
+ "owner": "khoih-prog",
+ "name": "WiFiMulti_Generic",
+ "version": ">=1.1.1",
"platforms": ["*"]
},
{
"owner": "khoih-prog",
"name": "DoubleResetDetector_Generic",
- "version": "^1.7.3",
+ "version": "^1.8.1",
"platforms": ["*"]
},
{
diff --git a/library.properties b/library.properties
index 6b4edf7..b4c8a59 100644
--- a/library.properties
+++ b/library.properties
@@ -1,5 +1,5 @@
name=WiFiManager_Portenta_H7_Lite
-version=1.5.0
+version=1.6.0
author=Khoi Hoang
maintainer=Khoi Hoang
license=MIT
@@ -7,6 +7,6 @@ sentence=Light-Weight MultiWiFi/Credentials Manager for Portenta_H7 boards using
paragraph=Library to configure MultiWiFi/Credentials at runtime for Portenta_H7 boards, using Portenta WiFi (Murata) 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. 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.
category=Communication
url=https://github.com/khoih-prog/WiFiManager_Portenta_H7_Lite
-architectures=mbed,mbed_portenta
-depends=Functional-Vlpp,WiFiWebServer,DoubleResetDetector_Generic,LittleFS_Portenta_H7
+architectures=mbed, mbed_portenta
+depends=Functional-Vlpp, WiFiMulti_Generic, WiFiWebServer, DoubleResetDetector_Generic, LittleFS_Portenta_H7
includes=WiFiManager_Portenta_H7_Lite.h
diff --git a/platformio/platformio.ini b/platformio/platformio.ini
index d823b22..717b077 100644
--- a/platformio/platformio.ini
+++ b/platformio/platformio.ini
@@ -38,16 +38,20 @@ upload_speed = 921600
; Checks for the compatibility with frameworks and dev/platforms
lib_compat_mode = strict
+lib_ldf_mode = chain+
+;lib_ldf_mode = deep+
lib_deps =
; PlatformIO 4.x
-; WiFiWebServer@>=1.5.3
-; DoubleResetDetector_Generic@>=1.7.3
+; WiFiWebServer@>=1.8.0
+; WiFiMulti_Generic@>=1.1.1
+; DoubleResetDetector_Generic@>=1.8.1
; LittleFS_Portenta_H7@>=1.1.0
; Functional-Vlpp@>=1.0.2
; PlatformIO 5.x
- khoih-prog/WiFiWebServer@>=1.5.3
- khoih-prog/DoubleResetDetector_Generic@>=1.7.3
+ khoih-prog/WiFiWebServer@>=1.8.0
+ khoih-prog/WiFiMulti_Generic@>=1.1.1
+ khoih-prog/DoubleResetDetector_Generic@>=1.8.1
khoih-prog/LittleFS_Portenta_H7@>=1.1.0
khoih-prog/Functional-Vlpp@>=1.0.2
diff --git a/src/FlashIAPLimits.h b/src/FlashIAPLimits.h
index 571e3d6..7274ee0 100644
--- a/src/FlashIAPLimits.h
+++ b/src/FlashIAPLimits.h
@@ -9,13 +9,16 @@
Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Portenta_H7_Lite
Licensed under MIT license
- Version: 1.5.0
+
+ Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
1.4.0 K Hoang 11/09/2021 Add support to Portenta_H7 using Arduino mbed_portenta core
1.4.1 K Hoang 12/10/2021 Update `platform.ini` and `library.json`
1.5.0 K Hoang 08/01/2022 Workaround for core WiFi.status() bug. Fix the blocking issue in loop().
+ 1.5.1 K Hoang 21/02/2022 Optional Board_Name in Menu. Optimize code by using passing by reference
+ 1.6.0 K Hoang 27/04/2022 Use WiFiMulti_Generic library for auto-checking / auto-reconnecting MultiWiFi
*****************************************************************************************************************************/
#pragma once
diff --git a/src/WiFiManager_Portenta_H7_Lite.h b/src/WiFiManager_Portenta_H7_Lite.h
index e0a8fd8..459ccc1 100644
--- a/src/WiFiManager_Portenta_H7_Lite.h
+++ b/src/WiFiManager_Portenta_H7_Lite.h
@@ -8,13 +8,16 @@
Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Portenta_H7_Lite
Licensed under MIT license
- Version: 1.5.0
+
+ Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
1.4.0 K Hoang 11/09/2021 Add support to Portenta_H7 using Arduino mbed_portenta core
1.4.1 K Hoang 12/10/2021 Update `platform.ini` and `library.json`
1.5.0 K Hoang 08/01/2022 Workaround for core WiFi.status() bug. Fix the blocking issue in loop().
+ 1.5.1 K Hoang 21/02/2022 Optional Board_Name in Menu. Optimize code by using passing by reference
+ 1.6.0 K Hoang 27/04/2022 Use WiFiMulti_Generic library for auto-checking / auto-reconnecting MultiWiFi
********************************************************************************************************************************/
#ifndef WiFiManager_Portenta_H7_Lite_h
@@ -39,10 +42,21 @@
#error This code is intended to run on the MBED ARDUINO_PORTENTA_H7 platform! Please check your Tools->Board setting.
#endif
-#define WIFI_MANAGER_PORTENTA_H7_LITE_VERSION "WiFiManager_Portenta_H7_Lite v1.5.0"
+#ifndef WIFI_MANAGER_PORTENTA_H7_LITE_VERSION
+ #define WIFI_MANAGER_PORTENTA_H7_LITE_VERSION "WiFiManager_Portenta_H7_Lite v1.6.0"
+
+ #define WIFI_MANAGER_PORTENTA_H7_LITE_VERSION_MAJOR 1
+ #define WIFI_MANAGER_PORTENTA_H7_LITE_VERSION_MINOR 6
+ #define WIFI_MANAGER_PORTENTA_H7_LITE_VERSION_PATCH 0
+
+ #define WIFI_MANAGER_PORTENTA_H7_LITE_VERSION_INT 1006000
+#endif
+#include
#include
+WiFiMulti_Generic wifiMulti;
+
//////////////////////////////////////////
#warning Using LittleFS in WiFiManager_Portenta_H7_Lite.h
@@ -235,7 +249,7 @@ const char WM_HTTP_CORS_ALLOW_ALL[] PROGMEM = "*";
//////////////////////////////////////////////
-String IPAddressToString(IPAddress _address)
+String IPAddressToString(const IPAddress& _address)
{
String str = String(_address[0]);
str += ".";
@@ -355,6 +369,8 @@ class WiFiManager_Portenta_H7_Lite
if (hadConfigData && noConfigPortal && (!isForcedConfigPortal) )
{
hadConfigData = true;
+
+ wifiMulti_addAP();
if (connectMultiWiFi(RETRY_TIMES_CONNECT_WIFI))
{
@@ -570,17 +586,24 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////////
- void setConfigPortalIP(IPAddress portalIP = IPAddress(192, 168, 4, 1))
+ // Very bad that the core now can't permit to change AP IP address via function
+ // Have to change via #define
+ // #define DEFAULT_IP_ADDRESS "192.168.3.1"
+ // This function is obsolete from core v2.7.2
+
+#if 0
+ void setConfigPortalIP(const IPAddress& portalIP = IPAddress(192, 168, 3, 1))
{
portal_apIP = portalIP;
}
+#endif
//////////////////////////////////////////////
#define MIN_WIFI_CHANNEL 1
#define MAX_WIFI_CHANNEL 11 // Channel 13 is flaky, because of bad number 13 ;-)
- int setConfigPortalChannel(int channel = 1)
+ int setConfigPortalChannel(const int& channel = 1)
{
// If channel < MIN_WIFI_CHANNEL - 1 or channel > MAX_WIFI_CHANNEL => channel = 1
// If channel == 0 => will use random channel from MIN_WIFI_CHANNEL to MAX_WIFI_CHANNEL
@@ -595,7 +618,7 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////////
- void setConfigPortal(String ssid = "", String pass = "")
+ void setConfigPortal(const String& ssid = "", const String& pass = "")
{
portal_ssid = ssid;
portal_pass = pass;
@@ -603,14 +626,14 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////////
- void setSTAStaticIPConfig(IPAddress ip)
+ void setSTAStaticIPConfig(const IPAddress& ip)
{
static_IP = ip;
}
//////////////////////////////////////////////
- String getWiFiSSID(uint8_t index)
+ String getWiFiSSID(const uint8_t& index)
{
if (index >= NUM_WIFI_CREDENTIALS)
return String("");
@@ -623,7 +646,7 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////////
- String getWiFiPW(uint8_t index)
+ String getWiFiPW(const uint8_t& index)
{
if (index >= NUM_WIFI_CREDENTIALS)
return String("");
@@ -690,6 +713,13 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////////
+ bool isConfigMode()
+ {
+ return configuration_mode;
+ }
+
+ //////////////////////////////////////////////
+
// Forced CP => Flag = 0xBEEFBEEF. Else => No forced CP
// Flag to be stored at (EEPROM_START + DRD_FLAG_DATA_SIZE + CONFIG_DATA_SIZE)
// to avoid corruption to current data
@@ -817,7 +847,8 @@ class WiFiManager_Portenta_H7_Lite
String macAddress = "";
bool wifi_connected = false;
- IPAddress portal_apIP = IPAddress(192, 168, 4, 1);
+ //IPAddress portal_apIP = IPAddress(192, 168, 3, 1);
+
int AP_channel = 10;
String portal_ssid = "";
@@ -876,7 +907,7 @@ class WiFiManager_Portenta_H7_Lite
return RFC952_hostname;
}
- void displayConfigData(WIFI_GENERIC_Configuration configData)
+ void displayConfigData(const WIFI_GENERIC_Configuration& configData)
{
WG_LOGERROR5(F("Hdr="), configData.header, F(",SSID="), configData.WiFi_Creds[0].wifi_ssid,
F(",PW="), configData.WiFi_Creds[0].wifi_pw);
@@ -896,7 +927,18 @@ class WiFiManager_Portenta_H7_Lite
WG_LOGERROR3(F("SSID="), WiFi.SSID(), F(",RSSI="), WiFi.RSSI());
WG_LOGERROR1(F("IP="), localIP() );
}
+//////////////////////////////////////////////
+ void wifiMulti_addAP()
+ {
+ for (uint8_t index = 0; index < NUM_WIFI_CREDENTIALS; index++)
+ {
+ wifiMulti.addAP(WIFI_GENERIC_config.WiFi_Creds[index].wifi_ssid, WIFI_GENERIC_config.WiFi_Creds[index].wifi_pw);
+ }
+ }
+
+ //////////////////////////////////////////////
+
#define WIFI_GENERIC_BOARD_TYPE "PORTENTA-H7-WIFI"
#define WM_NO_CONFIG "blank"
@@ -920,7 +962,7 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////////
- void saveForcedCP(uint32_t value)
+ void saveForcedCP(const uint32_t& value)
{
// Mbed PORTENTA_H7 code
FILE *file = fopen(CONFIG_PORTAL_FILENAME, "w");
@@ -944,7 +986,7 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////////
- void setForcedCP(bool isPersistent)
+ void setForcedCP(const bool& isPersistent)
{
uint32_t readForcedConfigPortalFlag = isPersistent? FORCED_PERS_CONFIG_PORTAL_FLAG_DATA : FORCED_CONFIG_PORTAL_FLAG_DATA;
@@ -1326,6 +1368,8 @@ class WiFiManager_Portenta_H7_Lite
#if USE_DYNAMIC_PARAMETERS
saveDynamicData();
#endif
+
+ wifiMulti_addAP();
}
//////////////////////////////////////////////
@@ -1485,145 +1529,52 @@ class WiFiManager_Portenta_H7_Lite
}
//////////////////////////////////////////////
-
-// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
-// Default 1 and minimum 1.
-#if !defined(MAX_NUM_WIFI_RECON_TRIES_PER_LOOP)
- #define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 1
-#else
- #if (MAX_NUM_WIFI_RECON_TRIES_PER_LOOP < 1)
- #define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 1
- #endif
-#endif
-
- // New connection logic from v1.2.0
+
bool connectMultiWiFi(int retry_time)
{
- int sleep_time = 250;
- int index = 0;
- int new_index = 0;
- //uint8_t status = WL_IDLE_STATUS;
-
- static int lastConnectedIndex = 255;
-
- WG_LOGDEBUG(F("ConMultiWifi"));
-
- if (static_IP != IPAddress(0, 0, 0, 0))
- {
- WG_LOGDEBUG(F("UseStatIP"));
- WiFi.config(static_IP);
- }
-
- if (lastConnectedIndex != 255)
- {
- // Successive connection, index = ??
- // Checking if new_index is OK
- new_index = (lastConnectedIndex + 1) % NUM_WIFI_CREDENTIALS;
-
- if ( strlen(WIFI_GENERIC_config.WiFi_Creds[new_index].wifi_pw) >= PASSWORD_MIN_LEN )
- {
- index = new_index;
- WG_LOGDEBUG3(F("Using index="), index, F(", lastConnectedIndex="), lastConnectedIndex);
- }
- else
- {
- WG_LOGERROR3(F("Ignore invalid WiFi PW : index="), new_index, F(", PW="), WIFI_GENERIC_config.WiFi_Creds[new_index].wifi_pw);
-
- // Using the previous valid index
- index = lastConnectedIndex;
- }
- }
- else
- {
- // First connection ever, index = 0
- if ( strlen(WIFI_GENERIC_config.WiFi_Creds[0].wifi_pw) >= PASSWORD_MIN_LEN )
- {
- WG_LOGDEBUG(F("First connection, Using index=0"));
- }
- else
- {
- WG_LOGERROR3(F("Ignore invalid WiFi PW : index=0, SSID="), WIFI_GENERIC_config.WiFi_Creds[0].wifi_ssid,
- F(", PWD="), WIFI_GENERIC_config.WiFi_Creds[0].wifi_pw);
-
- // Using the next valid index
- index = 1;
- }
- }
-
- WG_LOGERROR3(F("con2WF:SSID="), WIFI_GENERIC_config.WiFi_Creds[index].wifi_ssid,
- F(",PW="), WIFI_GENERIC_config.WiFi_Creds[index].wifi_pw);
-
- uint8_t numIndexTried = 0;
-
- uint8_t numWiFiReconTries = 0;
-
- while ( !wifi_connected && (numIndexTried++ < NUM_WIFI_CREDENTIALS) && (numWiFiReconTries++ < MAX_NUM_WIFI_RECON_TRIES_PER_LOOP) )
- {
- while ( 0 < retry_time )
- {
- WG_LOGDEBUG1(F("Remaining retry_time="), retry_time);
-
- WiFi.begin(WIFI_GENERIC_config.WiFi_Creds[index].wifi_ssid, WIFI_GENERIC_config.WiFi_Creds[index].wifi_pw);
-
- //delay(3000);
-
- // Need restart WiFi at beginning of each cycle
- if ( WiFiConnected() )
- {
- wifi_connected = true;
- lastConnectedIndex = index;
- WG_LOGDEBUG1(F("WOK, lastConnectedIndex="), lastConnectedIndex);
-
- break;
- }
- else
- {
- delay(sleep_time);
- retry_time--;
- }
- }
-
- if ( WiFiConnected() )
- {
- break;
- }
- else
- {
- if (retry_time <= 0)
- {
- WG_LOGERROR3(F("Failed using index="), index, F(", retry_time="), retry_time);
- retry_time = RETRY_TIMES_CONNECT_WIFI;
- }
-
- new_index = (index + 1) % NUM_WIFI_CREDENTIALS;
-
- // only use new index if valid (len >= PASSWORD_MIN_LEN = 8)
- if ( strlen(WIFI_GENERIC_config.WiFi_Creds[new_index].wifi_pw) >= PASSWORD_MIN_LEN )
- {
- index = new_index;
- }
-
- // Must have for Portenta_H7 to reconnect after WiFi lost
- WiFi.end();
- }
- }
+ // For general board, this better be 1000 to enable connect the 1st time
+ #define WIFI_MULTI_1ST_CONNECT_WAITING_MS 1000L
- if (wifi_connected)
- {
- WG_LOGERROR(F("con2WF:OK"));
-
- WG_LOGERROR1(F("IP="), WiFi.localIP() );
-
- displayWiFiData();
- }
- else
- {
- WG_LOGERROR(F("con2WF:failed"));
- // Can't connect, so try another index next time. Faking this index is OK and lost
- lastConnectedIndex = index;
- }
+ #define WIFI_MULTI_CONNECT_WAITING_MS 500L
+
+ WG_LOGDEBUG("No WiFi. Trying to scan and reconnect");
- return wifi_connected;
+ WiFi.disconnect();
+
+ int i = 0;
+
+ uint8_t status = wifiMulti.run();
+
+ delay(WIFI_MULTI_1ST_CONNECT_WAITING_MS);
+
+ while ( ( i++ < (retry_time * 5) ) && ( status != WL_CONNECTED ) )
+ {
+ status = WiFi.status();
+
+ if ( status == WL_CONNECTED )
+ break;
+ else
+ delay(WIFI_MULTI_CONNECT_WAITING_MS);
+ }
+
+ if ( status == WL_CONNECTED )
+ {
+ WG_LOGERROR1(F("WiFi connected after time: "), i);
+ WG_LOGERROR3(F("SSID:"), WiFi.SSID(), F(",RSSI="), WiFi.RSSI());
+ WG_LOGERROR1(F("IP address:"), WiFi.localIP() );
+ }
+ else
+ {
+ WG_LOGERROR(F("WiFi not connected"));
+
+ if (wifiMulti.run() != WL_CONNECTED)
+ {
+ Serial.println("WiFi not connected!");
+ delay(1000);
+ }
+ }
+
+ return (status == WL_CONNECTED);
}
//////////////////////////////////////////////
@@ -1975,9 +1926,7 @@ class WiFiManager_Portenta_H7_Lite
WiFiNetworksFound = scanWifiNetworks(&indices);
#endif
-
- WiFi.config(portal_apIP);
-
+
if ( (portal_ssid == "") || portal_pass == "" )
{
String randomNum = String(random(0xFFFFFF), HEX);
@@ -1998,7 +1947,7 @@ class WiFiManager_Portenta_H7_Lite
channel = AP_channel;
WG_LOGERROR3(F("SSID="), portal_ssid, F(",PW="), portal_pass);
- WG_LOGERROR3(F("IP="), portal_apIP, F(",CH="), channel);
+ WG_LOGERROR3(F("IP="), DEFAULT_IP_ADDRESS, F(",CH="), channel);
#if USE_ESP_AT_SHIELD
// start access point, AP only,default channel 10
@@ -2061,7 +2010,7 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////
- void setMinimumSignalQuality(int quality)
+ void setMinimumSignalQuality(const int& quality)
{
_minimumQuality = quality;
}
@@ -2189,7 +2138,7 @@ class WiFiManager_Portenta_H7_Lite
//////////////////////////////////////////
- int getRSSIasQuality(int RSSI)
+ int getRSSIasQuality(const int& RSSI)
{
int quality = 0;
diff --git a/src/WiFiManager_Portenta_H7_Lite_Debug.h b/src/WiFiManager_Portenta_H7_Lite_Debug.h
index 358bd6a..b4d9999 100644
--- a/src/WiFiManager_Portenta_H7_Lite_Debug.h
+++ b/src/WiFiManager_Portenta_H7_Lite_Debug.h
@@ -9,13 +9,16 @@
Built by Khoi Hoang https://github.com/khoih-prog/WiFiManager_Portenta_H7_Lite
Licensed under MIT license
- Version: 1.5.0
+
+ Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
1.4.0 K Hoang 11/09/2021 Add support to Portenta_H7 using Arduino mbed_portenta core
1.4.1 K Hoang 12/10/2021 Update `platform.ini` and `library.json`
1.5.0 K Hoang 08/01/2022 Workaround for core WiFi.status() bug. Fix the blocking issue in loop().
+ 1.5.1 K Hoang 21/02/2022 Optional Board_Name in Menu. Optimize code by using passing by reference
+ 1.6.0 K Hoang 27/04/2022 Use WiFiMulti_Generic library for auto-checking / auto-reconnecting MultiWiFi
********************************************************************************************************************************/
#ifndef WiFiManager_Portenta_H7_Lite_Debug_h