Giter VIP home page Giter VIP logo

khoih-prog / espasync_wifimanager_lite Goto Github PK

View Code? Open in Web Editor NEW
55.0 7.0 14.0 984 KB

Library using AsyncWebServer to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. 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, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested.

License: MIT License

C++ 96.03% C 3.86% Shell 0.11%
config-portal espasync-wifimanager-lite dynamic-parameters esp32 esp32-s2 esp8266 asyncwebserver async credentials credential-manager

espasync_wifimanager_lite's Introduction

ESPAsync_WiFiManager_Lite Library (Light Weight Credentials / WiFiManager for ESP32/ESP8266)

arduino-library-badge GitHub release GitHub contributions welcome GitHub issues

Donate to my libraries using BuyMeACoffee



Table of Contents



Important Change from v1.9.0

For v1.9.0 and up

Fix ESP32 chipID

ESP32 chipID is now correct and unique. The previous releases' 32-bit wrong chipID is mainly the 24-bit Organizational Unique Identifier (OUI) plus 8 bits from the correct chipID. That's why ESP_getChipId() function can return duplicated values if the boards are from the same batch.

For example

Chip_ID_64 : 0x98F4AB085288
chipOUI    : 0x98F4AB
chipId     : 0x85288
getEfuseMac: 0x885208ABF498
Libraries to be installed manually by downloading zip

Remove unavailable items from depends field of library.properties, such as ESP Async WebServer,ESP AsyncTCP and AsyncTCP.

Check



Features

If you have used one of the full-fledge Async WiFiManagers such as :

  1. Alan Steremberg's ESPAsyncWiFiManager
  2. Khoi Hoang ESPAsync_WiFiManager

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 is a Light-Weight Credentials / WiFi Connection Manager for ESP32 and ESP8266 boards, designed to use the better and faster asynchronous ESPAsyncWebServer instead of (ESP8266)WebServer.

The ESPAsync_WiFiManager_Lite library permits the easy 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, SPIFFS or EEPROM.

The web configuration portal, served from the ESP32/ESP8266 WiFi 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:

  • MultiWiFi feature for configuring/auto(re)connecting ESP32/ESP8266 WiFi to the available MultiWiFi APs at runtime.
  • Multi/DoubleDetectDetector feature to force Config Portal when multi/double reset is detected within predetermined time, default 10s.
  • Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Config Portal will be auto-adjusted to match the number of dynamic parameters.
  • Optional default Credentials as well as Dynamic parameters to be optionally autoloaded into Config Portal to use or change instead of manually input.
  • Dynamic custom parameters to be saved automatically in non-volatile memory, such as LittleFS, SPIFFS or EEPROM..
  • Configurable Config Portal Title to be either BoardName or default undistinguishable names.
  • Examples are designed to separate Credentials / Defines / Dynamic Params / Code so that you can change Credentials / Dynamic Params quickly for each device.
  • Control Config Portal from software or Virtual Switches
  • To permit autoreset after configurable timeout if DRD/MRD or non-persistent forced-CP
  • Use new ESP32 LittleFS features
  • Scan WiFi networks for selection in Configuration Portal

Thanks to this ESPAsync_WiFiManager_Lite library is based on and sync'ed with ESP_WiFiManager_Lite, all the features currently supported by ESP_WiFiManager_Lite will be available.

Why Async is better

  • Using asynchronous network means that you can handle more than one connection at the same time
  • You are called once the request is ready and parsed
  • When you send the response, you are immediately ready to handle other connections while the server is taking care of sending the response in the background
  • Speed is OMG
  • Easy to use API, HTTP Basic and Digest MD5 Authentication (default), ChunkedResponse
  • Easily extensible to handle any type of content
  • Supports Continue 100
  • Async WebSocket plugin offering different locations without extra servers or ports
  • Async EventSource (Server-Sent Events) plugin to send events to the browser
  • URL Rewrite plugin for conditional and permanent url rewrites
  • ServeStatic plugin that supports cache, Last-Modified, default index and more
  • Simple template processing engine to handle templates

To appreciate the power of the ESPAsyncWebServer and underlying Async libraries, please compare the more efficient Async_ESP32_FSWebServer example example with the complicated twin ESP32_FSWebServer.

Currently supported Boards

This ESPAsync_WiFiManager_Lite library currently supports these following boards:

  1. ESP8266 and ESP32-based boards using EEPROM, SPIFFS or LittleFS.
  2. ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM, SPIFFS or LittleFS.
  3. ESP32-C3 (ARDUINO_ESP32C3_DEV) using EEPROM, SPIFFS or LittleFS.
  4. ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS.


Prerequisites

  1. Arduino IDE 1.8.19+ for Arduino. GitHub release
  2. ESP8266 Core 3.1.1+ for ESP8266-based boards. Latest release. To use ESP8266 core 2.7.1+ for LittleFS.
  3. ESP32 Core 2.0.6+ for ESP32-based boards. Latest release
  4. Forked ESPAsyncWebServer. To install manually for Arduino IDE
  5. ESPAsyncDNSServer v1.0.0+ for all ESP32/ESP8266-based boards.
  6. ESPAsyncTCP v1.2.2+ for ESP8266-based boards. To install manually, not via Arduino IDE Library Manager
  7. AsyncTCP v1.1.1+ for ESP32-based boards. To install manually, not via Arduino IDE Library Manager
  8. ESP_DoubleResetDetector v1.3.2+ if using DRD feature. To install, check arduino-library-badge.
  9. ESP_MultiResetDetector v1.3.2+ if using MRD feature. To install, check arduino-library-badge.
  10. LittleFS_esp32 v1.0.6+ for ESP32-based boards using LittleFS with ESP32 core v1.0.5-. To install, check arduino-library-badge. Notice: This LittleFS_esp32 library has been integrated to Arduino ESP32 core v1.0.6+ and you don't need to install it if using ESP32 core v1.0.6+

Installation

Use Arduino Library Manager

The best and easiest way is to use Arduino Library Manager. Search for ESPAsync_WiFiManager_Lite, then select / install the latest version. You can also use this link arduino-library-badge for more detailed instructions.

Manual Install

  1. Navigate to ESPAsync_WiFiManager_Lite page.
  2. Download the latest release ESPAsync_WiFiManager_Lite-main.zip.
  3. Extract the zip file to ESPAsync_WiFiManager_Lite-main directory
  4. Copy the whole
  • ESPAsync_WiFiManager_Lite-main folder to Arduino libraries' directory such as ~/Arduino/libraries/.

VS Code & PlatformIO:

  1. Install VS Code
  2. Install PlatformIO
  3. Install ESPAsync_WiFiManager_Lite library by using Library Manager. Search for ESPAsync_WiFiManager_Lite in Platform.io Author's Libraries
  4. Use included 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


Note for Platform IO using ESP32 LittleFS

Necessary only for esp32 core v1.0.6-

From esp32 core v1.0.6+, LittleFS_esp32 v1.0.6 has been included and this step is not necessary anymore.

In Platform IO, to fix the error when using LittleFS_esp32 v1.0 for ESP32-based boards with ESP32 core v1.0.4- (ESP-IDF v3.2-), uncomment the following line

from

//#define CONFIG_LITTLEFS_FOR_IDF_3_2   /* For old IDF - like in release 1.0.4 */

to

#define CONFIG_LITTLEFS_FOR_IDF_3_2   /* For old IDF - like in release 1.0.4 */

It's advisable to use the latest LittleFS_esp32 v1.0.5+ to avoid the issue.

Thanks to Roshan to report the issue in Error esp_littlefs.c 'utime_p'



HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)

Please have a look at ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to have more detailed description and solution of the issue.

1. ESP32 has 2 ADCs, named ADC1 and ADC2

2. ESP32 ADCs functions

  • ADC1 controls ADC function for pins GPIO32-GPIO39
  • ADC2 controls ADC function for pins GPIO0, 2, 4, 12-15, 25-27

3.. ESP32 WiFi uses ADC2 for WiFi functions

Look in file adc_common.c

In ADC2, there're two locks used for different cases:

  1. lock shared with app and Wi-Fi: ESP32: When Wi-Fi using the ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed. ESP32S2: The controller's control over the ADC is determined by the arbiter. There is no need to control by lock.

  2. lock shared between tasks: when several tasks sharing the ADC2, we want to guarantee all the requests will be handled. Since conversions are short (about 31us), app returns the lock very soon, we use a spinlock to stand there waiting to do conversions one by one.

adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock.

  • In order to use ADC2 for other functions, we have to acquire complicated firmware locks and very difficult to do
  • So, it's not advisable to use ADC2 with WiFi/BlueTooth (BT/BLE).
  • Use ADC1, and pins GPIO32-GPIO39
  • If somehow it's a must to use those pins serviced by ADC2 (GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27), use the fix mentioned at the end of ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to work with ESP32 WiFi/BlueTooth (BT/BLE)


How It Works

  • The ESPAsync_WiFi example shows how it works and should be used as the basis for a sketch that uses this library.
  • The concept of ESPAsync_WiFi is that a new ESP32/ESP8266 WiFi 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.
  • There are 6 more custom parameters added in the sketch which you can use in your program later. In the example, they are: 2 sets of Blynk Servers and Tokens, Blynk Port and MQTT Server.
  • Using any WiFi enabled device with a browser (computer, phone, tablet) connect to the newly created AP and type in the configurable AP IP address (default 192.168.4.1). The Config Portal AP channel (default 10) is also configurable to avoid conflict with other APs.
  • The Config Portal is auto-adjusted to fix the 4 static parameters (WiFi SSIDs/PWDs) as well as 6 more dynamic custom parameters.
  • After the custom data entered, and Save button pressed, the configuration data will be saved in host's non-volatile memory, then the board reboots.
  • If there is valid stored Credentials, it'll go directly to connect to one of the MultiWiFi APs without starting / using the Config Portal.
  • ESP32/ESP8266 WiFi will try to connect. If successful, the dynamic DHCP and/or configured static IP address will be displayed in the configuration portal.
  • The ESP32/ESP8266 WiFi Config Portal network and Web Server will shutdown to return control to the sketch code.
  • In the operation, if the current WiFi connection is lost because of any reason, the system will auto(Re)connect to the remaining WiFi AP.
  • If system can't connect to any of the 2 WiFi APs, the Config Portal will start, after some pre-determined time, to permit user to update the Credentials.

How to use

1. Basic usage

  • Include in your sketch
// Must be before #include <ESPAsync_WiFiManager_Lite.h>
#include <ESPAsync_WiFiManager_Lite.h>

ESPAsync_WiFiManager_Lite* ESPAsync_WiFiManager;

2. Add custom parameters

  • To add custom parameters, just add

#ifndef dynamicParams_h
#define dynamicParams_h
#include "defines.h"
// USE_DYNAMIC_PARAMETERS defined in defined.h
/////////////// Start dynamic Credentials ///////////////
//Defined in <ESPAsync_WiFiManager_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
#endif //dynamicParams_h

3. Not using custom parameters

  • If you don't need to add dynamic parameters, use the following in sketch
#define USE_DYNAMIC_PARAMETERS      false

4. To open Config Portal

  • When you want to open a config portal, just add
ESPAsync_WiFiManager = new ESPAsync_WiFiManager_Lite();
ESPAsync_WiFiManager->begin();

5. To use different AP WiFi Channel

  • To not use default AP WiFi Channel 10 to avoid conflict with other WiFi APs :
ESPAsync_WiFiManager->setConfigPortalChannel(newChannel);
  • To use random AP WiFi Channel to avoid conflict with other WiFi APs :
ESP_WiFiManager->setConfigPortalChannel(0);

6. To use different static AP IP from default

  • To use different static AP IP (not use default 192.168.4.1), call
ESPAsync_WiFiManager->setConfigPortalIP(IPAddress(xxx,xxx,xxx,xxx));

7. To use custom DHCP HostName

  • To set custom DHCP HostName :
// Set customized DHCP HostName
ESPAsync_WiFiManager->begin("SAMD_ABCDEF");

or just use the default Hostname, for example "ESP_XXXXXX" for SAMD

// Or use default Hostname "ESP_XXXXXX"
ESPAsync_WiFiManager->begin();

8. To use custom HTML 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>";

...

ESPAsync_WiFiManager->setCustomsStyle(NewCustomsStyle);

9. To use custom Head Elements

ESPAsync_WiFiManager->setCustomsHeadElement("<style>html{filter: invert(10%);}</style>");

10. To use CORS Header

ESPAsync_WiFiManager->setCORSHeader("Your Access-Control-Allow-Origin");

While in AP mode, connect to it using its SSID (ESP_XXXXXX) / Password ("MyESP_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.

11. To use and input only one set of WiFi SSID and PWD

11.1 If you need to use and input only one set of WiFi SSID/PWD

// 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.

11.2 If you need to use both sets of WiFi SSID/PWD

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

12. To enable auto-scan of WiFi networks for selection in Configuration Portal

12.1 Enable auto-scan of WiFi networks for selection in Configuration Portal

#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.

12.2 Disable manually input SSIDs

// 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.

12.3 Select maximum number of SSIDs in the list

The maximum number of SSIDs in the list is seletable from 2 to 15. If invalid number of SSIDs is selected, the default number of 10 will be used.

// From 2-15
#define MAX_SSID_IN_LIST                    8

13. To avoid blocking in loop when WiFi is lost

13.1 Max times to try WiFi per loop

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

13.2 Interval between reconnection WiFi if lost

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

14. Not using Board_Name on Config_Portal

Default is true. Just change to false to not using Board_Name on Config_Portal

/////////////////////////////////////////////
// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true
/////////////////////////////////////////////



Examples

  1. ESPAsync_WiFi
  2. ESPAsync_WiFi_MQTT


So, how it works?

In Configuration Portal Mode, it starts an AP called ESP_WXXXXXX. Connect to it using the configurable password you can define in the code. For example, MyESP_WXXXXXX (see examples):

After you connected, please, go to http://192.168.4.1 or newly configured AP IP, you'll see this Main page:

Enter your credentials,

1. Without SCAN_WIFI_NETWORKS

Enter your credentials,

or

2. With SCAN_WIFI_NETWORKS

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.


Important Notes

  1. Now you can use special chars such as ~, !, @, #, $, %, ^, &, _, -, space,etc. thanks to brondolin to provide the amazing fix in Blynk_WM to permit input special chars such as % and # into data fields. See Issue 3.
  2. The SSIDs, Passwords must be input (or to make them different from blank). Otherwise, the Config Portal will re-open until those fields have been changed. If you don't need any field, just input anything or use duplicated data from similar field.
  3. WiFi password min length now is 8, max length is 63 chars according to WPA2 standard.

How to use default Credentials and have them pre-loaded onto Config Portal

See this example and modify as necessary

1. To always load Default Credentials and override Config Portal data

// 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;

2. To load Default Credentials when there is no valid Credentials.

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;

3. Example of Default Credentials

/// 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;
} ESP_WM_LITE_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 ESPAsync_WiFiManager.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;


ESP_WM_LITE_Configuration defaultConfig =
{
  //char header[16], dummy, not used
#if ESP8266 
  "ESP8266_Async",
#else
  "ESP32_Async",
#endif

  // WiFi_Credentials  WiFi_Creds  [NUM_WIFI_CREDENTIALS];
  // WiFi_Credentials.wifi_ssid and WiFi_Credentials.wifi_pw
  "SSID1",  "password1",
  "SSID2",  "password2",
  //char board_name     [24];

#if ESP8266 
  "ESP8266_Async-Control",
#else
  "ESP32_Async-Control",
#endif

  // terminate the list
  //int  checkSum, dummy, not used
  0
  /////////// End Default Config Data /////////////
};

#else

bool LOAD_DEFAULT_CONFIG_DATA = false;

ESP_WM_LITE_Configuration defaultConfig;

#endif    // TO_LOAD_DEFAULT_CONFIG_DATA

/////////// End Default Config Data /////////////

How to add dynamic parameters from sketch

Example of Default dynamicParams

  • To add custom parameters, just modify the example below
#include "defines.h"

// USE_DYNAMIC_PARAMETERS defined in defined.h

/////////////// Start dynamic Credentials ///////////////

//Defined in <ESPAsync_WiFiManager_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 AIO_SERVER_LEN       20
#define AIO_SERVERPORT_LEN   6
#define AIO_USERNAME_LEN     20
#define AIO_KEY_LEN          40

