From 5866967f69f1dc949348bafb98fcd34001b1d8bb Mon Sep 17 00:00:00 2001 From: Khoi Hoang <57012152+khoih-prog@users.noreply.github.com> Date: Wed, 19 May 2021 00:05:58 -0400 Subject: [PATCH] v1.9.1 to use ESP8266 core v3.0.0 ### Releases v1.9.1 1. Fix warnings and verify compatibility with new ESP8266 core v3.0.0 2. Autodetect ESP8266 core v1.7.4- or new ESP8266 core v3.0.0 to use the new breaking features --- CONTRIBUTING.md | 7 +- README.md | 85 +++++++++++-------- .../Async_AutoConnect/Async_AutoConnect.ino | 6 +- .../Async_AutoConnectWithFSParameters.ino | 6 +- ...AutoConnectWithFSParametersAndCustomIP.ino | 6 +- .../Async_AutoConnectWithFeedback.ino | 6 +- .../Async_AutoConnectWithFeedbackLED.ino | 6 +- .../Async_ConfigOnDRD_FS_MQTT_Ptr.ino | 6 +- .../Async_ConfigOnDRD_FS_MQTT_Ptr_Complex.ino | 6 +- .../Async_ConfigOnDRD_FS_MQTT_Ptr_Medium.ino | 6 +- .../Async_ConfigOnDoubleReset.ino | 6 +- .../Async_ConfigOnDoubleReset_TZ.ino | 6 +- .../Async_ConfigOnStartup.ino | 6 +- .../Async_ConfigOnSwitch.ino | 6 +- .../Async_ConfigOnSwitchFS.ino | 6 +- .../Async_ConfigOnSwitchFS_MQTT_Ptr.ino | 6 +- .../Async_ConfigPortalParamsOnSwitch.ino | 6 +- .../Async_ESP32_FSWebServer.ino | 6 +- .../Async_ESP32_FSWebServer_DRD.ino | 6 +- .../Async_ESP_FSWebServer.ino | 6 +- .../Async_ESP_FSWebServer_DRD.ino | 6 +- examples/ModelessConnect/ModelessConnect.ino | 2 +- .../ModelessWithInterrupts.ino | 4 +- library.json | 2 +- library.properties | 2 +- platformio/platformio.ini | 2 +- src/ESPAsync_WiFiManager-Impl.h | 21 +++-- src/ESPAsync_WiFiManager.h | 35 +++++++- src/ESPAsync_WiFiManager_Debug.h | 3 +- src_cpp/ESPAsync_WiFiManager.cpp | 21 +++-- src_cpp/ESPAsync_WiFiManager.h | 35 +++++++- src_cpp/ESPAsync_WiFiManager_Debug.h | 3 +- src_h/ESPAsync_WiFiManager-Impl.h | 21 +++-- src_h/ESPAsync_WiFiManager.h | 35 +++++++- src_h/ESPAsync_WiFiManager_Debug.h | 3 +- 35 files changed, 268 insertions(+), 127 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9f073d4..01fe05f5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p Please ensure to specify the following: * Arduino IDE version (e.g. 1.8.13) or Platform.io version -* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v2.7.4 or ESP32 v1.0.6) +* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.0 or ESP32 v1.0.6) * Contextual information (e.g. what you were trying to achieve) * Simplest possible steps to reproduce * Anything that might be relevant in your opinion, such as: @@ -27,9 +27,9 @@ Please ensure to specify the following: ``` Arduino IDE version: 1.8.13 -ESP8266 Core Version 2.7.4 +ESP8266 Core Version 3.0.0 OS: Ubuntu 20.04 LTS -Linux xy-Inspiron-3593 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux +Linux xy-Inspiron-3593 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Context: I encountered an endless loop while trying to connect to Local WiFi. @@ -40,6 +40,7 @@ Steps to reproduce: 3. ... 4. ... ``` + ### Sending Feature Requests Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful. diff --git a/README.md b/README.md index 1b8488db..84ce4c1b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ * [Why Async is better](#why-async-is-better) * [Currently supported Boards](#currently-supported-boards) * [Changelog](#changelog) + * [Releases v1.9.1](#releases-v191) * [Releases v1.9.0](#releases-v190) * [Releases v1.8.1](#releases-v181) * [Major Releases v1.8.0](#major-releases-v180) @@ -149,19 +150,19 @@ * [Async_ConfigOnDRD_ESP32_minimal](examples/Async_ConfigOnDRD_ESP32_minimal) * [Async_ConfigOnDRD_ESP8266_minimal](examples/Async_ConfigOnDRD_ESP8266_minimal) * [Example Async_ConfigOnDRD_FS_MQTT_Ptr](#example-async_configondrd_fs_mqtt_ptr) -* [Debug Terminal Output Samples](#debug-termimal-output-samples) +* [Debug Terminal Output Samples](#debug-terminal-output-samples) * [1. Async_ConfigOnDRD_FS_MQTT_Ptr on ESP32_DEV](#1-async_configondrd_fs_mqtt_ptr_medium-on-esp32_dev) - * [2. Async_ConfigOnDRD_FS_MQTT_Ptr on ESP8266_NODEMCU](#2-async_configondrd_fs_mqtt_ptr_complex-on-esp8266_nodemcu) + * [2. Async_ConfigOnDRD_FS_MQTT_Ptr on ESP8266_NODEMCU_ESP12E](#2-async_configondrd_fs_mqtt_ptr_complex-on-ESP8266_NODEMCU_ESP12E) * [3. Async_ConfigOnDoubleReset on ESP32_DEV](#3-async_configondoublereset-on-esp32_dev) - * [4. Async_ConfigOnDoubleReset on ESP8266_NODEMCU](#4-async_configondoublereset-on-esp8266_nodemcu) - * [5. Async_ESP_FSWebServer_DRD on ESP8266_NODEMCU](#5-async_esp_fswebserver_drd-on-esp8266_nodemcu) + * [4. Async_ConfigOnDoubleReset on ESP8266_NODEMCU_ESP12E](#4-async_configondoublereset-on-ESP8266_NODEMCU_ESP12E) + * [5. Async_ESP_FSWebServer_DRD on ESP8266_NODEMCU_ESP12E](#5-async_esp_fswebserver_drd-on-ESP8266_NODEMCU_ESP12E) * [6. Async_ESP32_FSWebServer_DRD on ESP32_DEV](#6-async_esp32_fswebserver_drd-on-esp32_dev) * [7. Async_ConfigOnDoubleReset on ESP32S2_DEV](#7-async_configondoublereset-on-esp32s2_dev) * [8. Async_ConfigOnDoubleReset_TZ on ESP32_DEV](#8-async_configondoublereset_tz-on-esp32_dev) * [8.1 DRD => Config Portal](#81-drd--config-portal) * [8.2 Data Saved => Connect to WiFi with correct local time, TZ set and using NTP](#82-data-saved--connect-to-wifi-with-correct-local-time-tz-set-and-using-ntp) * [8.3 Normal running with correct local time, TZ set and using NTP](#83-normal-running-with-correct-local-time-tz-set-and-using-ntp) - * [9. Async_ESP_FSWebServer_DRD on ESP8266_NODEMCU](#9-async_esp_fswebserver_drd-on-esp8266_nodemcu) + * [9. Async_ESP_FSWebServer_DRD on ESP8266_NODEMCU_ESP12E](#9-async_esp_fswebserver_drd-on-ESP8266_NODEMCU_ESP12E) * [9.1 DRD => Config Portal](#91-drd--config-portal) * [9.2 Data Saved => Connect to WiFi with correct local time, TZ set and using NTP](#92-data-saved--connect-to-wifi-with-correct-local-time-tz-set-and-using-ntp) * [9.3 Normal running with correct local time, TZ set and using NTP](#93-normal-running-with-correct-local-time-tz-set-and-using-ntp) @@ -226,6 +227,11 @@ This [**ESPAsync_WiFiManager** library](https://github.com/khoih-prog/ESPAsync_W ## Changelog +### Releases v1.9.1 + +1. Fix warnings and verify compatibility with new ESP8266 core v3.0.0 +2. Autodetect ESP8266 core v1.7.4- or new ESP8266 core v3.0.0 to use the new breaking features + ### Releases v1.9.0 1. Add WiFi `/scan` page. @@ -344,7 +350,7 @@ This [**ESPAsync_WiFiManager** library](https://github.com/khoih-prog/ESPAsync_W ## Prerequisites 1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software) - 2. [`ESP8266 Core 2.7.4+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/) + 2. [`ESP8266 Core 3.0.0+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/) 3. [`ESP32 Core 1.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/) 4. [`ESP32-S2/C3 Core 1.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-S2/C3-based boards. Must follow [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide). 5. [`ESPAsyncWebServer v1.2.3+`](https://github.com/me-no-dev/ESPAsyncWebServer) for all ESP32/ESP8266-based boards. @@ -2377,7 +2383,7 @@ ESPAsync_wifiManager.setRemoveDuplicateAPs(false); #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -3020,10 +3026,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) @@ -3719,7 +3725,7 @@ void loop() --- --- -### Debug Termimal Output Samples +### Debug Terminal Output Samples #### 1. [Async_ConfigOnDRD_FS_MQTT_Ptr_Medium](examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium) on ESP32_DEV @@ -3729,7 +3735,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Medium ``` Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.9.0 +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 Config File not found Can't read Config File, using default values @@ -3748,7 +3754,7 @@ Opening Configuration Portal. No timeout : DRD or No stored Credentials.. ``` Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.9.0 +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 Config File not found Can't read Config File, using default values @@ -3828,15 +3834,15 @@ TWWWW --- -#### 2. [Async_ConfigOnDRD_FS_MQTT_Ptr_Complex](examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex) on ESP8266_NODEMCU +#### 2. [Async_ConfigOnDRD_FS_MQTT_Ptr_Complex](examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex) on ESP8266_NODEMCU_ESP12E -This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Complex](examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex) on **ESP8266_NODEMCU 1.0.**. Config Portal was requested to input and save MQTT Credentials. The boards then connected to Adafruit MQTT Server successfully. +This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Complex](examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex) on **ESP8266_NODEMCU_ESP12E 1.0.**. Config Portal was requested to input and save MQTT Credentials. The boards then connected to Adafruit MQTT Server successfully. ##### 2.1 With Config Data => Run normally ``` -Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU -ESPAsync_WiFiManager v1.9.0 +Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU_ESP12E +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector Version v1.1.1 {"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"} Config File successfully parsed @@ -3875,8 +3881,8 @@ TWWWW WTWWW ##### 2.2. DRD => Config Portal ``` -Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU -ESPAsync_WiFiManager v1.9.0 +Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU_ESP12E +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector Version v1.1.1 {"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"} Config File successfully parsed @@ -3966,7 +3972,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/ ```cpp Starting Async_ConfigOnDoubleReset with DoubleResetDetect using SPIFFS on ESP32_DEV -ESPAsync_WiFiManager v1.9.0 +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS @@ -4019,13 +4025,13 @@ HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH ``` --- -#### 4. [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on ESP8266_NODEMCU +#### 4. [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on ESP8266_NODEMCU_ESP12E -This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on **ESP8266_NODEMCU.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. WiFi AP **HueNet1** is then lost, and board **autoreconnects** itself to backup WiFi AP **HueNet2**. +This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/Async_ConfigOnDoubleReset) on **ESP8266_NODEMCU_ESP12E.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. WiFi AP **HueNet1** is then lost, and board **autoreconnects** itself to backup WiFi AP **HueNet2**. ```cpp -Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU -ESPAsync_WiFiManager v1.9.0 +Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU_ESP12E +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS @@ -4079,13 +4085,13 @@ HHHHHHHHHH HHHHHHHHHH HHH --- -#### 5. [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on ESP8266_NODEMCU +#### 5. [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on ESP8266_NODEMCU_ESP12E -This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on **ESP8266_NODEMCU.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. +This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on **ESP8266_NODEMCU_ESP12E.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully. ```cpp -Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU -ESPAsync_WiFiManager v1.9.0 +Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 Opening / directory FS File: CanadaFlag_1.png, size: 40.25KB @@ -4163,7 +4169,7 @@ This is terminal debug output when running [Async_ESP32_FSWebServer_DRD](example ``` Starting Async_ESP32_FSWebServer_DRD using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.9.0 +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 FS File: /CanadaFlag_1.png, size: 40.25KB FS File: /CanadaFlag_2.png, size: 8.12KB @@ -4274,7 +4280,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/ ``` Starting Async_ConfigOnDoubleReset using LittleFS on ESP32S2_DEV -ESPAsync_WiFiManager v1.9.0 +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 ESP Self-Stored: SSID = HueNet1, Pass = 12345678 [WM] * Add SSID = HueNet1 , PW = 12345678 @@ -4311,7 +4317,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset_TZ](exampl ``` Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.9.0 +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 ESP Self-Stored: SSID = HueNet1, Pass = password [WM] * Add SSID = HueNet1 , PW = password @@ -4355,7 +4361,7 @@ Local Date/Time: Sat May 1 00:17:30 2021 ``` Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.9.0 +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 ESP Self-Stored: SSID = HueNet1, Pass = password [WM] * Add SSID = HueNet1 , PW = password @@ -4394,15 +4400,15 @@ Local Date/Time: Sat May 1 00:15:19 2021 --- -#### 9. [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on ESP8266_NODEMCU +#### 9. [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on ESP8266_NODEMCU_ESP12E -This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on **ESP8266_NODEMCU.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully, with correct local time, TZ set and using NTP +This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/Async_ESP_FSWebServer_DRD) on **ESP8266_NODEMCU_ESP12E.**. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi using new Static IP successfully, with correct local time, TZ set and using NTP #### 9.1 DRD => Config Portal ``` -Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU -ESPAsync_WiFiManager v1.9.0 +Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 Opening / directory FS File: drd.dat, size: 4B @@ -4474,8 +4480,8 @@ Local Date/Time: Sat May 1 03:12:54 2021 #### 9.3 Normal running with correct local time, TZ set and using NTP ``` -Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU -ESPAsync_WiFiManager v1.9.0 +Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E +ESPAsync_WiFiManager v1.9.1 ESP_DoubleResetDetector v1.1.1 Opening / directory FS File: drd.dat, size: 4B @@ -4565,6 +4571,11 @@ Submit issues to: [ESPAsync_WiFiManager issues](https://github.com/khoih-prog/ES ## Releases +### Releases v1.9.1 + +1. Fix warnings and verify compatibility with new ESP8266 core v3.0.0 +2. Autodetect ESP8266 core v1.7.4- or new ESP8266 core v3.0.0 to use the new breaking features + ### Releases v1.9.0 1. Add WiFi `/scan` page. diff --git a/examples/Async_AutoConnect/Async_AutoConnect.ino b/examples/Async_AutoConnect/Async_AutoConnect.ino index a599f3f5..f22b35e8 100644 --- a/examples/Async_AutoConnect/Async_AutoConnect.ino +++ b/examples/Async_AutoConnect/Async_AutoConnect.ino @@ -18,7 +18,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -499,10 +499,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino b/examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino index 7a4023f0..8400a54b 100644 --- a/examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino +++ b/examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino @@ -19,7 +19,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -708,10 +708,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino b/examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino index 78240751..22191c84 100644 --- a/examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino +++ b/examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino @@ -19,7 +19,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -548,10 +548,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_AutoConnectWithFeedback/Async_AutoConnectWithFeedback.ino b/examples/Async_AutoConnectWithFeedback/Async_AutoConnectWithFeedback.ino index 1f7dc94b..cd61ed65 100644 --- a/examples/Async_AutoConnectWithFeedback/Async_AutoConnectWithFeedback.ino +++ b/examples/Async_AutoConnectWithFeedback/Async_AutoConnectWithFeedback.ino @@ -18,7 +18,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -506,10 +506,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_AutoConnectWithFeedbackLED/Async_AutoConnectWithFeedbackLED.ino b/examples/Async_AutoConnectWithFeedbackLED/Async_AutoConnectWithFeedbackLED.ino index 462732bd..5d1db61c 100644 --- a/examples/Async_AutoConnectWithFeedbackLED/Async_AutoConnectWithFeedbackLED.ino +++ b/examples/Async_AutoConnectWithFeedbackLED/Async_AutoConnectWithFeedbackLED.ino @@ -19,7 +19,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -536,10 +536,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnDRD_FS_MQTT_Ptr/Async_ConfigOnDRD_FS_MQTT_Ptr.ino b/examples/Async_ConfigOnDRD_FS_MQTT_Ptr/Async_ConfigOnDRD_FS_MQTT_Ptr.ino index a1d312bd..f21114f9 100644 --- a/examples/Async_ConfigOnDRD_FS_MQTT_Ptr/Async_ConfigOnDRD_FS_MQTT_Ptr.ino +++ b/examples/Async_ConfigOnDRD_FS_MQTT_Ptr/Async_ConfigOnDRD_FS_MQTT_Ptr.ino @@ -31,7 +31,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -674,10 +674,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex.ino b/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex.ino index a3d0e7ac..ef264a83 100644 --- a/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex.ino +++ b/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex.ino @@ -31,7 +31,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 2 @@ -728,10 +728,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium.ino b/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium.ino index 960ced0a..f3183c25 100644 --- a/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium.ino +++ b/examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium/Async_ConfigOnDRD_FS_MQTT_Ptr_Medium.ino @@ -31,7 +31,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -711,10 +711,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino b/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino index 96232438..f052567f 100644 --- a/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino +++ b/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino @@ -42,7 +42,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 1 @@ -593,10 +593,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino b/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino index 8e349c02..e2f923b2 100644 --- a/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino +++ b/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino @@ -42,7 +42,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 1 @@ -593,10 +593,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnStartup/Async_ConfigOnStartup.ino b/examples/Async_ConfigOnStartup/Async_ConfigOnStartup.ino index e5dcb9be..da3d7102 100644 --- a/examples/Async_ConfigOnStartup/Async_ConfigOnStartup.ino +++ b/examples/Async_ConfigOnStartup/Async_ConfigOnStartup.ino @@ -33,7 +33,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -538,10 +538,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino b/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino index 0088ff36..e969783a 100644 --- a/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino +++ b/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino @@ -30,7 +30,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -656,10 +656,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino b/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino index 090520cf..0645a9af 100644 --- a/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino +++ b/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino @@ -53,7 +53,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -695,10 +695,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigOnSwitchFS_MQTT_Ptr/Async_ConfigOnSwitchFS_MQTT_Ptr.ino b/examples/Async_ConfigOnSwitchFS_MQTT_Ptr/Async_ConfigOnSwitchFS_MQTT_Ptr.ino index f8421f34..981c4a82 100644 --- a/examples/Async_ConfigOnSwitchFS_MQTT_Ptr/Async_ConfigOnSwitchFS_MQTT_Ptr.ino +++ b/examples/Async_ConfigOnSwitchFS_MQTT_Ptr/Async_ConfigOnSwitchFS_MQTT_Ptr.ino @@ -35,7 +35,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -733,10 +733,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino b/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino index 53e0468b..eb2c5b19 100644 --- a/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino +++ b/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino @@ -32,7 +32,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -670,10 +670,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino b/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino index 8011bfd0..a6bdd9df 100644 --- a/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino +++ b/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino @@ -34,7 +34,7 @@ #error This code is intended to run only on the ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -531,10 +531,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino b/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino index 81badfb0..0178c41c 100644 --- a/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino +++ b/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino @@ -34,7 +34,7 @@ #error This code is intended to run only on the ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -567,10 +567,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ESP_FSWebServer/Async_ESP_FSWebServer.ino b/examples/Async_ESP_FSWebServer/Async_ESP_FSWebServer.ino index 3a4e13ef..64abe811 100644 --- a/examples/Async_ESP_FSWebServer/Async_ESP_FSWebServer.ino +++ b/examples/Async_ESP_FSWebServer/Async_ESP_FSWebServer.ino @@ -34,7 +34,7 @@ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -527,10 +527,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/Async_ESP_FSWebServer_DRD/Async_ESP_FSWebServer_DRD.ino b/examples/Async_ESP_FSWebServer_DRD/Async_ESP_FSWebServer_DRD.ino index e622692e..28a8e932 100644 --- a/examples/Async_ESP_FSWebServer_DRD/Async_ESP_FSWebServer_DRD.ino +++ b/examples/Async_ESP_FSWebServer_DRD/Async_ESP_FSWebServer_DRD.ino @@ -34,7 +34,7 @@ #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -548,10 +548,10 @@ bool loadConfigData() File file = FileFS.open(CONFIG_FILENAME, "r"); LOGERROR(F("LoadWiFiCfgFile ")); - memset(&WM_config, 0, sizeof(WM_config)); + memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 - memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); + memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) diff --git a/examples/ModelessConnect/ModelessConnect.ino b/examples/ModelessConnect/ModelessConnect.ino index b282f716..70ee6766 100644 --- a/examples/ModelessConnect/ModelessConnect.ino +++ b/examples/ModelessConnect/ModelessConnect.ino @@ -19,7 +19,7 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 diff --git a/examples/ModelessWithInterrupts/ModelessWithInterrupts.ino b/examples/ModelessWithInterrupts/ModelessWithInterrupts.ino index b2bb6cef..89bae3c7 100644 --- a/examples/ModelessWithInterrupts/ModelessWithInterrupts.ino +++ b/examples/ModelessWithInterrupts/ModelessWithInterrupts.ino @@ -19,7 +19,7 @@ #error This code is intended to run on the ESP8266! Please check your Tools->Board setting. #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1" // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3 @@ -221,7 +221,7 @@ const uint32_t callCycleCount = ESP.getCpuFreqMHz() * 1024 / 8; WiFi, ESP or EEPROM, and we do too, there is a very good chance a reset will happen. */ -void ICACHE_RAM_ATTR interruptFunction() +void IRAM_ATTR interruptFunction() { /* This is equivalent to: diff --git a/library.json b/library.json index 04ca0d3c..72dc8764 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ESPAsync_WiFiManager", - "version": "1.9.0", + "version": "1.9.1", "keywords": "wifi, wi-fi, WiFiManager, esp8266, esp32, esp32-s2, esp32-c3, AsyncWebServer, Async-WebServer, Async-WiFiManager, MultiWiFi, Async, Communication, Credentials, Config-Portal, DoubleReset, MultiReset, littlefs, spiffs, eeprom, dns-server, iot", "description": "ESP32 (including ESP32-S2 and ESP32-C3), ESP8266 WiFi Connection Manager using AsyncWebServer, with enhanced GUI and fallback Web ConfigPortal. This Library is used for configuring ESP32 (including ESP32-S2 and ESP32-C3), ESP8266 modules WiFi Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP channel. Now with MultiWiFi auto(Re)connect, configurable CORS Header and auto-Timezone features.", "authors": diff --git a/library.properties b/library.properties index 4db560a2..991d0771 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESPAsync_WiFiManager -version=1.9.0 +version=1.9.1 author=Khoi Hoang maintainer=Khoi Hoang license=MIT diff --git a/platformio/platformio.ini b/platformio/platformio.ini index 70366e06..5e05ca9e 100644 --- a/platformio/platformio.ini +++ b/platformio/platformio.ini @@ -34,7 +34,7 @@ lib_deps = ; AsyncTCP@>=1.1.1 ; ESP_DoubleResetDetector@>=1.1.1 ; LittleFS_esp32@>=1.0.6 -; PlatformIO 5.x, uncomment the below lines and comment the lines above +; PlatformIO 5.x me-no-dev/ESP Async WebServer@>=1.2.3 me-no-dev/ESPAsyncTCP@>=1.2.2 me-no-dev/AsyncTCP@>=1.1.1 diff --git a/src/ESPAsync_WiFiManager-Impl.h b/src/ESPAsync_WiFiManager-Impl.h index 1b8940e5..5ee7d3e1 100644 --- a/src/ESPAsync_WiFiManager-Impl.h +++ b/src/ESPAsync_WiFiManager-Impl.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once @@ -1105,7 +1106,11 @@ wl_status_t ESPAsync_WiFiManager::waitForConnectResult() LOGERROR(F("Connection timed out")); } +#if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + if (status == WL_CONNECTED || status == WL_CONNECT_FAILED || status == WL_WRONG_PASSWORD) +#else if (status == WL_CONNECTED || status == WL_CONNECT_FAILED) +#endif { keepConnecting = false; } @@ -1146,6 +1151,12 @@ const char* ESPAsync_WiFiManager::getStatus(int status) return "WL_CONNECTED"; case WL_CONNECT_FAILED: return "WL_CONNECT_FAILED"; + +#if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + case WL_WRONG_PASSWORD: + return "WL_WRONG_PASSWORD"; +#endif + case WL_DISCONNECTED: return "WL_DISCONNECTED"; default: @@ -1247,7 +1258,7 @@ void ESPAsync_WiFiManager::setAPStaticIPConfig(WiFi_AP_IPConfig WM_AP_IPconfig) { LOGINFO(F("setAPStaticIPConfig")); - memcpy(&_WiFi_AP_IPconfig, &WM_AP_IPconfig, sizeof(_WiFi_AP_IPconfig)); + memcpy((void *) &_WiFi_AP_IPconfig, &WM_AP_IPconfig, sizeof(_WiFi_AP_IPconfig)); } ////////////////////////////////////////// @@ -1256,7 +1267,7 @@ void ESPAsync_WiFiManager::getAPStaticIPConfig(WiFi_AP_IPConfig &WM_AP_IPconfig { LOGINFO(F("getAPStaticIPConfig")); - memcpy(&WM_AP_IPconfig, &_WiFi_AP_IPconfig, sizeof(WM_AP_IPconfig)); + memcpy((void *) &WM_AP_IPconfig, &_WiFi_AP_IPconfig, sizeof(WM_AP_IPconfig)); } ////////////////////////////////////////// @@ -1275,7 +1286,7 @@ void ESPAsync_WiFiManager::setSTAStaticIPConfig(WiFi_STA_IPConfig WM_STA_IPconfi { LOGINFO(F("setSTAStaticIPConfig")); - memcpy(&_WiFi_STA_IPconfig, &WM_STA_IPconfig, sizeof(_WiFi_STA_IPconfig)); + memcpy((void *) &_WiFi_STA_IPconfig, &WM_STA_IPconfig, sizeof(_WiFi_STA_IPconfig)); } ////////////////////////////////////////// @@ -1284,7 +1295,7 @@ void ESPAsync_WiFiManager::getSTAStaticIPConfig(WiFi_STA_IPConfig &WM_STA_IPconf { LOGINFO(F("getSTAStaticIPConfig")); - memcpy(&WM_STA_IPconfig, &_WiFi_STA_IPconfig, sizeof(WM_STA_IPconfig)); + memcpy((void *) &WM_STA_IPconfig, &_WiFi_STA_IPconfig, sizeof(WM_STA_IPconfig)); } diff --git a/src/ESPAsync_WiFiManager.h b/src/ESPAsync_WiFiManager.h index 95346957..6b017309 100644 --- a/src/ESPAsync_WiFiManager.h +++ b/src/ESPAsync_WiFiManager.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once @@ -60,7 +61,37 @@ #define USING_ESP32_C3 true #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.9.1" + +#if ESP8266 + #if (ARDUINO_ESP8266_GIT_VER == 0xefb0341a) + #define USING_ESP8266_CORE_VERSION 30000 + #warning USING_ESP8266_CORE_VERSION "3.0.0" + #elif (ARDUINO_ESP8266_GIT_VER == 0x2843a5ac) + #define USING_ESP8266_CORE_VERSION 20704 + #warning USING_ESP8266_CORE_VERSION "2.7.4" + #elif (ARDUINO_ESP8266_GIT_VER == 0x5d3af165) + #define USING_ESP8266_CORE_VERSION 20703 + #elif (ARDUINO_ESP8266_GIT_VER == 0x39c79d9b) + #define USING_ESP8266_CORE_VERSION 20702 + #elif (ARDUINO_ESP8266_GIT_VER == 0xa5432625) + #define USING_ESP8266_CORE_VERSION 20701 + #elif (ARDUINO_ESP8266_GIT_VER == 0x3d128e5c) + #define USING_ESP8266_CORE_VERSION 20603 + #elif (ARDUINO_ESP8266_GIT_VER == 0x482516e3) + #define USING_ESP8266_CORE_VERSION 20602 + #elif (ARDUINO_ESP8266_GIT_VER == 0x482516e3) + #define USING_ESP8266_CORE_VERSION 20601 + #elif (ARDUINO_ESP8266_GIT_VER == 0x643ec203) + #define USING_ESP8266_CORE_VERSION 20600 + #elif (ARDUINO_ESP8266_GIT_VER == 0x8b899c12) + #define USING_ESP8266_CORE_VERSION 20502 + #elif (ARDUINO_ESP8266_GIT_VER == 0x00000000) + #define USING_ESP8266_CORE_VERSION 20402 + #elif (ARDUINO_ESP8266_GIT_VER == 0x643ec203) + #define USING_ESP8266_CORE_VERSION 0 + #endif +#endif #include "ESPAsync_WiFiManager_Debug.h" diff --git a/src/ESPAsync_WiFiManager_Debug.h b/src/ESPAsync_WiFiManager_Debug.h index c53718a6..7e01aba7 100644 --- a/src/ESPAsync_WiFiManager_Debug.h +++ b/src/ESPAsync_WiFiManager_Debug.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once diff --git a/src_cpp/ESPAsync_WiFiManager.cpp b/src_cpp/ESPAsync_WiFiManager.cpp index e48d2964..f09dc647 100644 --- a/src_cpp/ESPAsync_WiFiManager.cpp +++ b/src_cpp/ESPAsync_WiFiManager.cpp @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #include "ESPAsync_WiFiManager.h" @@ -1102,7 +1103,11 @@ wl_status_t ESPAsync_WiFiManager::waitForConnectResult() LOGERROR(F("Connection timed out")); } +#if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + if (status == WL_CONNECTED || status == WL_CONNECT_FAILED || status == WL_WRONG_PASSWORD) +#else if (status == WL_CONNECTED || status == WL_CONNECT_FAILED) +#endif { keepConnecting = false; } @@ -1143,6 +1148,12 @@ const char* ESPAsync_WiFiManager::getStatus(int status) return "WL_CONNECTED"; case WL_CONNECT_FAILED: return "WL_CONNECT_FAILED"; + +#if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + case WL_WRONG_PASSWORD: + return "WL_WRONG_PASSWORD"; +#endif + case WL_DISCONNECTED: return "WL_DISCONNECTED"; default: @@ -1244,7 +1255,7 @@ void ESPAsync_WiFiManager::setAPStaticIPConfig(WiFi_AP_IPConfig WM_AP_IPconfig) { LOGINFO(F("setAPStaticIPConfig")); - memcpy(&_WiFi_AP_IPconfig, &WM_AP_IPconfig, sizeof(_WiFi_AP_IPconfig)); + memcpy((void *) &_WiFi_AP_IPconfig, &WM_AP_IPconfig, sizeof(_WiFi_AP_IPconfig)); } ////////////////////////////////////////// @@ -1253,7 +1264,7 @@ void ESPAsync_WiFiManager::getAPStaticIPConfig(WiFi_AP_IPConfig &WM_AP_IPconfig { LOGINFO(F("getAPStaticIPConfig")); - memcpy(&WM_AP_IPconfig, &_WiFi_AP_IPconfig, sizeof(WM_AP_IPconfig)); + memcpy((void *) &WM_AP_IPconfig, &_WiFi_AP_IPconfig, sizeof(WM_AP_IPconfig)); } ////////////////////////////////////////// @@ -1272,7 +1283,7 @@ void ESPAsync_WiFiManager::setSTAStaticIPConfig(WiFi_STA_IPConfig WM_STA_IPconfi { LOGINFO(F("setSTAStaticIPConfig")); - memcpy(&_WiFi_STA_IPconfig, &WM_STA_IPconfig, sizeof(_WiFi_STA_IPconfig)); + memcpy((void *) &_WiFi_STA_IPconfig, &WM_STA_IPconfig, sizeof(_WiFi_STA_IPconfig)); } ////////////////////////////////////////// @@ -1281,7 +1292,7 @@ void ESPAsync_WiFiManager::getSTAStaticIPConfig(WiFi_STA_IPConfig &WM_STA_IPconf { LOGINFO(F("getSTAStaticIPConfig")); - memcpy(&WM_STA_IPconfig, &_WiFi_STA_IPconfig, sizeof(WM_STA_IPconfig)); + memcpy((void *) &WM_STA_IPconfig, &_WiFi_STA_IPconfig, sizeof(WM_STA_IPconfig)); } diff --git a/src_cpp/ESPAsync_WiFiManager.h b/src_cpp/ESPAsync_WiFiManager.h index ea623499..6430274c 100644 --- a/src_cpp/ESPAsync_WiFiManager.h +++ b/src_cpp/ESPAsync_WiFiManager.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once @@ -60,7 +61,37 @@ #define USING_ESP32_C3 true #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.9.1" + +#if ESP8266 + #if (ARDUINO_ESP8266_GIT_VER == 0xefb0341a) + #define USING_ESP8266_CORE_VERSION 30000 + #warning USING_ESP8266_CORE_VERSION "3.0.0" + #elif (ARDUINO_ESP8266_GIT_VER == 0x2843a5ac) + #define USING_ESP8266_CORE_VERSION 20704 + #warning USING_ESP8266_CORE_VERSION "2.7.4" + #elif (ARDUINO_ESP8266_GIT_VER == 0x5d3af165) + #define USING_ESP8266_CORE_VERSION 20703 + #elif (ARDUINO_ESP8266_GIT_VER == 0x39c79d9b) + #define USING_ESP8266_CORE_VERSION 20702 + #elif (ARDUINO_ESP8266_GIT_VER == 0xa5432625) + #define USING_ESP8266_CORE_VERSION 20701 + #elif (ARDUINO_ESP8266_GIT_VER == 0x3d128e5c) + #define USING_ESP8266_CORE_VERSION 20603 + #elif (ARDUINO_ESP8266_GIT_VER == 0x482516e3) + #define USING_ESP8266_CORE_VERSION 20602 + #elif (ARDUINO_ESP8266_GIT_VER == 0x482516e3) + #define USING_ESP8266_CORE_VERSION 20601 + #elif (ARDUINO_ESP8266_GIT_VER == 0x643ec203) + #define USING_ESP8266_CORE_VERSION 20600 + #elif (ARDUINO_ESP8266_GIT_VER == 0x8b899c12) + #define USING_ESP8266_CORE_VERSION 20502 + #elif (ARDUINO_ESP8266_GIT_VER == 0x00000000) + #define USING_ESP8266_CORE_VERSION 20402 + #elif (ARDUINO_ESP8266_GIT_VER == 0x643ec203) + #define USING_ESP8266_CORE_VERSION 0 + #endif +#endif #include "ESPAsync_WiFiManager_Debug.h" diff --git a/src_cpp/ESPAsync_WiFiManager_Debug.h b/src_cpp/ESPAsync_WiFiManager_Debug.h index c53718a6..7e01aba7 100644 --- a/src_cpp/ESPAsync_WiFiManager_Debug.h +++ b/src_cpp/ESPAsync_WiFiManager_Debug.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once diff --git a/src_h/ESPAsync_WiFiManager-Impl.h b/src_h/ESPAsync_WiFiManager-Impl.h index 1b8940e5..5ee7d3e1 100644 --- a/src_h/ESPAsync_WiFiManager-Impl.h +++ b/src_h/ESPAsync_WiFiManager-Impl.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once @@ -1105,7 +1106,11 @@ wl_status_t ESPAsync_WiFiManager::waitForConnectResult() LOGERROR(F("Connection timed out")); } +#if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + if (status == WL_CONNECTED || status == WL_CONNECT_FAILED || status == WL_WRONG_PASSWORD) +#else if (status == WL_CONNECTED || status == WL_CONNECT_FAILED) +#endif { keepConnecting = false; } @@ -1146,6 +1151,12 @@ const char* ESPAsync_WiFiManager::getStatus(int status) return "WL_CONNECTED"; case WL_CONNECT_FAILED: return "WL_CONNECT_FAILED"; + +#if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + case WL_WRONG_PASSWORD: + return "WL_WRONG_PASSWORD"; +#endif + case WL_DISCONNECTED: return "WL_DISCONNECTED"; default: @@ -1247,7 +1258,7 @@ void ESPAsync_WiFiManager::setAPStaticIPConfig(WiFi_AP_IPConfig WM_AP_IPconfig) { LOGINFO(F("setAPStaticIPConfig")); - memcpy(&_WiFi_AP_IPconfig, &WM_AP_IPconfig, sizeof(_WiFi_AP_IPconfig)); + memcpy((void *) &_WiFi_AP_IPconfig, &WM_AP_IPconfig, sizeof(_WiFi_AP_IPconfig)); } ////////////////////////////////////////// @@ -1256,7 +1267,7 @@ void ESPAsync_WiFiManager::getAPStaticIPConfig(WiFi_AP_IPConfig &WM_AP_IPconfig { LOGINFO(F("getAPStaticIPConfig")); - memcpy(&WM_AP_IPconfig, &_WiFi_AP_IPconfig, sizeof(WM_AP_IPconfig)); + memcpy((void *) &WM_AP_IPconfig, &_WiFi_AP_IPconfig, sizeof(WM_AP_IPconfig)); } ////////////////////////////////////////// @@ -1275,7 +1286,7 @@ void ESPAsync_WiFiManager::setSTAStaticIPConfig(WiFi_STA_IPConfig WM_STA_IPconfi { LOGINFO(F("setSTAStaticIPConfig")); - memcpy(&_WiFi_STA_IPconfig, &WM_STA_IPconfig, sizeof(_WiFi_STA_IPconfig)); + memcpy((void *) &_WiFi_STA_IPconfig, &WM_STA_IPconfig, sizeof(_WiFi_STA_IPconfig)); } ////////////////////////////////////////// @@ -1284,7 +1295,7 @@ void ESPAsync_WiFiManager::getSTAStaticIPConfig(WiFi_STA_IPConfig &WM_STA_IPconf { LOGINFO(F("getSTAStaticIPConfig")); - memcpy(&WM_STA_IPconfig, &_WiFi_STA_IPconfig, sizeof(WM_STA_IPconfig)); + memcpy((void *) &WM_STA_IPconfig, &_WiFi_STA_IPconfig, sizeof(WM_STA_IPconfig)); } diff --git a/src_h/ESPAsync_WiFiManager.h b/src_h/ESPAsync_WiFiManager.h index 95346957..6b017309 100644 --- a/src_h/ESPAsync_WiFiManager.h +++ b/src_h/ESPAsync_WiFiManager.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once @@ -60,7 +61,37 @@ #define USING_ESP32_C3 true #endif -#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.9.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.9.1" + +#if ESP8266 + #if (ARDUINO_ESP8266_GIT_VER == 0xefb0341a) + #define USING_ESP8266_CORE_VERSION 30000 + #warning USING_ESP8266_CORE_VERSION "3.0.0" + #elif (ARDUINO_ESP8266_GIT_VER == 0x2843a5ac) + #define USING_ESP8266_CORE_VERSION 20704 + #warning USING_ESP8266_CORE_VERSION "2.7.4" + #elif (ARDUINO_ESP8266_GIT_VER == 0x5d3af165) + #define USING_ESP8266_CORE_VERSION 20703 + #elif (ARDUINO_ESP8266_GIT_VER == 0x39c79d9b) + #define USING_ESP8266_CORE_VERSION 20702 + #elif (ARDUINO_ESP8266_GIT_VER == 0xa5432625) + #define USING_ESP8266_CORE_VERSION 20701 + #elif (ARDUINO_ESP8266_GIT_VER == 0x3d128e5c) + #define USING_ESP8266_CORE_VERSION 20603 + #elif (ARDUINO_ESP8266_GIT_VER == 0x482516e3) + #define USING_ESP8266_CORE_VERSION 20602 + #elif (ARDUINO_ESP8266_GIT_VER == 0x482516e3) + #define USING_ESP8266_CORE_VERSION 20601 + #elif (ARDUINO_ESP8266_GIT_VER == 0x643ec203) + #define USING_ESP8266_CORE_VERSION 20600 + #elif (ARDUINO_ESP8266_GIT_VER == 0x8b899c12) + #define USING_ESP8266_CORE_VERSION 20502 + #elif (ARDUINO_ESP8266_GIT_VER == 0x00000000) + #define USING_ESP8266_CORE_VERSION 20402 + #elif (ARDUINO_ESP8266_GIT_VER == 0x643ec203) + #define USING_ESP8266_CORE_VERSION 0 + #endif +#endif #include "ESPAsync_WiFiManager_Debug.h" diff --git a/src_h/ESPAsync_WiFiManager_Debug.h b/src_h/ESPAsync_WiFiManager_Debug.h index c53718a6..7e01aba7 100644 --- a/src_h/ESPAsync_WiFiManager_Debug.h +++ b/src_h/ESPAsync_WiFiManager_Debug.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.9.0 + Version: 1.9.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -39,6 +39,7 @@ 1.8.0 K Hoang 30/04/2021 Set _timezoneName. Add support to new ESP32-S2 (METRO_ESP32S2, FUNHOUSE_ESP32S2, etc.) 1.8.1 K Hoang 06/05/2021 Fix bug. Don't display invalid time when not synch yet. 1.9.0 K Hoang 08/05/2021 Add WiFi /scan page. Fix timezoneName not displayed in Info page. Clean up. + 1.9.1 K Hoang 18/05/2021 Fix warnings with ESP8266 core v3.0.0 *****************************************************************************************************************************/ #pragma once