The LittleFS of the new Portenta_H7 board currently tested OK with only maximum 8 files. The files, from 9 and up, somehow strangely can't be written and / or read. This is possibly a bug in the ArduinoCore-mbed mbed_portenta core
. The same behaviour is observed from core v2.0.0 up to v2.5.2.
If LittleFS size is reduced to 1024KB, test is OK with only maximum 4 files.
Beware and keep checking for updates.
The current mbed_portenta core v2.6.1
has bug that once WiFi is connected, WiFi.status()
always reports WL_CONNECTED
even if WiFi is lost.
The current workaround for this WiFi.status()
bug is to use it with WiFi.RSSI()
, such as
bool WiFiConnected()
{
return ( (WiFi.status() == WL_CONNECTED) && (WiFi.RSSI() != 0) );
}
This not-100%-perfect workaround is working only whenever the WiFi is totally powered down (RSSI == 0), but still better than nothing.
Check
The current mbed_portenta core v2.6.1
has bug that once WiFi is connected and lost, WiFi.begin()
can't never reconnect even if WiFi is restored.
The current fix for this bug is to use WiFi.end()
before WiFi.begin()
, such as
// Must have to reconnect after WiFi lost
WiFi.end();
// Now WiFi.begin() can reconnect to WiFi after lost and restored
status = WiFi.begin(ssid, pass);
Check:
If you have used the full-fledge WiFiManager such as :
and have to write complicated callback functions to save custom parameters in SPIFFS/LittleFS/EEPROM, you'd appreciate the simplicity of this Light-Weight Credentials / WiFiManager.
This library is a Light Weight Credentials / WiFi Manager for Portenta_H7 built-in WiFi (Murata) modules/shields, specially designed to support Portenta_H7 running on M7 core.
This is a Credentials / WiFi Connection Manager, permitting the addition of custom parameters to be configured in Config Portal. The parameters then will be saved automatically, without the complicated callback functions to handle data saving / retrieving.
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. Credentials are saved in LittleFS, shared with DoubleResetDetector_Generic library.
The web configuration portal, served from the Generic WiFi modules/shields
is operating as an access point (AP) with configurable static IP address or use default IP Address of 192.168.4.1
New recent features:
The usage the new WiFiMulti_Generic library to help connect to the best of multi-WiFi APs, with auto-checking / auto-reconnecting features when WiFi connection is lost.
This WiFiManager_Portenta_H7_Lite library currently supports these following boards:
ArduinoCore-mbed mbed_portenta core
Arduino IDE 1.8.19+
for Arduino. ArduinoCore-mbed mbed_portenta core 3.4.1+
for Arduino Portenta_H7 boards, such as Portenta_H7 Rev2 ABX00042, etc.. Functional-Vlpp library v1.0.2+
to use server's lambda function. To install. check WiFiWebServer library v1.10.0+
. To install. check LittleFS_Portenta_H7 v1.2.0+
. To install, check DoubleResetDetector_Generic v1.8.1+
. To install, check WiFiMulti_Generic library v1.2.2+
to use WiFiMulti function. To install, check . NewThe best and easiest way is to use Arduino Library Manager
. Search for WiFiManager_Portenta_H7_Lite, then select / install the latest version.
You can also use this link for more detailed instructions.
WiFiManager_Portenta_H7_Lite-main.zip
.WiFiManager_Portenta_H7_Lite-main
directory WiFiManager_Portenta_H7_Lite-main
folder to Arduino libraries' directory such as ~/Arduino/libraries/
.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 into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1/portenta_post_install.sh).
Then run the following command using sudo
$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1
$ chmod 755 portenta_post_install.sh
$ sudo ./portenta_post_install.sh
This will create the file /etc/udev/rules.d/49-portenta_h7.rules
as follows:
# Portenta H7 bootloader mode UDEV rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666"
Supposing the ArduinoCore-mbed core version is 3.4.1. Now only one file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.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
This file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/mbed_portenta/x.yy.zz/portenta_post_install.sh
WiFi module/shield
will start a WiFi configuration portal when powered up, but has no valid stored Credentials or can't connect to WiFi APs after a pre-determined time.Generic WiFi module/shield
will try to connect. If successful, the dynamic DHCP and/or configured static IP address will be displayed in the configuration portal. Generic WiFi module/shield
WiFi Config Portal network and Web Server will shutdown to return control to the sketch code.#include <WiFiManager_Portenta_H7_Lite.h>
WiFiManager_Portenta_H7_Lite* WiFiManager_Portenta_H7;
#include "defines.h"
// USE_DYNAMIC_PARAMETERS defined in defines.h
/////////////// Start dynamic Credentials ///////////////
//Defined in <WiFiManager_Portenta_H7_Lite.h>
/**************************************
#define MAX_ID_LEN 5
#define MAX_DISPLAY_NAME_LEN 16
typedef struct
{
char id [MAX_ID_LEN + 1];
char displayName [MAX_DISPLAY_NAME_LEN + 1];
char *pdata;
uint8_t maxlen;
} MenuItem;
**************************************/
#if USE_DYNAMIC_PARAMETERS
#define MAX_BLYNK_SERVER_LEN 34
#define MAX_BLYNK_TOKEN_LEN 34
char Blynk_Server1 [MAX_BLYNK_SERVER_LEN + 1] = "account.duckdns.org";
char Blynk_Token1 [MAX_BLYNK_TOKEN_LEN + 1] = "token1";
char Blynk_Server2 [MAX_BLYNK_SERVER_LEN + 1] = "account.ddns.net";
char Blynk_Token2 [MAX_BLYNK_TOKEN_LEN + 1] = "token2";
#define MAX_BLYNK_PORT_LEN 6
char Blynk_Port [MAX_BLYNK_PORT_LEN + 1] = "8080";
#define MAX_MQTT_SERVER_LEN 34
char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "mqtt.duckdns.org";
MenuItem myMenuItems [] =
{
{ "sv1", "Blynk Server1", Blynk_Server1, MAX_BLYNK_SERVER_LEN },
{ "tk1", "Token1", Blynk_Token1, MAX_BLYNK_TOKEN_LEN },
{ "sv2", "Blynk Server2", Blynk_Server2, MAX_BLYNK_SERVER_LEN },
{ "tk2", "Token2", Blynk_Token2, MAX_BLYNK_TOKEN_LEN },
{ "prt", "Port", Blynk_Port, MAX_BLYNK_PORT_LEN },
{ "mqt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN },
};
uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize;
#else
MenuItem myMenuItems [] = {};
uint16_t NUM_MENU_ITEMS = 0;
#endif //USE_DYNAMIC_PARAMETERS
#define USE_DYNAMIC_PARAMETERS false
WiFiManager_Portenta_H7 = new WiFiManager_Portenta_H7_Lite();
WiFiManager_Portenta_H7->begin();
WiFiManager_Portenta_H7->setConfigPortalChannel(newChannel);
WiFiManager_Portenta_H7->setConfigPortalChannel(0);
192.168.4.1
), callWiFiManager_Portenta_H7->setConfigPortalIP(IPAddress(xxx,xxx,xxx,xxx));
// Set customized DHCP HostName
WiFiManager_Portenta_H7->begin("SAMD_ABCDEF");
or just use the default Hostname, for example "SAMD_XXXXXX" for SAMD
//Or use default Hostname "WIFI_GENERIC_XXXXXX"
//WiFiManager_Portenta_H7->begin();
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>";
...
WiFiManager_Portenta_H7->setCustomsStyle(NewCustomsStyle);
WiFiManager_Portenta_H7->setCustomsHeadElement("<style>html{filter: invert(10%);}</style>");
WiFiManager_Portenta_H7->setCORSHeader("Your Access-Control-Allow-Origin");
While in AP mode, connect to it using its SSID
(WIFI_GENERIC_XXXXXX) / Password
("MyWIFI_GENERIC_XXXXXX"), then open a browser to the Portal AP IP, default 192.168.4.1
, configure wifi then click Save. The Credentials / WiFi connection information will be saved in non-volatile memory. It will then autoconnect.
Once Credentials / WiFi network information is saved in the host non-volatile memory, it will try to autoconnect to WiFi every time it is started, without requiring any function calls in the sketch.
// 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 true
But it's always advisable to use and input both sets for reliability.
// 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 SCAN_WIFI_NETWORKS true
The manual input of SSIDs is default enabled, so that users can input arbitrary SSID, not only from the scanned list. This is for the sample use-cases in which users can input the known SSIDs of another place, then send the boards to that place. The boards can connect to WiFi without users entering Config Portal to re-configure.
// To disable manually input SSID, only from a scanned SSID lists
#define MANUAL_SSID_INPUT_ALLOWED false
This is for normal use-cases in which users can only select an SSID from a scanned list of SSIDs to avoid typo mistakes and/or security.
The maximum number of SSIDs in the list is selectable from 2 to 15 (for ESP8266/ESP32-AT shields, from 2-6). If invalid number of SSIDs is selected, the default number of 10 will be used.
// From 2-15
#define MAX_SSID_IN_LIST 8
To define max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
Default is 1 if not defined, and minimum is forced to be 1.
To use, uncomment in defines.h
.
Check retries block the main loop #18
#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
Default is no interval between reconnection WiFi times if lost WiFi. Max permitted interval will be 10mins.
Uncomment to use. Be careful, WiFi reconnection 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.
Check retries block the main loop #18
#define WIFI_RECON_INTERVAL 30000 // 30s
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.3.1, you'll see this Main
page:
Enter your credentials,
then click Save
.
The WiFi Credentials will be saved and the board connect to the selected WiFi AP.
If you're already connected to a listed WiFi AP and don't want to change anything, just select Exit
from the Main
page to reboot the board and connect to the previously-stored AP. The WiFi Credentials are still intact.
See this example and modify as necessary
// Used mostly for development and debugging. FORCES default values to be loaded each run.
// Config Portal data input will be ignored and overridden by DEFAULT_CONFIG_DATA
bool LOAD_DEFAULT_CONFIG_DATA = true;
Config Portal data input will be override DEFAULT_CONFIG_DATA
// Used mostly once debugged. Assumes good data already saved in device.
// Config Portal data input will be override DEFAULT_CONFIG_DATA
bool LOAD_DEFAULT_CONFIG_DATA = false;
/// Start Default Config Data //////////////////
/*
#define SSID_MAX_LEN 32
//From v1.0.3, WPA2 passwords can be up to 63 characters long.
#define PASS_MAX_LEN 64
typedef struct
{
char wifi_ssid[SSID_MAX_LEN];
char wifi_pw [PASS_MAX_LEN];
} WiFi_Credentials;
#define NUM_WIFI_CREDENTIALS 2
// Configurable items besides fixed Header, just add board_name
#define NUM_CONFIGURABLE_ITEMS ( ( 2 * NUM_WIFI_CREDENTIALS ) + 1 )
////////////////
typedef struct Configuration
{
char header [16];
WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS];
char board_name [24];
int checkSum;
} WIFI_GENERIC_Configuration;
*/
#define TO_LOAD_DEFAULT_CONFIG_DATA false
#if TO_LOAD_DEFAULT_CONFIG_DATA
// This feature is primarily used in development to force a known set of values as Config Data
// It will NOT force the Config Portal to activate. Use DRD or erase Config Data with Blynk.clearConfigData()
// Used mostly for development and debugging. FORCES default values to be loaded each run.
// Config Portal data input will be ignored and overridden by DEFAULT_CONFIG_DATA
//bool LOAD_DEFAULT_CONFIG_DATA = true;
// Used mostly once debugged. Assumes good data already saved in device.
// Config Portal data input will be override DEFAULT_CONFIG_DATA
bool LOAD_DEFAULT_CONFIG_DATA = false;
WIFI_GENERIC_Configuration defaultConfig =
{
//char header[16], dummy, not used
"Portenta_WIFI",
// WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS];
// WiFi_Credentials.wifi_ssid and WiFi_Credentials.wifi_pw
"SSID1", "password1",
"SSID2", "password2",
//char board_name [24];
"Portenta-H7-Control",
// terminate the list
//int checkSum, dummy, not used
0
/////////// End Default Config Data /////////////
};
#else
bool LOAD_DEFAULT_CONFIG_DATA = false;
WIFI_GENERIC_Configuration defaultConfig;
#endif // TO_LOAD_DEFAULT_CONFIG_DATA
/////////// End Default Config Data /////////////
Example of Default dynamicParams
#include "defines.h"
// USE_DYNAMIC_PARAMETERS defined in defines.h
/////////////// Start dynamic Credentials ///////////////
//Defined in <WiFiManager_Portenta_H7_Lite.h>
/**************************************
#define MAX_ID_LEN 5
#define MAX_DISPLAY_NAME_LEN 16
typedef struct
{
char id [MAX_ID_LEN + 1];
char displayName [MAX_DISPLAY_NAME_LEN + 1];
char *pdata;
uint8_t maxlen;
} MenuItem;
**************************************/
#if USE_DYNAMIC_PARAMETERS
#define MAX_BLYNK_SERVER_LEN 34
#define MAX_BLYNK_TOKEN_LEN 34
char Blynk_Server1 [MAX_BLYNK_SERVER_LEN + 1] = "account.duckdns.org";
char Blynk_Token1 [MAX_BLYNK_TOKEN_LEN + 1] = "token1";
char Blynk_Server2 [MAX_BLYNK_SERVER_LEN + 1] = "account.ddns.net";
char Blynk_Token2 [MAX_BLYNK_TOKEN_LEN + 1] = "token2";
#define MAX_BLYNK_PORT_LEN 6
char Blynk_Port [MAX_BLYNK_PORT_LEN + 1] = "8080";
#define MAX_MQTT_SERVER_LEN 34
char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "mqtt.duckdns.org";
MenuItem myMenuItems [] =
{
{ "sv1", "Blynk Server1", Blynk_Server1, MAX_BLYNK_SERVER_LEN },
{ "tk1", "Token1", Blynk_Token1, MAX_BLYNK_TOKEN_LEN },
{ "sv2", "Blynk Server2", Blynk_Server2, MAX_BLYNK_SERVER_LEN },
{ "tk2", "Token2", Blynk_Token2, MAX_BLYNK_TOKEN_LEN },
{ "prt", "Port", Blynk_Port, MAX_BLYNK_PORT_LEN },
{ "mqt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN },
};
uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize;
#else
MenuItem myMenuItems [] = {};
uint16_t NUM_MENU_ITEMS = 0;
#endif //USE_DYNAMIC_PARAMETERS
#define USE_DYNAMIC_PARAMETERS false
or
/////////////// Start dynamic Credentials ///////////////
MenuItem myMenuItems [] = {};
uint16_t NUM_MENU_ITEMS = 0;
/////// // End dynamic Credentials ///////////
Please be noted that the following reserved names are already used in library:
"id" for WiFi SSID
"pw" for WiFi PW
"id1" for WiFi1 SSID
"pw1" for WiFi1 PW
"nm" for Board Name
Please take a look at other examples, as well.
This is the terminal output when running Portenta_H7_WiFi example on Portenta_H7:
Start Portenta_H7_WiFi on PORTENTA_H7_M7 with Portenta_H7 WiFi
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 OK
LittleFS Flag read = 0xd0d04321
Flag read = 0xd0d04321
No doubleResetDetected
Saving DOUBLERESETDETECTOR_FLAG to DRD file : 0xd0d01234
Saving DRD file OK
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:DRD/MRD
[WG] clearForcedCP
[WG] SaveCPFile
[WG] OK
[WG] SSID=WIFI_GENERIC_51F485,PW=MyWIFI_GENERIC_51F485
[WG] IP=192.168.3.1,CH=5
F
Your stored Credentials :
Blynk Server1 = account.duckdns.org
Token1 = token1
Blynk Server2 = account.ddns.net
Token2 = token2
Port = 8080
MQTT Server = mqtt.duckdns.org
FFFFF[WG]
h:UpdLittleFS
[WG] h:Rst
Start Portenta_H7_WiFi on PORTENTA_H7_M7 with Portenta_H7 WiFi
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 OK
LittleFS Flag read = 0xd0d04321
Flag read = 0xd0d04321
No doubleResetDetected
Saving DOUBLERESETDETECTOR_FLAG to DRD file : 0xd0d01234
Saving DRD file OK
SetFlag write = 0xd0d01234
[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] 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
Saving DRD file OK
LittleFS Flag read = 0xd0d04321
ClearFlag write = 0xd0d04321
H
Your stored Credentials :
Blynk Server1 = account.duckdns.org
Token1 = token1
Blynk Server2 = account.ddns.net
Token2 = token2
Port = 8080
MQTT Server = mqtt.duckdns.org
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
This is the terminal output when running Portenta_H7_WiFi_MQTT example on Portenta_H7:
Start Portenta_H7_WiFi_MQTT on PORTENTA_H7_M7 with Portenta_H7 WiFi
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
LittleFS size (KB) = 1280.00
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
[WG] Invalid Stored WiFi Config Data
[WG] bg: isForcedConfigPortal = false
[WG] bg:Stay forever in CP:No ConfigDat
[WG] clearForcedCP
[WG] SaveCPFile
[WG] OK
[WG] SSID=WIFI_GENERIC_51F485,PW=MyWIFI_GENERIC_51F485
[WG] IP=192.168.3.1,CH=9
Stop doubleResetDetecting
Saving to DRD file : 0xd0d04321
Saving DRD file OK
LittleFS Flag read = 0xd0d04321
ClearFlag write = 0xd0d04321
N
Your stored Credentials :
AIO_SERVER = io.adafruit.com
AIO_SERVERPORT = 1883
AIO_USERNAME = private
AIO_KEY = private
AIO_PUB_TOPIC = /feeds/Temperature
AIO_SUB_TOPIC = /feeds/LED_Control
NNNN NNNNN NNNNN NNNNN NNNNN NNNNN NNNNN NN
Start Portenta_H7_WiFi_MQTT on PORTENTA_H7_M7 with Portenta_H7 WiFi
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
LittleFS size (KB) = 1280.00
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
[WG] CCSum=0x160c,RCSum=0x160c
[WG] CrCCsum=0x2236,CrRCsum=0x2236
[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_MQTT
[WG] i=0,id=svr,data=io.adafruit.com
[WG] i=1,id=prt,data=1883
[WG] i=2,id=usr,data=user_name
[WG] i=3,id=key,data=aio_key
[WG] i=4,id=pub,data=/feeds/Temperature
[WG] i=5,id=sub,data=/feeds/LED_Control
[WG] con2WF:SSID=HueNet1,PW=12345678
[WG] con2WF:OK
[WG] IP=192.168.2.130
[WG] SSID=HueNet1,RSSI=-44
[WG] IP=192.168.2.130
[WG] b:WOK
Stop doubleResetDetecting
Saving to DRD file : 0xd0d04321
Saving DRD file OK
LittleFS Flag read = 0xd0d04321
ClearFlag write = 0xd0d04321
Creating new WiFi client object OK
Creating new MQTT object OK
AIO_SERVER = io.adafruit.com, AIO_SERVERPORT = 1883
AIO_USERNAME = user_name, AIO_KEY = aio_key
Creating new MQTT_Pub_Topic, Temperature = user_name/feeds/Temperature
Creating new Temperature object OK
Temperature MQTT_Pub_Topic = user_name/feeds/Temperature
Creating new AIO_SUB_TOPIC, LED_Control = user_name/feeds/LED_Control
Creating new LED_Control object OK
LED_Control AIO_SUB_TOPIC = user_name/feeds/LED_Control
Connecting to WiFi MQTT (3 attempts)...
WiFi MQTT connection successful!
TW
Your stored Credentials :
AIO_SERVER = io.adafruit.com
AIO_SERVERPORT = 1883
AIO_USERNAME = user_name
AIO_KEY = aio_key
AIO_PUB_TOPIC = /feeds/Temperature
AIO_SUB_TOPIC = /feeds/LED_Control
TWTWTWTW TWTWTW
Debug is enabled by default on Serial. To disable, add at the beginning of sketch
/* Comment this out to disable prints and save space */
#define DEBUG_WIFI_WEBSERVER_PORT Serial
#define WIFI_GENERIC_DEBUG_OUTPUT Serial
#define _WIFI_GENERIC_LOGLEVEL_ 4
#define DRD_GENERIC_DEBUG true
If you get compilation errors, more often than not, you may need to install a newer version of the board's core, or this library version.
Sometimes, the library will only work if you update the WiFi module/shield
firmware to the newer or older version because some function compatibility.
Submit issues to: WiFiManager_Portenta_H7_Lite issues
ArduinoCore-mbed mbed_portenta core
REQUIRE_ONE_SET_SSID_PW == true
LibraryPatches
for Adafruit_MQTT_Library to fix compiler error for Portenta_H7, RP2040-based and many other boards.WIFI_RECON_INTERVAL
lib_ldf_mode = chain+
in platformio.ini
Please help contribute to this project and add your name here.
Enable scan of WiFi networks for selection in Configuration Portal
. Check PR for v1.3.0 - Enable scan of WiFi networks #10WIFI_RECON_INTERVAL
.⭐️⭐️ Michael H. "bizprof" |
tomtobback |
If you want to contribute to this project:
Copyright 2021- Khoi Hoang - Michale H.