// 
#define AIO_PUB_TOPIC_LEN    40
#define AIO_SUB_TOPIC_LEN    40

char AIO_SERVER     [AIO_SERVER_LEN + 1]        = "io.adafruit.com";
char AIO_SERVERPORT [AIO_SERVERPORT_LEN + 1]    = "1883";     //1883, or 8883 for SSL
char AIO_USERNAME   [AIO_USERNAME_LEN + 1]      = "private";
char AIO_KEY        [AIO_KEY_LEN + 1]           = "private";

char AIO_PUB_TOPIC  [AIO_PUB_TOPIC_LEN + 1]     = "/feeds/Temperature";
char AIO_SUB_TOPIC  [AIO_SUB_TOPIC_LEN + 1]     = "/feeds/LED_Control";

MenuItem myMenuItems [] =
{
  { "svr", "AIO_SERVER",      AIO_SERVER,     AIO_SERVER_LEN },
  { "prt", "AIO_SERVERPORT",  AIO_SERVERPORT, AIO_SERVERPORT_LEN },
  { "usr", "AIO_USERNAME",    AIO_USERNAME,   AIO_USERNAME_LEN },
  { "key", "AIO_KEY",         AIO_KEY,        AIO_KEY_LEN },
  { "pub", "AIO_PUB_TOPIC",   AIO_PUB_TOPIC,  AIO_PUB_TOPIC_LEN },
  { "sub", "AIO_SUB_TOPIC",   AIO_SUB_TOPIC,  AIO_SUB_TOPIC_LEN },
};

uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem);  //MenuItemSize;

#else

MenuItem myMenuItems [] = {};

uint16_t NUM_MENU_ITEMS = 0;

#endif    //USE_DYNAMIC_PARAMETERS
  • If you don't need to add dynamic parameters, use the following in sketch
#define USE_DYNAMIC_PARAMETERS     false

or

/////////////// Start dynamic Credentials ///////////////

MenuItem myMenuItems [] = {};

uint16_t NUM_MENU_ITEMS = 0;
/////// // End dynamic Credentials ///////////

Important Notes for using Dynamic Parameters' ids

  1. These ids (such as "mqtt" in example) must be unique.

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.

#include "defines.h"
#include "Credentials.h"
#include "dynamicParams.h"
ESPAsync_WiFiManager_Lite* ESPAsync_WiFiManager;
void heartBeatPrint()
{
static int num = 1;
if (WiFi.status() == WL_CONNECTED)
Serial.print("H"); // H means connected to WiFi
else
{
if (ESPAsync_WiFiManager->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}
if (num == 80)
{
Serial.println();
num = 1;
}
else if (num++ % 10 == 0)
{
Serial.print(F(" "));
}
}
void check_status()
{
static unsigned long checkstatus_timeout = 0;
//KH
#define HEARTBEAT_INTERVAL 20000L
// Print hearbeat every HEARTBEAT_INTERVAL (20) seconds.
if ((millis() > checkstatus_timeout) || (checkstatus_timeout == 0))
{
heartBeatPrint();
checkstatus_timeout = millis() + HEARTBEAT_INTERVAL;
}
}
#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()
{
// Debug console
Serial.begin(115200);
while (!Serial);
delay(200);
Serial.print(F("\nStarting ESPAsync_WiFi using "));
Serial.print(FS_Name);
Serial.print(F(" on "));
Serial.println(ARDUINO_BOARD);
Serial.println(ESP_ASYNC_WIFI_MANAGER_LITE_VERSION);
#if USING_MRD
Serial.println(ESP_MULTI_RESET_DETECTOR_VERSION);
#else
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
#endif
ESPAsync_WiFiManager = new ESPAsync_WiFiManager_Lite();
String AP_SSID = "your_customized_ssid";
String AP_PWD = "your_customized_pwd";
// Set customized AP SSID and PWD
ESPAsync_WiFiManager->setConfigPortal(AP_SSID, AP_PWD);
// Optional to change default AP IP(192.168.4.1) and channel(10)
//ESPAsync_WiFiManager->setConfigPortalIP(IPAddress(192, 168, 120, 1));
ESPAsync_WiFiManager->setConfigPortalChannel(0);
#if USING_CUSTOMS_STYLE
ESPAsync_WiFiManager->setCustomsStyle(NewCustomsStyle);
#endif
#if USING_CUSTOMS_HEAD_ELEMENT
ESPAsync_WiFiManager->setCustomsHeadElement(PSTR("<style>html{filter: invert(10%);}</style>"));
#endif
#if USING_CORS_FEATURE
ESPAsync_WiFiManager->setCORSHeader(PSTR("Your Access-Control-Allow-Origin"));
#endif
// Set customized DHCP HostName
ESPAsync_WiFiManager->begin(HOST_NAME);
//Or use default Hostname "ESP_XXXXXX"
//ESPAsync_WiFiManager->begin();
}
#if USE_DYNAMIC_PARAMETERS
void displayCredentials()
{
Serial.println(F("\nYour stored Credentials :"));
for (uint16_t i = 0; i < NUM_MENU_ITEMS; i++)
{
Serial.print(myMenuItems[i].displayName);
Serial.print(F(" = "));
Serial.println(myMenuItems[i].pdata);
}
}
void displayCredentialsInLoop()
{
static bool displayedCredentials = false;
if (!displayedCredentials)
{
for (int i = 0; i < NUM_MENU_ITEMS; i++)
{
if (!strlen(myMenuItems[i].pdata))
{
break;
}
if ( i == (NUM_MENU_ITEMS - 1) )
{
displayedCredentials = true;
displayCredentials();
}
}
}
}
#endif
void loop()
{
ESPAsync_WiFiManager->run();
check_status();
#if USE_DYNAMIC_PARAMETERS
displayCredentialsInLoop();
#endif
}


2. File defines.h

#ifndef defines_h
#define defines_h
#if !( ESP8266 || ESP32)
#error This code is intended to run only on the ESP8266/ESP32 boards ! Please check your Tools->Board setting.
#endif
/* Comment this out to disable prints and save space */
#define ESP_WM_LITE_DEBUG_OUTPUT Serial
#define _ESP_WM_LITE_LOGLEVEL_ 2
// use builtin LED to show configuration mode
#define USE_LED_BUILTIN true
#define USING_MRD true
#if USING_MRD
#define MULTIRESETDETECTOR_DEBUG true
// Number of seconds after reset during which a
// subseqent reset will be considered a double reset.
#define MRD_TIMEOUT 10
// RTC Memory Address for the DoubleResetDetector to use
#define MRD_ADDRESS 0
#if (_ESP_WM_LITE_LOGLEVEL_ > 3)
#warning Using MULTI_RESETDETECTOR
#endif
#else
#define DOUBLERESETDETECTOR_DEBUG true
// Number of seconds after reset during which a
// subseqent reset will be considered a double reset.
#define DRD_TIMEOUT 10
// RTC Memory Address for the DoubleResetDetector to use
#define DRD_ADDRESS 0
#if (_ESP_WM_LITE_LOGLEVEL_ > 3)
#warning Using DOUBLE_RESETDETECTOR
#endif
#endif
/////////////////////////////////////////////
// LittleFS has higher priority than SPIFFS
#if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) )
#define USE_LITTLEFS true
#define USE_SPIFFS false
#elif defined(ARDUINO_ESP32C3_DEV)
// For core v1.0.6-, ESP32-C3 only supporting SPIFFS and EEPROM. To use v2.0.0+ for LittleFS
#define USE_LITTLEFS false
#define USE_SPIFFS true
#else
#define USE_LITTLEFS true
#define USE_SPIFFS false
#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
#define TIMEOUT_RECONNECT_WIFI 10000L
// Permit running CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET times before reset hardware
// to permit user another chance to config. Only if Config Data is valid.
// If Config Data is invalid, this has no effect as Config Portal will persist
#define RESET_IF_CONFIG_TIMEOUT true
// Permitted range of user-defined CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET between 2-100
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
// Config Timeout 120s (default 60s). Applicable only if Config Data is Valid
#define CONFIG_TIMEOUT 120000L
/////////////////////////////////////////////
// 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 //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
/////////////////////////////////////////////
// Permit reset hardware if no WiFi to permit user another chance to access Config Portal.
#define RESET_IF_NO_WIFI false
/////////////////////////////////////////////
#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
/////////////////////////////////////////////
// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true
/////////////////////////////////////////////
#include <ESPAsync_WiFiManager_Lite.h>
#if ESP8266
#define HOST_NAME "ESP8266Async-Control"
#else
#define HOST_NAME "ESP32Async-Control"
#endif
#ifdef LED_BUILTIN
#define LED_PIN LED_BUILTIN
#else
#define LED_PIN 13
#endif
#endif //defines_h


#ifndef Credentials_h
#define Credentials_h
#include "defines.h"
/// 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;
} ESP_WM_LITE_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 ESPAsync_WiFiManager.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;
ESP_WM_LITE_Configuration defaultConfig =
{
//char header[16], dummy, not used
#if ESP8266
"ESP8266_Async",
#else
"ESP32_Async",
#endif
// WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS];
// WiFi_Credentials.wifi_ssid and WiFi_Credentials.wifi_pw
"SSID1", "password1",
"SSID2", "password2",
//char board_name [24];
#if ESP8266
"ESP8266_Async-Control",
#else
"ESP32_Async-Control",
#endif
// terminate the list
//int checkSum, dummy, not used
0
/////////// End Default Config Data /////////////
};
#else
bool LOAD_DEFAULT_CONFIG_DATA = false;
ESP_WM_LITE_Configuration defaultConfig;
#endif // TO_LOAD_DEFAULT_CONFIG_DATA
/////////// End Default Config Data /////////////
#endif //Credentials_h


