From 2fbd1850934f6cae2320e7c05210c730fe4f2f38 Mon Sep 17 00:00:00 2001 From: Khoi Hoang <57012152+khoih-prog@users.noreply.github.com> Date: Thu, 10 Feb 2022 22:54:48 -0500 Subject: [PATCH] v1.8.0 to add support to `ESP32-S3` ### Release v1.8.0 1. Add support to `ESP32-S3` (`ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3`, etc.) using [ESP32 core, esp32-s3-support branch, v2.0.2+](https://github.com/espressif/arduino-esp32/tree/esp32-s3-support) --- CONTRIBUTING.md | 2 +- README.md | 54 +++++++++++++++++++++++++++++--- changelog.md | 5 +++ keywords.txt | 7 +++++ library.json | 11 ++++--- library.properties | 6 ++-- platformio/platformio.ini | 8 ++--- src/ESP_WiFiManager_Lite.h | 17 ++++++++-- src/ESP_WiFiManager_Lite_Debug.h | 3 +- 9 files changed, 93 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d41c87..0c58385 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ Please ensure to specify the following: Arduino IDE version: 1.8.19 ESP8266 Core Version 3.0.2 OS: Ubuntu 20.04 LTS -Linux Inspiron 5.4.0-92-generic #103-Ubuntu SMP Fri Nov 26 16:13:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux +Linux xy-Inspiron-3593 5.4.0-99-generic #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Context: The board couldn't autoreconnect to Local Blynk Server after router power recycling. diff --git a/README.md b/README.md index 9b7e9f7..efa8f2f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing) [![GitHub issues](https://img.shields.io/github/issues/khoih-prog/ESP_WiFiManager_Lite.svg)](http://github.com/khoih-prog/ESP_WiFiManager_Lite/issues) -Buy Me A Coffee +Buy Me A Coffee --- --- @@ -84,6 +84,7 @@ * [5. ESP_WiFi_MQTT on ESP32_DEV to demo WiFi Scan](#5-esp_wifi_mqtt-on-esp32_dev-to-demo-wifi-scan) * [5.1 MRD/DRD => Open Config Portal](#51-mrddrd--open-config-portal) * [5.2 Config Data Saved => Connection to Adafruit MQTT](#52-config-data-saved--connection-to-adafruit-mqtt) + * [6. ESP_WiFi on ESP32S3_DEV](#6-ESP_WiFi-on-ESP32S3_DEV) **New** * [Debug](#debug) * [Troubleshooting](#troubleshooting) * [Issues](#issues) @@ -137,6 +138,7 @@ This [**ESP_WiFiManager_Lite** library](https://github.com/khoih-prog/ESP_WiFiMa 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 or SPIFFS**. + 4. **ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS**. --- --- @@ -146,8 +148,8 @@ This [**ESP_WiFiManager_Lite** library](https://github.com/khoih-prog/ESP_WiFiMa 1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest) 2. [`ESP32 Core 2.0.2+`](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/) 3. [`ESP8266 Core 3.0.2+`](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/). SPIFFS is deprecated from ESP8266 core 2.7.1+, to use LittleFS. - 4. [`ESP_DoubleResetDetector v1.2.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector). - 5. [`ESP_MultiResetDetector v1.2.1+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector). + 4. [`ESP_DoubleResetDetector v1.3.0+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector). + 5. [`ESP_MultiResetDetector v1.3.0+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector). 6. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS with ESP32 core v1.0.4-. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [ESP32 core v1.0.6+](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS) and you don't need to install it if using ESP32 core v1.0.6+ --- @@ -171,7 +173,7 @@ You can also use this link [![arduino-library-badge](https://www.ardu-badge.com/ 1. Install [VS Code](https://code.visualstudio.com/) 2. Install [PlatformIO](https://platformio.org/platformio-ide) -3. Install [**ESP_WiFiManager_Lite** library](https://platformio.org/lib/show/11771/ESP_WiFiManager_Lite) by using [Library Manager](https://platformio.org/lib/show/11771/ESP_WiFiManager_Lite/installation). Search for **ESP_WiFiManager_Lite** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22) +3. Install [**ESP_WiFiManager_Lite** library](https://registry.platformio.org/libraries/khoih-prog/ESP_WiFiManager_Lite) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/ESP_WiFiManager_Lite/installation). Search for **ESP_WiFiManager_Lite** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22) 4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html) @@ -1921,6 +1923,48 @@ WiFi MQTT connection successful! TWTWTWTW TWTW ``` +--- + +### 6. [ESP_WiFi](examples/ESP_WiFi) on ESP32S3_DEV + + +This is the terminal output when running [**ESP_WiFi**](examples/ESP_WiFi) example on **ESP32S3_DEV** + + +``` +Starting ESP_WiFi using LittleFS on ESP32S3_DEV +ESP_WiFiManager_Lite v1.8.0 +ESP_MultiResetDetector v1.3.0 +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=jenniqqs +[WML] SSID1=HueNet2,PW1=jenniqqs +[WML] BName=ESP32_S3 +[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=jenniqqs +[WML] SSID1=HueNet2,PW1=jenniqqs +[WML] BName=ESP32_S3 +[WML] WiFi connected after time: 0 +[WML] SSID=HueNet1,RSSI=-23 +[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 +HHH +``` + --- --- @@ -1996,6 +2040,8 @@ Submit issues to: [ESP_WiFiManager_Lite issues](https://github.com/khoih-prog/ES 25. Ready for ESP32 core v2.0.0+ 26. Fix ESP8266 bug not easy to connect to Config Portal for ESP8266 core v3.0.0+ 27. Fix the blocking issue in loop() with configurable `WIFI_RECON_INTERVAL` +28. Add support to **ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS** + --- --- diff --git a/changelog.md b/changelog.md index c518b4e..86a713a 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ ## Table of Contents * [Changelog](#changelog) + * [Release v1.8.0](#release-v180) * [Release v1.7.0](#release-v170) * [Release v1.6.0](#release-v160) * [Release v1.5.1](#release-v151) @@ -27,6 +28,10 @@ ## Changelog +### Release v1.8.0 + +1. Add support to `ESP32-S3` (`ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3`, etc.) using [ESP32 core, esp32-s3-support branch, v2.0.2+](https://github.com/espressif/arduino-esp32/tree/esp32-s3-support) + ### Release v1.7.0 1. Fix ESP8266 bug not easy to connect to Config Portal for ESP8266 core v3.0.0+ diff --git a/keywords.txt b/keywords.txt index 8e48af6..fd88ad2 100644 --- a/keywords.txt +++ b/keywords.txt @@ -48,6 +48,13 @@ getCORSHeader KEYWORD2 # LITERAL1 +ESP_WIFI_MANAGER_LITE_VERSION LITERAL1 + +ESP_WIFI_MANAGER_LITE_VERSION_MAJOR LITERAL1 +ESP_WIFI_MANAGER_LITE_VERSION_MINOR LITERAL1 +ESP_WIFI_MANAGER_LITE_VERSION_PATCH LITERAL1 +ESP_WIFI_MANAGER_LITE_VERSION_INT LITERAL1 + CONFIG_DATA_SIZE LITERAL1 NUM_MENU_ITEMS LITERAL1 ESP_WM_LITE_HTML_HEAD LITERAL1 diff --git a/library.json b/library.json index 2b8ad96..f3a7569 100644 --- a/library.json +++ b/library.json @@ -1,8 +1,8 @@ { "name": "ESP_WiFiManager_Lite", - "version": "1.7.0", - "keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, WiFiManager, esp8266, esp32, esp32-s2, esp32-c3, Communication, iot, credentials, persistent, config-portal, DoubleReset, MultiReset, DoubleResetDetector, littlefs, spiffs, eeprom, light-weight", - "description": "Library 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. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.", + "version": "1.8.0", + "keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, WiFiManager, esp8266, esp32, esp32-s2, esp32-s3, esp32-c3, Communication, iot, credentials, persistent, config-portal, DoubleReset, MultiReset, DoubleResetDetector, littlefs, spiffs, eeprom, light-weight", + "description": "Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2, ESP32-S3 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. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header", "authors": { "name": "Khoi Hoang", @@ -27,13 +27,13 @@ { "owner": "khoih-prog", "name": "ESP_DoubleResetDetector", - "version": "^1.2.1", + "version": "^1.3.0", "platforms": ["espressif8266", "espressif32"] }, { "owner": "khoih-prog", "name": "ESP_MultiResetDetector", - "version": "^1.2.1", + "version": "^1.3.0", "platforms": ["espressif8266", "espressif32"] }, { @@ -43,6 +43,7 @@ "platforms": ["espressif32"] } ], + "license": "MIT", "frameworks": "*", "platforms": ["espressif8266", "espressif32"], "examples": "examples/*/*/*.ino", diff --git a/library.properties b/library.properties index 3c5a96c..dda97ef 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ name=ESP_WiFiManager_Lite -version=1.7.0 +version=1.8.0 author=Khoi Hoang maintainer=Khoi Hoang license=MIT -sentence=Light-Weight MultiWiFi/Credentials Manager for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards. Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters. -paragraph=Library 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. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header. +sentence=Light-Weight MultiWiFi/Credentials Manager for ESP32 (including ESP32-S2, ESP32-S3 and ESP32-C3) and ESP8266 boards. Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters. +paragraph=Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2, ESP32-S3 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. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header. category=Communication url=https://github.com/khoih-prog/ESP_WiFiManager_Lite architectures=esp8266,esp32 diff --git a/platformio/platformio.ini b/platformio/platformio.ini index f597f95..13a830c 100644 --- a/platformio/platformio.ini +++ b/platformio/platformio.ini @@ -32,12 +32,12 @@ lib_compat_mode = strict lib_deps = ; PlatformIO 4.x -; ESP_DoubleResetDetector@>=1.2.1 -; ESP_MultiResetDetector@>=1.2.1 +; ESP_DoubleResetDetector@>=1.3.0 +; ESP_MultiResetDetector@>=1.3.0 ; LittleFS_esp32@>=1.0.6 ; PlatformIO 5.x - khoih-prog/ESP_DoubleResetDetector@>=1.2.1 - khoih-prog/ESP_MultiResetDetector@>=1.2.1 + khoih-prog/ESP_DoubleResetDetector@>=1.3.0 + khoih-prog/ESP_MultiResetDetector@>=1.3.0 lorol/LittleFS_esp32@>=1.0.6 diff --git a/src/ESP_WiFiManager_Lite.h b/src/ESP_WiFiManager_Lite.h index 2d4d38a..0f2f4b7 100644 --- a/src/ESP_WiFiManager_Lite.h +++ b/src/ESP_WiFiManager_Lite.h @@ -9,7 +9,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager_Lite Licensed under MIT license - Version: 1.7.0 + Version: 1.8.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -22,6 +22,7 @@ 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` 1.6.0 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library. Fix bug. 1.7.0 K Hoang 08/01/2022 Fix the blocking issue in loop() with configurable WIFI_RECON_INTERVAL + 1.8.0 K Hoang 10/02/2022 Add support to new ESP32-S3 *****************************************************************************************************************************/ #pragma once @@ -39,9 +40,21 @@ #elif ( ARDUINO_ESP32C3_DEV ) #warning Using ESP32_C3. To follow library instructions to install esp32-c3 core. Only SPIFFS and EEPROM OK. #define USING_ESP32_C3 true +#elif ( defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32_S3_BOX) || defined(ARDUINO_TINYS3) || \ + defined(ARDUINO_PROS3) || defined(ARDUINO_FEATHERS3) ) + #warning Using ESP32_S3. To install esp32-s3-support branch if using core v2.0.2-. + #define USING_ESP32_S3 true #endif -#define ESP_WIFI_MANAGER_LITE_VERSION "ESP_WiFiManager_Lite v1.7.0" +#ifndef ESP_WIFI_MANAGER_LITE_VERSION + #define ESP_WIFI_MANAGER_LITE_VERSION "ESP_WiFiManager_Lite v1.8.0" + + #define ESP_WIFI_MANAGER_LITE_VERSION_MAJOR 1 + #define ESP_WIFI_MANAGER_LITE_VERSION_MINOR 8 + #define ESP_WIFI_MANAGER_LITE_VERSION_PATCH 0 + + #define ESP_WIFI_MANAGER_LITE_VERSION_INT 1008000 +#endif #ifdef ESP8266 diff --git a/src/ESP_WiFiManager_Lite_Debug.h b/src/ESP_WiFiManager_Lite_Debug.h index d27db3f..12139dc 100644 --- a/src/ESP_WiFiManager_Lite_Debug.h +++ b/src/ESP_WiFiManager_Lite_Debug.h @@ -9,7 +9,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager_Lite Licensed under MIT license - Version: 1.7.0 + Version: 1.8.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -22,6 +22,7 @@ 1.5.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` 1.6.0 K Hoang 26/11/2021 Auto detect ESP32 core and use either built-in LittleFS or LITTLEFS library. Fix bug. 1.7.0 K Hoang 08/01/2022 Fix the blocking issue in loop() with configurable WIFI_RECON_INTERVAL + 1.8.0 K Hoang 10/02/2022 Add support to new ESP32-S3 *****************************************************************************************************************************/ #ifndef ESP_WiFiManager_Lite_Debug_h