#ifndef dynamicParams_h
#define dynamicParams_h
#include "defines.h"
// USE_DYNAMIC_PARAMETERS defined in defined.h
/////////////// Start dynamic Credentials ///////////////
//Defined in <ESPAsync_WiFiManager_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
#endif //dynamicParams_h



Debug Terminal output Samples

1. ESPAsync_WiFi_MQTT on ESP32_DEV

This is the terminal output when running ESPAsync_WiFi_MQTT example on ESP32_DEV:

1.1. No Config Data => Open Config Portal

Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hostname=ESP32Async-Control
[WML] LoadCfgFile 
[WML] OK
[WML] ======= Start Stored Config Data =======
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_WMLite_MQTT
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=private
[WML] i=3,id=key,data=private
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] LoadCredFile 
[WML] OK
[WML] Invalid Stored Dynamic Data. Ignored
[WML] InitCfgFile,sz=236
[WML] SaveCfgFile 
[WML] WCSum=0xda0
[WML] OK
[WML] SaveBkUpCfgFile 
[WML] OK
[WML] SaveCredFile 
[WML] OK
[WML] CrWCSum=0xc30
[WML] SaveBkUpCredFile 
[WML] OK
[WML] LoadCPFile 
[WML] OK
[WML] bg:Stay forever in CP:No ConfigDat
[WML] SaveCPFile 
[WML] OK
[WML] SaveBkUpCPFile 
[WML] OK
C
Your stored Credentials :
AIO_SERVER = blank
AIO_SERVERPORT = blank
AIO_USERNAME = blank
AIO_KEY = blank
AIO_PUB_TOPIC = blank
AIO_SUB_TOPIC = blank
NStop multiResetDetecting
Saving config file...
Saving config file OK
CCC

1.2. Got valid Credentials from Config Portal then connected to WiFi

[WML] h:UpdLittleFS
[WML] SaveCfgFile 
[WML] WCSum=0xda0
[WML] OK
[WML] SaveBkUpCfgFile 
[WML] OK
[WML] SaveCredFile 
[WML] OK
[WML] CrWCSum=0xc30
[WML] SaveBkUpCredFile 
[WML] OK
[WML] h:Rst


Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hostname=ESP32Async-Control
[WML] LoadCfgFile 
[WML] OK
[WML] ======= Start Stored Config Data =======
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_WMLite_MQTT
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=private
[WML] i=3,id=key,data=private
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] LoadCredFile 
[WML] OK
[WML] Valid Stored Dynamic Data
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_WMLite_MQTT
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=user_name
[WML] i=3,id=key,data=aio_key
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] LoadCPFile 
[WML] OK
[WML] Connecting MultiWifi...
[WML] WiFi connected after time: 1
[WML] SSID=HueNet1,RSSI=-25
[WML] Channel=2,IP=192.168.2.82
[WML] bg: WiFi OK.

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
Stop multiResetDetecting
Saving config file...
Saving config file OK
TWTWTWTW TWTWTWTWTW TWTWTWTWTW T

1.3. Lost a WiFi and autoconnect to another WiFi AP

[WML] WiFi connected after time: 1
[WML] SSID=HueNet2,RSSI=-51
[WML] Channel=4,IP=192.168.2.82
[WML] run: WiFi reconnected
F
Connecting to WiFi MQTT (3 attempts)...
WiFi MQTT connection successful!
W TW

2. ESPAsync_WiFi_MQTT on ESP8266_NODEMCU

This is the terminal output when running ESPAsync_WiFi_MQTT example on ESP8266_NODEMCU:

2.1. No Config Data => Open Config Portal

Starting ESPAsync_WiFi_MQTT using LittleFS on ESP8266_NODEMCU
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hostname=ESP8266Async-Control
[WML] LoadCfgFile 
[WML] OK
[WML] ======= Start Stored Config Data =======
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP8266_WM_MQTT
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=private
[WML] i=3,id=key,data=private
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] LoadCredFile 
[WML] OK
[WML] Invalid Stored Dynamic Data. Ignored
[WML] InitCfgFile,sz=236
[WML] SaveCfgFile 
[WML] WCSum=0xda0
[WML] OK
[WML] SaveBkUpCfgFile 
[WML] OK
[WML] SaveCredFile 
[WML] OK
[WML] CrWCSum=0xc30
[WML] SaveBkUpCredFile 
[WML] OK
[WML] LoadCPFile 
[WML] OK
[WML] bg:Stay forever in CP:No ConfigDat
[WML] SaveCPFile 
[WML] OK
[WML] SaveBkUpCPFile 
[WML] OK
C
Your stored Credentials :
AIO_SERVER = blank
AIO_SERVERPORT = blank
AIO_USERNAME = blank
AIO_KEY = blank
AIO_PUB_TOPIC = blank
AIO_SUB_TOPIC = blank
NStop multiResetDetecting
Saving config file...
Saving config file OK
CCC

2.2. Got valid Credentials from Config Portal then connected to WiFi

[WML] h:UpdLittleFS
[WML] SaveCfgFile 
[WML] WCSum=0xda0
[WML] OK
[WML] SaveBkUpCfgFile 
[WML] OK
[WML] SaveCredFile 
[WML] OK
[WML] CrWCSum=0xc30
[WML] SaveBkUpCredFile 
[WML] OK
[WML] h:Rst


Starting ESPAsync_WiFi_MQTT using LittleFS on ESP8266_NODEMCU
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hostname=ESP8266Async-Control
[WML] LoadCfgFile 
[WML] OK
[WML] ======= Start Stored Config Data =======
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP8266_WM_MQTT
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=private
[WML] i=3,id=key,data=private
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] LoadCredFile 
[WML] OK
[WML] Valid Stored Dynamic Data
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP8266_WM_MQTT
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=user_name
[WML] i=3,id=key,data=aio_key
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] LoadCPFile 
[WML] OK
[WML] Connecting MultiWifi...
[WML] WiFi connected after time: 1
[WML] SSID=HueNet1,RSSI=-41
[WML] Channel=2,IP=192.168.2.98
[WML] bg: WiFi OK.

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
Stop multiResetDetecting
Saving config file...
Saving config file OK
TWTWTWTW TWTWTWTWTW TWTWTWTWTW T

2.3. Lost a WiFi and autoconnect to another WiFi AP

[WML] run: WiFi lost. Reconnect WiFi
[WML] Connecting MultiWifi...
[WML] WiFi connected after time: 1
[WML] SSID=HueNet2,RSSI=-54
[WML] Channel=4,IP=192.168.2.98
[WML] run: WiFi reconnected
H

3. ESPAsync_WiFi_MQTT on ESP32S2_DEV

This is the terminal output when running ESPAsync_WiFi_MQTT example on ESP32S2_DEV:

3.1. No Config Data => Open Config Portal

Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hostname=ESP32_S2_Async
[WML] Check if isForcedCP
[WML] LoadCPFile 
[WML] OK
[WML] bg: isForcedConfigPortal = false
[WML] bg:Stay forever in CP:No ConfigDat
[WML] clearForcedCP
[WML] SaveCPFile 
[WML] OK
[WML] SaveBkUpCPFile 
[WML] OK
[WML] 
stConf:SSID=ESP_8A1DF7C,PW=MyESP_8A1DF7C
[WML] IP=192.168.4.1,ch=1
[WML] s:configTimeout = 0
C
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
NStop multiResetDetecting
Saving config file...
Saving config file OK
CCC C

3.2. Got valid Credentials from Config Portal then connected to WiFi

[WML] h: Init menuItemUpdated
[WML] h:repl id
[WML] h:items updated =1
[WML] h:key =id, value =HueNet1
[WML] h:repl pw
[WML] h:items updated =2
[WML] h:key =pw, value =12345678
[WML] h:repl id1
[WML] h:items updated =3
[WML] h:key =id1, value =HueNet2
[WML] h:repl pw1
[WML] h:items updated =4
[WML] h:key =pw1, value =12345678
[WML] h:repl nm
[WML] h:items updated =5
[WML] h:key =nm, value =ESP32_S2
[WML] h:svr=io.adafruit.com
[WML] h:items updated =6
[WML] h:key =svr, value =io.adafruit.com
[WML] h:prt=1883
[WML] h:items updated =7
[WML] h:key =prt, value =1883
[WML] h:usr=user_name
[WML] h:items updated =8
[WML] h:key =usr, value =user_name
[WML] h:key=aio_key
[WML] h:items updated =9
[WML] h:key =key, value =aio_key
[WML] h:pub=/feeds/Temperature
[WML] h:items updated =10
[WML] h:key =pub, value =/feeds/Temperature
[WML] h:sub=/feeds/LED_Control
[WML] h:items updated =11
[WML] h:key =sub, value =/feeds/LED_Control
[WML] h:UpdLittleFS
[WML] SaveCfgFile 
[WML] WCSum=0x1170
[WML] OK
[WML] SaveBkUpCfgFile 
[WML] OK
[WML] SaveCredFile 
[WML] CW1:pdata=io.adafruit.com,len=20
[WML] CW1:pdata=1883,len=6
[WML] CW1:pdata=user_name,len=20
[WML] CW1:pdata=aio_key,len=40
[WML] CW1:pdata=/feeds/Temperature,len=40
[WML] CW1:pdata=/feeds/LED_Control,len=40
[WML] OK
[WML] CrWCSum=0x2236
[WML] SaveBkUpCredFile 
[WML] CW2:pdata=io.adafruit.com,len=20
[WML] CW2:pdata=1883,len=6
[WML] CW2:pdata=user_name,len=20
[WML] CW2:pdata=aio_key,len=40
[WML] CW2:pdata=/feeds/Temperature,len=40
[WML] CW2:pdata=/feeds/LED_Control,len=40
[WML] OK
[WML] h:Rst
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40025f35
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x8
load:0x3ffe6108,len:0x608
load:0x4004c000,len:0xa38
load:0x40050000,len:0x2848
entry 0x4004c190


Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hostname=ESP32_S2_Async
[WML] LoadCfgFile 
[WML] OK
[WML] ======= Start Stored Config Data =======
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_S2_Async
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=private
[WML] i=3,id=key,data=private
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] CCSum=0x1170,RCSum=0x1170
[WML] LoadCredFile 
[WML] CrR:pdata=io.adafruit.com,len=20
[WML] CrR:pdata=1883,len=6
[WML] CrR:pdata=user_name,len=20
[WML] CrR:pdata=aio_key,len=40
[WML] CrR:pdata=/feeds/Temperature,len=40
[WML] CrR:pdata=/feeds/LED_Control,len=40
[WML] OK
[WML] CrCCsum=0x2236,CrRCsum=0x2236
[WML] Valid Stored Dynamic Data
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_S2_Async
[WML] i=0,id=svr,data=io.adafruit.com
[WML] i=1,id=prt,data=1883
[WML] i=2,id=usr,data=user_name
[WML] i=3,id=key,data=aio_key
[WML] i=4,id=pub,data=/feeds/Temperature
[WML] i=5,id=sub,data=/feeds/LED_Control
[WML] Check if isForcedCP
[WML] LoadCPFile 
[WML] OK
[WML] bg: noConfigPortal = true
[WML] Connecting MultiWifi...
[WML] WiFi connected after time: 1
[WML] SSID=HueNet1,RSSI=-19
[WML] Channel=2,IP=192.168.2.116
[WML] bg: WiFi OK.
Stop multiResetDetecting
Saving config file...
Saving config file OK

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

3.3. Lost a WiFi and autoconnect to another WiFi AP

[WML] run: WiFi lost. Reconnect WiFi
[WML] Connecting MultiWifi...
[WML] WiFi connected after time: 1
[WML] SSID=HueNet2,RSSI=-54
[WML] Channel=4,IP=192.168.2.116
[WML] run: WiFi reconnected
H

4. ESPAsync_WiFi_MQTT on ESP32S2_DEV to demo MultiResetDetector

This is the terminal output when running ESPAsync_WiFi_MQTT example on ESP32S2_DEV

4.1. MultiResetDetected => Open Config Portal

Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFC0003
multiResetDetectorFlag = 0xFFFC0003
lowerBytes = 0x0003, upperBytes = 0x0003
multiResetDetected, number of times = 3
Saving config file...
Saving config file OK
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32-S2
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32-S2
[WML] 
stConf:SSID=ESP_8A1DF7C,PW=MyESP_8A1DF7C
[WML] IP=192.168.4.1,ch=1
C
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
CCCC CCCC[WML] h:Updating LittleFS:/wm_config.dat
[WML] h:Rst
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40027318
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x4b0
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28e8
entry 0x4004c190

4.2. Got valid Credentials from Config Portal then connected to WiFi

Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32-S2
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32-S2
[WML] WiFi connected after time: 1
[WML] SSID=HueNet1,RSSI=-36
[WML] Channel=2,IP=192.168.2.157
Stop multiResetDetecting
Saving config file...
Saving config file OK

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
TWTWTWT

5. ESPAsync_WiFi_MQTT on ESP32_DEV to demo WiFi Scan

This is the terminal output when running ESPAsync_WiFi_MQTT example on ESP32_DEV with WiFi Scan for selection in Configuration Portal

5.1 MRD/DRD => Open Config Portal

Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFC0003
multiResetDetectorFlag = 0xFFFC0003
lowerBytes = 0x0003, upperBytes = 0x0003
multiResetDetected, number of times = 3
Saving config file...
Saving config file OK
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_DEV
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_DEV
[WML] WiFi networks found:
[WML] 1: HueNet, -26dB
[WML] 2: HueNet1, -28dB
[WML] 3: HueNetTek, -31dB
[WML] 4: dragino-1ed63c, -43dB
[WML] 5: HueNet2, -56dB
[WML] 6: bacau, -74dB
[WML] 7: guest_24, -74dB
[WML] 8: Rogers 786, -86dB
[WML] 9: dlink-4F96, -90dB
[WML] 10: Waterhome, -91dB
[WML] 11: BELL246, -93dB
[WML] 12: BELL627, -96dB
[WML] 
stConf:SSID=ESP_9ABF498,PW=MyESP_9ABF498
[WML] IP=192.168.4.1,ch=5
C
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
CCCC CCCCC CCCCC C

5.2 Config Data Saved => Connection to Adafruit MQTT

Starting ESPAsync_WiFi_MQTT using LittleFS on ESP32_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_DEV
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=Async_ESP32_DEV
[WML] WiFi connected after time: 1
[WML] SSID=HueNet1,RSSI=-30
[WML] Channel=2,IP=192.168.2.45
Stop multiResetDetecting
Saving config file...
Saving config file OK

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!
TWTWTWTW TWTWTWTWTWTW

6. ESPAsync_WiFi on ESP32S3_DEV

This is the terminal output when running ESPAsync_WiFi example on ESP32S3_DEV

Starting ESPAsync_WiFi using LittleFS on ESP32S3_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_S3
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678
[WML] SSID1=HueNet2,PW1=12345678
[WML] BName=ESP32_S3
[WML] WiFi connected after time: 0
[WML] SSID=HueNet1,RSSI=-25
[WML] Channel=2,IP=192.168.2.83
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
Stop multiResetDetecting
Saving config file...
Saving config file OK
H

7. ESPAsync_WiFi on ESP32C3_DEV using LittleFS

This is the terminal output when running ESPAsync_WiFi example on ESP32C3_DEV using LittleFS

Starting ESPAsync_WiFi using LittleFS on ESP32C3_DEV
ESPAsync_WiFiManager_Lite v1.10.5
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=password
[WML] SSID1=HueNet2,PW1=password
[WML] BName=ESP32_C3
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=password
[WML] SSID1=HueNet2,PW1=password
[WML] BName=ESP32_C3
[WML] WiFi connected after time: 0
[WML] SSID=HueNet1,RSSI=-21
[WML] Channel=2,IP=192.168.2.85
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
Stop multiResetDetecting
Saving config file...
Saving config file OK
HHH


Debug

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 ESP_WM_LITE_DEBUG_OUTPUT        Serial

#define _ESP_WM_LITE_LOGLEVEL_          3

#define USING_MRD                       true

#if USING_MRD
  #define MULTIRESETDETECTOR_DEBUG      true
#else
  #define DOUBLERESETDETECTOR_DEBUG     true
#endif

Troubleshooting

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 ESP32 / ESP8266 core to the latest version because I am using some newly added function.

If you connect to the created configuration Access Point but the ConfigPortal does not show up, just open a browser and type in the IP of the web portal, by default 192.168.4.1.


Issues

Submit issues to: ESPAsync_WiFiManager_Lite issues



TO DO

  1. Support more boards, shields and libraries
  2. Bug Searching and Killing

DONE

  1. Permit EEPROM size and location configurable to avoid conflict with others.
  2. More flexible to configure reconnection timeout.
  3. For fresh config data, don't need to wait for connecting timeout before entering config portal.
  4. If the config data not entered completely (SSIDs, Passwords, etc.), entering config portal
  5. Add configurable Config Portal IP, SSID and Password
  6. Change Synch XMLHttpRequest to Async
  7. Add configurable Static IP, GW, Subnet Mask and 2 DNS Servers' IP Addresses.
  8. Add checksums
  9. Add support to ESP32 including ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) and ESP8266
  10. Add MultiWiFi features with auto(re)connect
  11. Easy-to-use Dynamic Parameters without the necessity to write complicated ArduinoJSon functions
  12. Permit to input special chars such as % and # into data fields.
  13. Default Credentials and dynamic parameters
  14. Multi/DoubleDetectDetector to force Config Portal when multi/double reset is detected within predetermined time, default 10s.
  15. Configurable Config Portal Title
  16. Re-structure all examples to separate Credentials / Defines / Dynamic Params / Code so that you can change Credentials / Dynamic Params quickly for each device.
  17. Add Table of Contents and Version String
  18. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header
  19. Add support to ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM, LittleFS and SPIFFS
  20. Add support to ESP32-C3 using EEPROM and SPIFFS
  21. Enable scan of WiFi networks for selection in Configuration Portal
  22. Ready for ESP32 core v2.0.0+
  23. Fix ESP8266 bug not easy to connect to Config Portal for ESP8266 core v3.0.0+
  24. Fix the blocking issue in loop() with configurable WIFI_RECON_INTERVAL
  25. Optimize library code by using reference-passing instead of value-passing
  26. Add support to ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS
  27. Add LittleFS support to ESP32-C3
  28. Use ESP32-core's LittleFS library instead of Lorol's LITTLEFS library for ESP32 core v2.0.0+
  29. Optimize code by passing by reference instead of value
  30. Optional Board_Name in Config Portal
  31. Add function isConfigMode() to signal system is in Config Portal mode
  32. Remove dependency on LittleFS_esp32 library to prevent PIO error when using new ESP32 core v1.0.6+
  33. Remove unavailable items from depends field of library.properties, such as ESP Async WebServer,ESP AsyncTCP and AsyncTCP
  34. Fix ESP32 chipID
  35. Add ESP32 getChipID() and getChipOUI() functions
  36. Add Captive Portal using AsyncDNSServer
  37. Add public methods to load and save dynamic data
  38. Add Config Portal scaling support to mobile devices
  39. Using PROGMEM for strings
  40. Default LittleFS for ESP8266 in examples
  41. Improve README.md so that links can be used in other sites, such as PIO


Contributions and Thanks

Please help contribute to this project and add your name here.

  1. Thanks to Michael H. "bizprof". With the impressive new feature :
  1. Thanks to Holger Müller for creating the following merged PRs leading to many new versions
  1. Thanks to securelpb for report issue, leading to v1.10.3 to fix the problem with PIO
bizprof
⭐️⭐️ Michael H. "bizprof"

hmueller01
⭐️⭐️ Holger Müller

securelpb
securelpb


Contributing

If you want to contribute to this project:

  • Report bugs and errors
  • Ask for enhancements
  • Create issues and pull requests
  • Tell other people about this library

License

  • The library is licensed under MIT

Copyright

Copyright (c) 2021- Khoi Hoang

espasync_wifimanager_lite's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

espasync_wifimanager_lite's Issues

Example code fails compile. error: call of overloaded 'IPAddress(unsigned int)' is ambiguous

Describe the bug

Example code does not compile it produced the following error.

C:\Users\Rudy\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp: In member function 'IPAddress AsyncWebSocketClient::remoteIP()':
C:\Users\Rudy\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp:832:28: error: call of overloaded 'IPAddress(unsigned int)' is ambiguous
         return IPAddress(0U);
                            ^

Steps to Reproduce

Install library and dependencies. Open example. Click compile. (Arduino IDE 1.8.13)

Expected behavior

Complete compile and load into hardware.

Actual behavior

As stated above.

Debug and AT-command log (if applicable)

Would love to, but never gets that far.

Screenshots

If applicable, add screenshots to help explain your problem.

Information

Please ensure to specify the following:

  • Arduino IDE version (e.g. 1.8.13)

  • ESP32-C3

  • 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:

    • Operating system - Windows
    • Network configuration - Does not get that far.

Example

Arduino IDE version: 1.8.13
ESP32 Core Version 2.0.0

Arduino: 1.8.13 (Windows 10), Board: "ESP32C3 Dev Module, Disabled, UART0, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 160MHz (WiFi), QIO, 80MHz, 4MB (32Mb), 256000, None"

DHCP can not work using ESP8266 core version v3.0.2

Describe the bug

DHCP can not work using ESP8266 core version v3.0.2

Steps to Reproduce

use default example

Debug and AT-command log (if applicable)

11:39:19.057 -> Starting ESPAsync_WiFi_MQTT using LittleFS on ESP8266_NODEMCU_ESP12E
11:39:19.091 -> ESPAsync_WiFiManager_Lite v1.5.1
11:39:19.091 -> ESP_MultiResetDetector v1.1.2
11:39:19.091 -> LittleFS Flag read = 0xFFFE0001
11:39:19.091 -> multiResetDetectorFlag = 0xFFFE0001
11:39:19.091 -> lowerBytes = 0x0001, upperBytes = 0x0001
11:39:19.091 -> No multiResetDetected, number of times = 1
11:39:19.091 -> LittleFS Flag read = 0xFFFE0001
11:39:19.125 -> Saving config file...
11:39:19.125 -> Saving config file OK
11:39:21.349 -> [WML] WiFi networks found:
11:39:21.349 -> [WML] 1: werrwe, -60dB
11:39:21.349 -> [WML] 2: TP-LINK_0FC5, -65dB
11:39:21.383 -> [WML] 3: iTV-Yvga, -88dB
11:39:22.378 -> [WML]
11:39:22.412 -> stConf:SSID=ESP_ED5BC3,PW=MyESP_ED5BC3
11:39:22.412 -> [WML] IP=192.168.4.1,ch=10
11:39:22.481 -> N
11:39:22.481 -> Your stored Credentials :
11:39:22.481 -> AIO_SERVER = io.adafruit.com
11:39:22.516 -> AIO_SERVERPORT = 1883
11:39:22.516 -> AIO_USERNAME = private
11:39:22.516 -> AIO_KEY = private
11:39:22.516 -> AIO_PUB_TOPIC = /feeds/Temperature
11:39:22.516 -> AIO_SUB_TOPIC = /feeds/LED_Control
11:39:27.493 -> NStop multiResetDetecting
11:39:28.832 -> Saving config file...
11:39:28.832 -> Saving config file OK
11:39:32.507 -> NNN NNNNN NNNNN NNN

Information

  • Arduino IDE version 1.8.16
  • ESP8266 core version v3.0.2

Add support for getTimezoneName() and getTZ(timezoneName)

The ESPAsync_WiFiManager library had support for exposing the timezone. I tried using the same setting:

// Use false to disable NTP config. Advisable when using Cellphone, Tablet to access Config Portal.
// See Issue 23: On Android phone ConfigPortal is unresponsive (https://github.com/khoih-prog/ESP_WiFiManager/issues/23)
#define USE_ESP_WIFIMANAGER_NTP     true

to ensure the flag was set but ESPAsync_WiFiManager_Lite doesn't appear to have the required getTimezoneName and getTZ methods.

I would appreciate this new/parity feature being added or documented if there is a way to do it that I just haven't found.

Thank you!

Unable to connect to open access points

I'm converting my Kaleidoscope project from using ESPAsync_WiFiManager to the _Lite version. I like that it enables me to provide default credentials so that in many situations, it will 'just work' without any user input. I also appreciate that the _Lite version has incorporated the DRD/MRD logic as well as the new 'Run' method that monitors the connection and will attempt to reconnect. I had to write the logic for these features before and appreciate being able to use you're more robust implementations. Thank you for making them available to us to use!

I've run into a couple of bugs/limitations I wanted to bring up. I'll open separate issues for each of them to make tracking them in Github easier.

First, I am unable to connect to open access points with ESPAsync_WiFiManager_Lite. I have a 'Guest' network/SSID that has no password. When I enter 'guest' and leave the password empty in the UI and press "Save" I get a popup that says '192.168.4.1 says Updated' but when it reboots, it fails to connect and enters AP mode and I have to enter the config portal again.

After doing some investigation, it appears from both the readme.md and looking at the code that any password shorter than 8 characters is considered invalid.

The SSIDs, Passwords must be input (or to make them different from blank). Otherwise, the Config Portal will re-open until those fields have been changed. If you don't need any field, just input anything or use duplicated data from similar field.

WiFi password min length now is 8, max length is 63 chars according to WPA2 standard.

if ( strlen(ESP_WM_LITE_config.WiFi_Creds[i].wifi_pw) >= PASSWORD_MIN_LEN )

After reading this, I tried entering 8 characters of garbage (ie 12345678) in the password field and that did get the UI to accept and save the SSID and password but it then fails to connect to the open access point given it doesn't require a password. I entered a 2nd SSID and password that does require a password and it correctly connect to the second, password protected access point correctly, it just won't connect to an open access point with no password.

No config page loading

Followed the examples.

Using PlatformIO with Core 6x
Board starts, WiFi AP shows up, and I can connect with password,

When I connect my phone to the network and then try to reach the IP Address, I get no page.

Any idea?

I get this warning:

In file included from src/defines.h:73,
                 from src/Credentials.h:4,
                 from src/main.cpp:1:
.pio/libdeps/az-delivery-devkit-v4/ESPAsync_WiFiManager_Lite/src/ESPAsync_WiFiManager_Lite.h:133:8: warning: #warning Using ESP32 Core 1.0.6 or 2.0.0+ [-Wcpp]
       #warning Using ESP32 Core 1.0.6 or 2.0.0+

Terminal output on Upload and Monitor:

Starting ESPAsync_WiFi using LittleFS ON AZ-Delivery ESP-32 Dev Kit C V4
ESPAsync_WiFiManager_Lite v1.9.0
ESP_MultiResetDetector v1.3.2
[   483][E][vfs_api.cpp:104] open(): /littlefs/wm_config.dat does not exist, no permits for creation
[   487][E][vfs_api.cpp:104] open(): /littlefs/wm_config.bak does not exist, no permits for creation
[WML] WiFi networks found:
[WML] 1: PrettyFlyForAWiFi, -38dB
[WML] 
stConf:SSID=ESP_5270E0,PW=MyESP_5270E0
[WML] IP=192.168.4.1,ch=3
C

Unable to compile basic example for NodeMCU-32s

Describe the bug

Using PlatformIO with Clion I am unable to compile the basic example in ESPAsync_WiFi due to a dependency on https://registry.platformio.org/libraries/devyte/ESPAsyncDNSServer. Per the specifications of this library, it only supports the platform espressif.

I am able to get the example to compile successfully for the espressif platform. (Note: I had to figure out that I needed to add
build_flags = -D USE_LITTLEFS=true to my [env] section. This would be nice to have in the release notes)
When I compile for the espressif32 platform I get the following: (I've omitted the include path because its a few hundred lines :-) )

`xtensa-esp32-elf-g++ -o .pio/build/nodemcu-32s/lib1b5/AsyncTCP/AsyncTCP.cpp.o -c -Wno-frame-address -std=gnu++11 -fexceptions -fno-rtti -mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -MMD -Og -g2 -ggdb2 -DPLATFORMIO=60105 -DARDUINO_NodeMCU_32S -DUSE_LITTLEFS=true -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER=\"v4.4.3\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -DARDUINO_ARCH_ESP32 -DESP32 -DF_CPU=240000000L -DARDUINO=10812 -DARDUINO_VARIANT=\"nodemcu-32s\" -DARDUINO_BOARD=\"NodeMCU-32S\" -DARDUINO_PARTITION_default -D__PLATFORMIO_BUILD_DEBUG__ .pio/libdeps/nodemcu-32s/AsyncTCP/src/AsyncTCP.cpp
In file included from src/defines.h:135,
                 from src/main.cpp:7:
.pio/libdeps/nodemcu-32s/ESPAsync_WiFiManager_Lite/src/ESPAsync_WiFiManager_Lite.h:142:8: warning: #warning Using ESP32 Core 1.0.6 or 2.0.0+ [-Wcpp]
       #warning Using ESP32 Core 1.0.6 or 2.0.0+
        ^~~~~~~
In file included from .pio/libdeps/nodemcu-32s/ESPAsync_WiFiManager_Lite/src/ESPAsync_WiFiManager_Lite.h:182,
                 from src/defines.h:135,
                 from src/main.cpp:7:
.pio/libdeps/nodemcu-32s/ESPAsyncDNSServer/src/ESPAsyncDNSServer.h:4:10: fatal error: ESPAsyncUDP.h: No such file or directory

*********************************************************************
* Looking for ESPAsyncUDP.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ESPAsyncUDP.h"
* Web  > https://registry.platformio.org/search?q=header:ESPAsyncUDP.h
*
*********************************************************************`

Steps to Reproduce

With the following platform.ini, copy the contents of https://registry.platformio.org/libraries/khoih-prog/ESPAsync_WiFiManager_Lite/examples/ESPAsync_WiFi into the src directory of your PIO project.
Rename main.ino to main.cpp and add #include <Arduino.h>
Run the platformio init for clion and get your targets fixed
Try to build for nodemcuv2:Success
Try to build for nodemcu-32s:Failure

[env]
build_flags = -D USE_LITTLEFS=true


[env:nodemcuv2]
monitor_speed = 57600
upload_speed = 115200
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps=
    khoih-prog/ESPAsync_WiFiManager_Lite

[env:nodemcu-32s]
monitor_speed = 115200
platform = espressif32
board = nodemcu-32s
framework = arduino
lib_deps=
    khoih-prog/ESPAsync_WiFiManager_Lite

Expected behavior

After some research, I found this old post about a similar issue: forkineye/ESPAsyncE131#4 (comment)
That comment said "An ESP32 build should reference AsnycUDP and not ESPAsyncUDP." This seems to line up with the fact that ESPAsyncDNSServer only supports espressif.

I see that you have some alternate implementations of ESPAsyncDNSServer, but the library dependencies don't reference them, so I figure you have your reasons. I did download your version of AsyncDNSServer_ESP32_W5500 and I was able to get the example to compile, but I actually don't know which version of that library I should be using for my ESP32-WROOM-32D powered NodeMCU-32s.

Actual behavior

In file included from .pio/libdeps/nodemcu-32s/ESPAsync_WiFiManager_Lite/src/ESPAsync_WiFiManager_Lite.h:182,
from src/defines.h:135,
from src/main.cpp:7:
.pio/libdeps/nodemcu-32s/ESPAsyncDNSServer/src/ESPAsyncDNSServer.h:4:10: fatal error: ESPAsyncUDP.h: No such file or directory


Information

Please ensure to specify the following:

Error compiling MQTT example - Multiple libraries were found for "WiFi.h"

Describe the bug

Arduino: 1.8.16 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\johnf\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\johnf\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\johnf\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32doit-devkit-v1:FlashFreq=80,UploadSpeed=921600,DebugLevel=none -ide-version=10816 -build-path C:\Users\johnf\AppData\Local\Temp\arduino_build_518595 -warnings=all -build-cache C:\Users\johnf\AppData\Local\Temp\arduino_cache_617443 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.mkspiffs.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.esptool_py.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -verbose C:\Users\johnf\Documents\Arduino\libraries\ESPAsync_WiFiManager_Lite\examples\ESPAsync_WiFi_MQTT\ESPAsync_WiFi_MQTT.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\johnf\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\johnf\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\johnf\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32doit-devkit-v1:FlashFreq=80,UploadSpeed=921600,DebugLevel=none -ide-version=10816 -build-path C:\Users\johnf\AppData\Local\Temp\arduino_build_518595 -warnings=all -build-cache C:\Users\johnf\AppData\Local\Temp\arduino_cache_617443 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.mkspiffs.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.esptool_py.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -verbose C:\Users\johnf\Documents\Arduino\libraries\ESPAsync_WiFiManager_Lite\examples\ESPAsync_WiFi_MQTT\ESPAsync_WiFi_MQTT.ino

Using board 'esp32doit-devkit-v1' from platform in folder: C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6

Using core 'esp32' from platform in folder: C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6

cmd /c if exist "C:\\Users\\johnf\\Documents\\Arduino\\libraries\\ESPAsync_WiFiManager_Lite\\examples\\ESPAsync_WiFi_MQTT\\partitions.csv" copy /y "C:\\Users\\johnf\\Documents\\Arduino\\libraries\\ESPAsync_WiFiManager_Lite\\examples\\ESPAsync_WiFi_MQTT\\partitions.csv" "C:\\Users\\johnf\\AppData\\Local\\Temp\\arduino_build_518595\\partitions.csv"

cmd /c if not exist "C:\\Users\\johnf\\AppData\\Local\\Temp\\arduino_build_518595\\partitions.csv" copy "C:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\partitions\\default.csv" "C:\\Users\\johnf\\AppData\\Local\\Temp\\arduino_build_518595\\partitions.csv"

        1 file(s) copied.

Detecting libraries used...

"C:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"doitESP32devkitV1\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\doitESP32devkitV1" "C:\\Users\\johnf\\AppData\\Local\\Temp\\arduino_build_518595\\sketch\\ESPAsync_WiFi_MQTT.ino.cpp" -o nul

Alternatives for ESPAsync_WiFiManager_Lite.h: [[email protected]]

ResolveLibrary(ESPAsync_WiFiManager_Lite.h)

  -> candidates: [[email protected]]

"C:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"doitESP32devkitV1\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\doitESP32devkitV1" "-IC:\\Users\\johnf\\Documents\\Arduino\\libraries\\ESPAsync_WiFiManager_Lite\\src" "C:\\Users\\johnf\\AppData\\Local\\Temp\\arduino_build_518595\\sketch\\ESPAsync_WiFi_MQTT.ino.cpp" -o nul

Alternatives for WiFi.h: [[email protected] [email protected]]

ResolveLibrary(WiFi.h)

  -> candidates: [[email protected] [email protected]]

"C:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"doitESP32devkitV1\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\doitESP32devkitV1" "-IC:\\Users\\johnf\\Documents\\Arduino\\libraries\\ESPAsync_WiFiManager_Lite\\src" "-IC:\\Users\\johnf\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\libraries\\WiFi\\src" "C:\\Users\\johnf\\AppData\\Local\\Temp\\arduino_build_518595\\sketch\\ESPAsync_WiFi_MQTT.ino.cpp" -o nul

Alternatives for ESPAsyncWebServer.h: []

ResolveLibrary(ESPAsyncWebServer.h)

  -> candidates: []om C:\Users\johnf\Documents\Arduino\libraries\ESPAsync_WiFiManager_Lite\examples\ESPAsync_WiFi_MQTT\defines.h:102:0,



Multiple libraries were found for "WiFi.h"

 Used: C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi

                 from C:\Users\johnf\Documents\Arduino\libraries\ESPAsync_WiFiManager_Lite\examples\ESPAsync_WiFi_MQTT\ESPAsync_WiFi_MQTT.ino:29:

 Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

C:\Users\johnf\Documents\Arduino\libraries\ESPAsync_WiFiManager_Lite\src/ESPAsync_WiFiManager_Lite.h:78:33: fatal error: ESPAsyncWebServer.h: No such file or directory

compilation terminated.

Using library ESPAsync_WiFiManager_Lite at version 1.5.1 in folder: C:\Users\johnf\Documents\Arduino\libraries\ESPAsync_WiFiManager_Lite 

Using library WiFi at version 1.0 in folder: C:\Users\johnf\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi 

exit status 1

Error compiling for board DOIT ESP32 DEVKIT V1.

Not working with ESP32 Core 2.0.X because of LittleFS?

Describe the bug

I can't use this library with ESP32 Core 2.0 or 2.0.1.

Steps to Reproduce

Update ESP32 Core to 2.0 or 2.0.1 and compile example.

Expected behavior

Compile and run

Actual behavior

I get compile errors if I compile and run because of LittleFS.

  • If I install the esp32 LittleFS library (which is supposed to not be required as its included on 2.0.X core) I still get errors and warnings of use built-in library.
  • If I rename all LITTLEFS words to LittleFS, my sketch compile but it wont work getting [WML] Invalid Stored WiFi Config Data errors in serial terminal.

Debug and AT-command log (if applicable)

EEPROM Flag read = 0xFFFE0001
SetFlag write = 0xFFFD0002
[WML] Invalid Stored WiFi Config Data

Screenshots

image

Information

Arduino IDE version: 1.8.13
ESP32 Core Version 2.0
OS: Windows 10

Please provide a minimal example

Hi, I would like to integrate your library into my project, but I am struggling to parse through the provided example.
Could you provide a minimal example how to use this library?

Load and save dynamic parameters

Would it be ok, if I make loadDynamicData() and saveDynamicData()public?
I'd like to change some of the dynamic parameters during runtime and save the values back to FS ...

loadDynamicData() because I like to use the parameters before begin().

The Config Portal does not automatically open after connecting to the access point

With ESPAsync_WiFiManager, after connecting to the ESP32 AP - my browser would automatically open the Configuration Portal page. After converting to ESPAsync_WiFiManager_Lite, this behavior no longer works and I have to manually open my browser and type in the default IP address (192.168.4.1). I'm not sure how this worked before but I did notice I no longer need to pass an AsyncDNSServer to the ESPAsync_WiFiManager_Lite constructer and wondered if that was part of the reason. Is there a way to get this convenience feature to work with the _Lite version?

How to extend with syntax ---> server.on("/get", HTTP_GET, [](AsyncWebServerRequest *request)

I discovered this ‘ESPAsync_WiFiManager_Lite’ project today, I find it great; It really makes it easy connecting to WiFi in Configuration Portal Mode.
What I don’t understand is: Once my ESP32 is effectively connected to my WiFi I want it to do “something”, specifically I want it to reply to GET requests to return whatever data
If this makes sense…
Another way to put it is once the WiFi is connected I want the module to serve AsyncWebServer on port 80 (else what the point of getting connected to the network if it’s not to serve data?)
I could I go about this?
I tried :
AsyncWebServer server(80);

then

server.on("/get", HTTP_GET, [](AsyncWebServerRequest *request){
      request->send(200, "text/plain", “Hello world");
});

But it does not work this way I think, I am confused with the various libraries.
A little help would be great.
Thank you very much in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.