From f95cc9ee90ad5749df5c4445d8bc62dbd66feba1 Mon Sep 17 00:00:00 2001 From: Khoi Hoang <57012152+khoih-prog@users.noreply.github.com> Date: Fri, 11 Feb 2022 23:39:39 -0500 Subject: [PATCH] v1.7.0 to add support to ESP32-S3 ### Releases v1.7.0 1. Add support to new `ESP32-S3` 2. Add `LittleFS` support to `ESP32-C3` 3. Use ESP32-core's LittleFS library instead of Lorol's LITTLEFS library for v2.0.0+ --- CONTRIBUTING.md | 2 +- README.md | 143 +++++++++++++++--- changelog.md | 7 + .../AsyncCustomHeader_STM32.ino | 4 +- .../AsyncDweetGet_STM32.ino | 4 +- .../AsyncDweetPost_STM32.ino | 4 +- .../AsyncHTTPMultiRequests_ESP.ino | 22 ++- .../AsyncHTTPRequest_ESP.ino | 22 +-- .../AsyncHTTPRequest_ESP_WiFiManager.ino | 84 ++++++---- .../AsyncHTTPRequest_STM32.ino | 4 +- .../AsyncSimpleGET_STM32.ino | 4 +- .../AsyncWebClientRepeating_STM32.ino | 4 +- .../AsyncCustomHeader_STM32_LAN8720.ino | 4 +- .../AsyncDweetGet_STM32_LAN8720.ino | 4 +- .../AsyncDweetPost_STM32_LAN8720.ino | 4 +- .../AsyncHTTPRequest_STM32_LAN8720.ino | 4 +- .../AsyncSimpleGET_STM32_LAN8720.ino | 4 +- .../AsyncWebClientRepeating_STM32_LAN8720.ino | 4 +- .../AsyncHTTPMultiRequests_WT32_ETH01.ino | 4 +- .../AsyncHTTPRequest_WT32_ETH01.ino | 4 +- .../multiFileProject/multiFileProject.ino | 3 + library.json | 6 +- library.properties | 6 +- platformio/platformio.ini | 4 +- src/AsyncHTTPRequest_Debug_Generic.h | 3 +- src/AsyncHTTPRequest_Generic.h | 3 +- src/AsyncHTTPRequest_Generic.hpp | 9 +- src/AsyncHTTPRequest_Impl_Generic.h | 12 +- 28 files changed, 259 insertions(+), 123 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 846830a..6431e54 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ Please ensure to specify the following: Arduino IDE version: 1.8.19 ESP32 Core Version 2.0.2 OS: Ubuntu 20.04 LTS -Linux xy-Inspiron-3593 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 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: I encountered an endless loop while trying to connect to Local WiFi. diff --git a/README.md b/README.md index 5a307e2..1e02b0e 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/AsyncHTTPRequest_Generic.svg)](http://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues) -Buy Me A Coffee +Buy Me A Coffee --- --- @@ -75,6 +75,8 @@ * [6. AsyncWebClientRepeating_STM32_LAN8720 running on STM32F4 BLACK_F407VE using LAN8720](#6-asyncwebclientrepeating_stm32_lan8720-running-on-stm32f4-black_f407ve-using-lan8720) * [7. AsyncHTTPMultiRequests_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720](#7-asynchttpmultirequests_wt32_eth01-on-esp32_dev-with-eth_phy_lan8720) * [8. AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720](#8-asynchttprequest_wt32_eth01-on-esp32_dev-with-eth_phy_lan8720) + * [9. AsyncHTTPRequest_ESP_WiFiManager running on ESP32C3_DEV](#9-asynchttprequest_esp_wifimanager-running-on-ESP32C3_DEV) **New** + * [10. AsyncHTTPRequest_ESP_WiFiManager running on ESP32S3_DEV](#10-asynchttprequest_esp_wifimanager-running-on-ESP32S3_DEV) **New** * [Debug](#debug) * [Troubleshooting](#troubleshooting) * [Issues](#issues) @@ -136,7 +138,11 @@ This library is based on, modified from: ### Currently Supported Boards -#### 1. ESP32 including ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) +#### 1. ESP32 including ESP32_S2 (ESP32_S2 Saola, AI-Thinker ESP-12K, etc.), ESP32_S3 and ESP32_C3 + +1. **ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM, SPIFFS or LittleFS**. +2. **ESP32-C3 (ARDUINO_ESP32C3_DEV) using EEPROM, SPIFFS or LittleFS**. +3. **ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS**. #### 2. ESP8266 @@ -169,7 +175,7 @@ This library is based on, modified from: 8. [`STM32Ethernet library v1.2.0+`](https://github.com/stm32duino/STM32Ethernet) for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery). [![GitHub release](https://img.shields.io/github/release/stm32duino/STM32Ethernet.svg)](https://github.com/stm32duino/STM32Ethernet/releases/latest) 9. [`LwIP library v2.1.2+`](https://github.com/stm32duino/LwIP) for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery). [![GitHub release](https://img.shields.io/github/release/stm32duino/LwIP.svg)](https://github.com/stm32duino/LwIP/releases/latest) 10. [`STM32AsyncTCP library v1.0.1+`](https://github.com/khoih-prog/STM32AsyncTCP) for built-in Ethernet on (Nucleo-144, Discovery). To install manually for Arduino IDE. -11. [`ESPAsync_WiFiManager library v1.11.0+`](https://github.com/khoih-prog/ESPAsync_WiFiManager) for ESP32/ESP8266 using some examples. [![GitHub release](https://img.shields.io/github/release/khoih-prog/ESPAsync_WiFiManager.svg)](https://github.com/khoih-prog/ESPAsync_WiFiManager/releases) +11. [`ESPAsync_WiFiManager library v1.12.1+`](https://github.com/khoih-prog/ESPAsync_WiFiManager) for ESP32/ESP8266 using some examples. [![GitHub release](https://img.shields.io/github/release/khoih-prog/ESPAsync_WiFiManager.svg)](https://github.com/khoih-prog/ESPAsync_WiFiManager/releases) 12. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). 13. [`WebServer_WT32_ETH01 library v1.4.1+`](https://github.com/khoih-prog/WebServer_WT32_ETH01) if necessary to use WT32_ETH01 boards. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/WebServer_WT32_ETH01.svg?)](https://www.ardu-badge.com/WebServer_WT32_ETH01) @@ -191,7 +197,7 @@ The best and easiest way is to use `Arduino Library Manager`. Search for `AsyncH 1. Install [VS Code](https://code.visualstudio.com/) 2. Install [PlatformIO](https://platformio.org/platformio-ide) -3. Install [**AsyncHTTPRequest_Generic** library](https://platformio.org/lib/show/11235/AsyncHTTPRequest_Generic) by using [Library Manager](https://platformio.org/lib/show/11235/AsyncHTTPRequest_Generic/installation). Search for AsyncHTTPRequest_Generic in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22) +3. Install [**AsyncHTTPRequest_Generic** library](https://registry.platformio.org/libraries/khoih-prog/AsyncHTTPRequest_Generic) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/AsyncHTTPRequest_Generic/installation). Search for AsyncHTTPRequest_Generic 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) --- @@ -457,8 +463,8 @@ Please take a look at other examples, as well. ```cpp #include "defines.h" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 @@ -689,7 +695,7 @@ IPAddress ip(192, 168, 2, 232); ``` Start AsyncHTTPRequest_STM32 on NUCLEO_F767ZI -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 AsyncHTTPRequest @ IP : 192.168.2.178 ************************************** @@ -734,7 +740,7 @@ week_number: 3 ``` Starting AsyncHTTPRequest_ESP_WiFiManager using LittleFS on ESP8266_NODEMCU -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 Stored: SSID = HueNet1, Pass = 12345678 Got stored Credentials. Timeout 120s ConnectMultiWiFi in setup @@ -758,7 +764,6 @@ utc_offset: -05:00 week_number: 3 ************************************** HHHHHH - ``` --- @@ -767,7 +772,7 @@ HHHHHH ``` Starting AsyncHTTPRequest_ESP_WiFiManager using SPIFFS on ESP32_DEV -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 Stored: SSID = HueNet1, Pass = 12345678 Got stored Credentials. Timeout 120s ConnectMultiWiFi in setup @@ -809,7 +814,6 @@ utc_offset: -05:00 week_number: 3 ************************************** HHHHHHHHH HHHHHHHHHH HHHHHHHHHH - ``` --- @@ -818,7 +822,7 @@ HHHHHHHHH HHHHHHHHHH HHHHHHHHHH ``` Starting AsyncHTTPRequest_ESP using ESP8266_NODEMCU -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 Connecting to WiFi SSID: HueNet1 ........... HTTP WebServer is @ IP : 192.168.2.81 @@ -851,7 +855,7 @@ HHHHHHHHH HHHHHHHHHH HHHHHHHHHH H ``` Start AsyncWebClientRepeating_STM32 on NUCLEO_F767ZI -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 AsyncHTTPRequest @ IP : 192.168.2.72 ************************************** @@ -895,8 +899,6 @@ AsyncHTTPRequest @ IP : 192.168.2.72 ,;;;;; ;;`;; ;; ;; .;; ;; ,;, ;; ;;;, ;; ;; ;; ,;, ;; .;; ;;;;;: ;;;;;: ,;;;;;: ;; ;;, ;;;;;; ;; ;; ;; ;;` ;;;;. `;;;: ,;;;;;, ;; ;;, ;;;; - - ``` --- @@ -906,7 +908,7 @@ AsyncHTTPRequest @ IP : 192.168.2.72 ``` Start AsyncWebClientRepeating_STM32_LAN8720 on BLACK_F407VE -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 AsyncHTTPRequest @ IP : 192.168.2.150 @@ -962,7 +964,7 @@ AsyncHTTPRequest @ IP : 192.168.2.150 ``` Starting AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720 WebServer_WT32_ETH01 v1.4.1 -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps AsyncHTTPRequest @ IP : 192.168.2.232 @@ -988,7 +990,7 @@ H ``` Starting AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720 WebServer_WT32_ETH01 v1.4.1 -AsyncHTTPRequest_Generic v1.6.0 +AsyncHTTPRequest_Generic v1.7.0 ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps AsyncHTTPRequest @ IP : 192.168.2.232 @@ -1012,6 +1014,107 @@ week_number: 52 ************************************** ``` +--- + +#### 9. [AsyncHTTPRequest_ESP_WiFiManager](examples/AsyncHTTPRequest_ESP_WiFiManager) running on ESP32C3_DEV + +``` +Starting AsyncHTTPRequest_ESP_WiFiManager using LittleFS on ESP32C3_DEV +ESPAsync_WiFiManager v1.12.1 +AsyncHTTPRequest_Generic v1.7.0 +Stored: SSID = HueNet1, Pass = password +Got stored Credentials. Timeout 120s +ConnectMultiWiFi in setup +After waiting 9.23 secs more in setup(), connection result is connected. Local IP: 192.168.2.85 +H +************************************** +abbreviation: EST +client_ip: 45.72.193.77 +datetime: 2022-02-11T22:20:36.434352-05:00 +day_of_week: 5 +day_of_year: 42 +dst: false +dst_from: +dst_offset: 0 +dst_until: +raw_offset: -18000 +timezone: America/Toronto +unixtime: 1644636036 +utc_datetime: 2022-02-12T03:20:36.434352+00:00 +utc_offset: -05:00 +week_number: 6 +************************************** +HHHHHH +************************************** +abbreviation: EST +client_ip: 45.72.193.77 +datetime: 2022-02-11T22:21:36.398307-05:00 +day_of_week: 5 +day_of_year: 42 +dst: false +dst_from: +dst_offset: 0 +dst_until: +raw_offset: -18000 +timezone: America/Toronto +unixtime: 1644636096 +utc_datetime: 2022-02-12T03:21:36.398307+00:00 +utc_offset: -05:00 +week_number: 6 +************************************** +``` + +--- + +#### 10. [AsyncHTTPRequest_ESP_WiFiManager](examples/AsyncHTTPRequest_ESP_WiFiManager) running on ESP32S3_DEV + + +``` +Starting AsyncHTTPRequest_ESP_WiFiManager using LittleFS on ESP32S3_DEV +ESPAsync_WiFiManager v1.12.1 +AsyncHTTPRequest_Generic v1.7.0 +Stored: SSID = HueNet1, Pass = password +Got stored Credentials. Timeout 120s +ConnectMultiWiFi in setup +After waiting 7.77 secs more in setup(), connection result is connected. Local IP: 192.168.2.83 +H +************************************** +abbreviation: EST +client_ip: 45.72.193.77 +datetime: 2022-02-11T22:58:46.055783-05:00 +day_of_week: 5 +day_of_year: 42 +dst: false +dst_from: +dst_offset: 0 +dst_until: +raw_offset: -18000 +timezone: America/Toronto +unixtime: 1644638326 +utc_datetime: 2022-02-12T03:58:46.055783+00:00 +utc_offset: -05:00 +week_number: 6 +************************************** + +HHHHHH +************************************** +abbreviation: EST +client_ip: 45.72.193.77 +datetime: 2022-02-11T22:59:45.988493-05:00 +day_of_week: 5 +day_of_year: 42 +dst: false +dst_from: +dst_offset: 0 +dst_until: +raw_offset: -18000 +timezone: America/Toronto +unixtime: 1644638385 +utc_datetime: 2022-02-12T03:59:45.988493+00:00 +utc_offset: -05:00 +week_number: 6 +************************************** +``` --- --- @@ -1066,6 +1169,10 @@ Submit issues to: [AsyncHTTPRequest_Generic issues](https://github.com/khoih-pro 9. Fix `multiple-definitions` linker error and weird bug related to `src_cpp`. 10. Optimize library code by using `reference-passing` instead of `value-passing` 11. Enable compatibility with old code to include only `AsyncHTTPRequest_Generic.h` +12. Add support to **ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS** +13. Add `LittleFS` support to **ESP32-C3** +14. Use `ESP32-core's LittleFS` library instead of `Lorol's LITTLEFS` library for ESP32 core v2.0.0+ + --- --- diff --git a/changelog.md b/changelog.md index 77aff63..c27e42f 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ ## Table of Contents * [Changelog](#changelog) + * [Releases v1.7.0](#releases-v170) * [Releases v1.6.0](#releases-v160) * [Releases v1.5.0](#releases-v150) * [Releases v1.4.1](#releases-v141) @@ -34,6 +35,12 @@ ## Changelog +### Releases v1.7.0 + +1. Add support to new `ESP32-S3` +2. Add `LittleFS` support to `ESP32-C3` +3. Use ESP32-core's LittleFS library instead of Lorol's LITTLEFS library for v2.0.0+ + ### Releases v1.6.0 1. Reduce the breaking effect of v1.5.0 by enabling compatibility with old code to include only `AsyncHTTPRequest_Generic.h` diff --git a/examples/AsyncCustomHeader_STM32/AsyncCustomHeader_STM32.ino b/examples/AsyncCustomHeader_STM32/AsyncCustomHeader_STM32.ino index f4733b7..cb477bb 100644 --- a/examples/AsyncCustomHeader_STM32/AsyncCustomHeader_STM32.ino +++ b/examples/AsyncCustomHeader_STM32/AsyncCustomHeader_STM32.ino @@ -24,8 +24,8 @@ //char GET_ServerAddress[] = "192.168.2.110/"; char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/AsyncDweetGet_STM32/AsyncDweetGet_STM32.ino b/examples/AsyncDweetGet_STM32/AsyncDweetGet_STM32.ino index c731e19..5148926 100644 --- a/examples/AsyncDweetGet_STM32/AsyncDweetGet_STM32.ino +++ b/examples/AsyncDweetGet_STM32/AsyncDweetGet_STM32.ino @@ -35,8 +35,8 @@ const char GET_ServerAddress[] = "dweet.io"; // use your own thing name here String dweetName = "/dweet/for/currentSecond?second="; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/AsyncDweetPost_STM32/AsyncDweetPost_STM32.ino b/examples/AsyncDweetPost_STM32/AsyncDweetPost_STM32.ino index 6866ef2..c7703ba 100644 --- a/examples/AsyncDweetPost_STM32/AsyncDweetPost_STM32.ino +++ b/examples/AsyncDweetPost_STM32/AsyncDweetPost_STM32.ino @@ -29,8 +29,8 @@ const char POST_ServerAddress[] = "dweet.io"; // use your own thing name here String dweetName = "/dweet/for/pinA0-Read?"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/AsyncHTTPMultiRequests_ESP/AsyncHTTPMultiRequests_ESP.ino b/examples/AsyncHTTPMultiRequests_ESP/AsyncHTTPMultiRequests_ESP.ino index 27ffa35..708507e 100644 --- a/examples/AsyncHTTPMultiRequests_ESP/AsyncHTTPMultiRequests_ESP.ino +++ b/examples/AsyncHTTPMultiRequests_ESP/AsyncHTTPMultiRequests_ESP.ino @@ -44,11 +44,9 @@ #error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting. #endif -#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.9.0" -#define ESP_WIFIMANAGER_VERSION_MIN 1009000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 // Level from 0-4 #define ASYNC_HTTP_DEBUG_PORT Serial #define _ASYNC_HTTP_LOGLEVEL_ 1 @@ -137,12 +135,12 @@ void sendRequest() } else { - Serial.println("Can't send bad request"); + Serial.println(F("Can't send bad request")); } } else { - Serial.println("Can't send request"); + Serial.println(F("Can't send request")); } } @@ -152,9 +150,9 @@ void requestCB(void* optParm, AsyncHTTPRequest* request, int readyState) if (readyState == readyStateDone) { - Serial.print("\n***************"); Serial.print(requestName[ requestIndex ]); Serial.println("***************"); + Serial.print(F("\n***************")); Serial.print(requestName[ requestIndex ]); Serial.println(F("***************")); Serial.println(request->responseText()); - Serial.println("**************************************"); + Serial.println(F("**************************************")); #if 1 // Bypass hourly @@ -179,13 +177,13 @@ void setup() delay(200); - Serial.println("\nStarting AsyncHTTPMultiRequests using " + String(ARDUINO_BOARD)); + Serial.print(F("\nStarting AsyncHTTPMultiRequests using ")); Serial.println(ARDUINO_BOARD); Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION); #if defined(ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN) if (ASYNC_HTTP_REQUEST_GENERIC_VERSION_INT < ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN) { - Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.print(F("Warning. Must use this example on Version equal or later than : ")); Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET); } #endif @@ -194,12 +192,12 @@ void setup() WiFi.begin(ssid, password); - Serial.println("Connecting to WiFi SSID: " + String(ssid)); + Serial.print(F("Connecting to WiFi SSID: ")); Serial.println(ssid); while (WiFi.status() != WL_CONNECTED) { delay(500); - Serial.print("."); + Serial.print(F(".")); } Serial.print(F("AsyncHTTPRequest @ IP : ")); diff --git a/examples/AsyncHTTPRequest_ESP/AsyncHTTPRequest_ESP.ino b/examples/AsyncHTTPRequest_ESP/AsyncHTTPRequest_ESP.ino index a392184..771d693 100644 --- a/examples/AsyncHTTPRequest_ESP/AsyncHTTPRequest_ESP.ino +++ b/examples/AsyncHTTPRequest_ESP/AsyncHTTPRequest_ESP.ino @@ -65,8 +65,8 @@ const char* password = "your_pass"; #include #endif -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error #include // https://github.com/khoih-prog/AsyncHTTPRequest_Generic @@ -77,7 +77,7 @@ AsyncHTTPRequest request; Ticker ticker; Ticker ticker1; -void heartBeatPrint(void) +void heartBeatPrint() { static int num = 1; @@ -113,12 +113,12 @@ void sendRequest() } else { - Serial.println("Can't send bad request"); + Serial.println(F("Can't send bad request")); } } else { - Serial.println("Can't send request"); + Serial.println(F("Can't send request")); } } @@ -128,9 +128,9 @@ void requestCB(void* optParm, AsyncHTTPRequest* request, int readyState) if (readyState == readyStateDone) { - Serial.println("\n**************************************"); + Serial.println(F("\n**************************************")); Serial.println(request->responseText()); - Serial.println("**************************************"); + Serial.println(F("**************************************")); request->setDebug(false); } @@ -141,20 +141,22 @@ void setup() // put your setup code here, to run once: Serial.begin(115200); while (!Serial); + + delay(200); - Serial.println("\nStarting AsyncHTTPRequest_ESP using " + String(ARDUINO_BOARD)); + Serial.print(F("\nStarting AsyncHTTPRequest_ESP using ")); Serial.println(ARDUINO_BOARD); Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); - Serial.println("Connecting to WiFi SSID: " + String(ssid)); + Serial.print(F("Connecting to WiFi SSID: ")); Serial.println(ssid); while (WiFi.status() != WL_CONNECTED) { delay(500); - Serial.print("."); + Serial.print(F(".")); } Serial.print(F("\nAsyncHTTPRequest @ IP : ")); diff --git a/examples/AsyncHTTPRequest_ESP_WiFiManager/AsyncHTTPRequest_ESP_WiFiManager.ino b/examples/AsyncHTTPRequest_ESP_WiFiManager/AsyncHTTPRequest_ESP_WiFiManager.ino index d498fb4..12a0371 100644 --- a/examples/AsyncHTTPRequest_ESP_WiFiManager/AsyncHTTPRequest_ESP_WiFiManager.ino +++ b/examples/AsyncHTTPRequest_ESP_WiFiManager/AsyncHTTPRequest_ESP_WiFiManager.ino @@ -46,11 +46,11 @@ #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.11.0" -#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN 1011000 +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.12.1" +#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN 1012001 -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // Level from 0-4 #define ASYNC_HTTP_DEBUG_PORT Serial @@ -81,10 +81,25 @@ // The library will be depreciated after being merged to future major Arduino esp32 core release 2.x // At that time, just remove this library inclusion - #include // https://github.com/lorol/LITTLEFS - - FS* filesystem = &LITTLEFS; - #define FileFS LITTLEFS + #if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) + #warning Using ESP32 Core 1.0.6 or 2.0.0+ and core LittleFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/espressif/arduino-esp32/tree/master/libraries/LittleFS + + //#define FileFS LittleFS + //#define FS_Name "LittleFS" + FS* filesystem = &LittleFS; + #define FileFS LittleFS + #else + #warning Using ESP32 Core 1.0.5-. You must install LITTLEFS library + // The library has been merged into esp32 core from release 1.0.6 + #include // https://github.com/lorol/LITTLEFS + + //#define FileFS LITTLEFS + FS* filesystem = &LITTLEFS; + #define FileFS LITTLEFS + #endif + #define FS_Name "LittleFS" #elif USE_SPIFFS #include @@ -209,8 +224,8 @@ bool initialConfig = false; #define USE_DHCP_IP true #else // You can select DHCP or Static IP here - //#define USE_DHCP_IP true - #define USE_DHCP_IP false + #define USE_DHCP_IP true + //#define USE_DHCP_IP false #endif #if ( USE_DHCP_IP || ( defined(USE_STATIC_IP_CONFIG_IN_CP) && !USE_STATIC_IP_CONFIG_IN_CP ) ) @@ -309,10 +324,10 @@ void initSTAIPConfigStruct(WiFi_STA_IPConfig &in_WM_STA_IPconfig) void displayIPConfigStruct(WiFi_STA_IPConfig in_WM_STA_IPconfig) { - LOGERROR3(F("stationIP ="), in_WM_STA_IPconfig._sta_static_ip, ", gatewayIP =", in_WM_STA_IPconfig._sta_static_gw); + LOGERROR3(F("stationIP ="), in_WM_STA_IPconfig._sta_static_ip, F(", gatewayIP ="), in_WM_STA_IPconfig._sta_static_gw); LOGERROR1(F("netMask ="), in_WM_STA_IPconfig._sta_static_sn); #if USE_CONFIGURABLE_DNS - LOGERROR3(F("dns1IP ="), in_WM_STA_IPconfig._sta_static_dns1, ", dns2IP =", in_WM_STA_IPconfig._sta_static_dns2); + LOGERROR3(F("dns1IP ="), in_WM_STA_IPconfig._sta_static_dns1, F(", dns2IP ="), in_WM_STA_IPconfig._sta_static_dns2); #endif } @@ -402,7 +417,7 @@ uint8_t connectMultiWiFi() return status; } -void heartBeatPrint(void) +void heartBeatPrint() { static int num = 1; @@ -422,7 +437,7 @@ void heartBeatPrint(void) } } -void check_WiFi(void) +void check_WiFi() { if ( (WiFi.status() != WL_CONNECTED) ) { @@ -431,7 +446,7 @@ void check_WiFi(void) } } -void check_status(void) +void check_status() { static ulong checkstatus_timeout = 0; static ulong checkwifi_timeout = 0; @@ -528,12 +543,12 @@ void sendRequest() } else { - Serial.println("Can't send bad request"); + Serial.println(F("Can't send bad request")); } } else { - Serial.println("Can't send request"); + Serial.println(F("Can't send request")); } } @@ -543,9 +558,9 @@ void requestCB(void* optParm, AsyncHTTPRequest* request, int readyState) if (readyState == readyStateDone) { - Serial.println("\n**************************************"); + Serial.println(F("\n**************************************")); Serial.println(request->responseText()); - Serial.println("**************************************"); + Serial.println(F("**************************************")); request->setDebug(false); } @@ -556,16 +571,18 @@ void setup() // put your setup code here, to run once: Serial.begin(115200); while (!Serial); + + delay(200); - Serial.print("\nStarting AsyncHTTPRequest_ESP_WiFiManager using " + String(FS_Name)); - Serial.println(" on " + String(ARDUINO_BOARD)); + Serial.print(F("\nStarting AsyncHTTPRequest_ESP_WiFiManager using ")); Serial.print(FS_Name); + Serial.print(F(" on ")); Serial.println(ARDUINO_BOARD); Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION); Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION); #if defined(ESP_ASYNC_WIFIMANAGER_VERSION_INT) if (ESP_ASYNC_WIFIMANAGER_VERSION_INT < ESP_ASYNC_WIFIMANAGER_VERSION_MIN) { - Serial.print("Warning. Must use this example on Version later than : "); + Serial.print(F("Warning. Must use this example on Version later than : ")); Serial.println(ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET); } #endif @@ -573,7 +590,7 @@ void setup() #if defined(ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN) if (ASYNC_HTTP_REQUEST_GENERIC_VERSION_INT < ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN) { - Serial.print("Warning. Must use this example on Version equal or later than : "); + Serial.print(F("Warning. Must use this example on Version equal or later than : ")); Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET); } #endif @@ -645,16 +662,17 @@ void setup() Router_Pass = ESPAsync_wifiManager.WiFi_Pass(); //Remove this line if you do not want to see WiFi password printed - Serial.println("Stored: SSID = " + Router_SSID + ", Pass = " + Router_Pass); + Serial.print(F("Stored: SSID = ")); Serial.print(Router_SSID); + Serial.print(F(", Pass = ")); Serial.println(Router_Pass); if (Router_SSID != "") { ESPAsync_wifiManager.setConfigPortalTimeout(120); //If no access point name has been previously entered disable timeout. - Serial.println("Got stored Credentials. Timeout 120s"); + Serial.println(F("Got stored Credentials. Timeout 120s")); } else { - Serial.println("No stored Credentials. No timeout"); + Serial.println(F("No stored Credentials. No timeout")); } String chipID = String(ESP_getChipId(), HEX); @@ -667,16 +685,16 @@ void setup() // From v1.1.0, Don't permit NULL password if ( (Router_SSID == "") || (Router_Pass == "") ) { - Serial.println("We haven't got any access point credentials, so get them now"); + Serial.println(F("We haven't got any access point credentials, so get them now")); initialConfig = true; // Starts an access point //if (!ESPAsync_wifiManager.startConfigPortal((const char *) ssid.c_str(), password)) if ( !ESPAsync_wifiManager.startConfigPortal(AP_SSID.c_str(), AP_PASS.c_str()) ) - Serial.println("Not connected to WiFi but continuing anyway."); + Serial.println(F("Not connected to WiFi but continuing anyway.")); else - Serial.println("WiFi connected...yeey :)"); + Serial.println(F("WiFi connected...yeey :)")); // Stored for later usage, from v1.1.0, but clear first memset(&WM_config, 0, sizeof(WM_config)); @@ -735,19 +753,19 @@ void setup() if ( WiFi.status() != WL_CONNECTED ) { - Serial.println("ConnectMultiWiFi in setup"); + Serial.println(F("ConnectMultiWiFi in setup")); connectMultiWiFi(); } } - Serial.print("After waiting "); + Serial.print(F("After waiting ")); Serial.print((float) (millis() - startedAt) / 1000L); - Serial.print(" secs more in setup(), connection result is "); + Serial.print(F(" secs more in setup(), connection result is ")); if (WiFi.status() == WL_CONNECTED) { - Serial.print("connected. Local IP: "); + Serial.print(F("connected. Local IP: ")); Serial.println(WiFi.localIP()); } else diff --git a/examples/AsyncHTTPRequest_STM32/AsyncHTTPRequest_STM32.ino b/examples/AsyncHTTPRequest_STM32/AsyncHTTPRequest_STM32.ino index b3730da..5ca77fb 100644 --- a/examples/AsyncHTTPRequest_STM32/AsyncHTTPRequest_STM32.ino +++ b/examples/AsyncHTTPRequest_STM32/AsyncHTTPRequest_STM32.ino @@ -42,8 +42,8 @@ #include "defines.h" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/AsyncSimpleGET_STM32/AsyncSimpleGET_STM32.ino b/examples/AsyncSimpleGET_STM32/AsyncSimpleGET_STM32.ino index c408714..27aa599 100644 --- a/examples/AsyncSimpleGET_STM32/AsyncSimpleGET_STM32.ino +++ b/examples/AsyncSimpleGET_STM32/AsyncSimpleGET_STM32.ino @@ -24,8 +24,8 @@ //char GET_ServerAddress[] = "ipv4bot.whatismyipaddress.com/"; char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/AsyncWebClientRepeating_STM32/AsyncWebClientRepeating_STM32.ino b/examples/AsyncWebClientRepeating_STM32/AsyncWebClientRepeating_STM32.ino index 7bc1481..d289c89 100644 --- a/examples/AsyncWebClientRepeating_STM32/AsyncWebClientRepeating_STM32.ino +++ b/examples/AsyncWebClientRepeating_STM32/AsyncWebClientRepeating_STM32.ino @@ -26,8 +26,8 @@ const char GET_ServerAddress[] = "arduino.cc"; // GET location String GET_Location = "/asciilogo.txt"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720.ino b/examples/STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720.ino index c88a3a0..ebfa350 100644 --- a/examples/STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720.ino +++ b/examples/STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720/AsyncCustomHeader_STM32_LAN8720.ino @@ -24,8 +24,8 @@ //char GET_ServerAddress[] = "192.168.2.110/"; char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/STM32_LAN8720/AsyncDweetGet_STM32_LAN8720/AsyncDweetGet_STM32_LAN8720.ino b/examples/STM32_LAN8720/AsyncDweetGet_STM32_LAN8720/AsyncDweetGet_STM32_LAN8720.ino index 37e66d9..c502ee1 100644 --- a/examples/STM32_LAN8720/AsyncDweetGet_STM32_LAN8720/AsyncDweetGet_STM32_LAN8720.ino +++ b/examples/STM32_LAN8720/AsyncDweetGet_STM32_LAN8720/AsyncDweetGet_STM32_LAN8720.ino @@ -35,8 +35,8 @@ const char GET_ServerAddress[] = "dweet.io"; // use your own thing name here String dweetName = "/dweet/for/currentSecond?second="; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/STM32_LAN8720/AsyncDweetPost_STM32_LAN8720/AsyncDweetPost_STM32_LAN8720.ino b/examples/STM32_LAN8720/AsyncDweetPost_STM32_LAN8720/AsyncDweetPost_STM32_LAN8720.ino index 78af6f6..61c576d 100644 --- a/examples/STM32_LAN8720/AsyncDweetPost_STM32_LAN8720/AsyncDweetPost_STM32_LAN8720.ino +++ b/examples/STM32_LAN8720/AsyncDweetPost_STM32_LAN8720/AsyncDweetPost_STM32_LAN8720.ino @@ -29,8 +29,8 @@ const char POST_ServerAddress[] = "dweet.io"; // use your own thing name here String dweetName = "/dweet/for/pinA0-Read?"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720.ino b/examples/STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720.ino index c4d8450..0c37e39 100644 --- a/examples/STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720.ino +++ b/examples/STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720/AsyncHTTPRequest_STM32_LAN8720.ino @@ -42,8 +42,8 @@ #include "defines.h" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720.ino b/examples/STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720.ino index ca5292c..52da7d2 100644 --- a/examples/STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720.ino +++ b/examples/STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720/AsyncSimpleGET_STM32_LAN8720.ino @@ -24,8 +24,8 @@ //char GET_ServerAddress[] = "ipv4bot.whatismyipaddress.com/"; char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720.ino b/examples/STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720.ino index 0e3f299..dd94b1a 100644 --- a/examples/STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720.ino +++ b/examples/STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720/AsyncWebClientRepeating_STM32_LAN8720.ino @@ -26,8 +26,8 @@ const char GET_ServerAddress[] = "arduino.cc"; // GET location String GET_Location = "/asciilogo.txt"; -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // 600s = 10 minutes to not flooding, 60s in testing #define HTTP_REQUEST_INTERVAL_MS 60000 //600000 diff --git a/examples/WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01.ino b/examples/WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01.ino index 68cd0a4..654c857 100644 --- a/examples/WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01.ino +++ b/examples/WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01/AsyncHTTPMultiRequests_WT32_ETH01.ino @@ -57,8 +57,8 @@ #include // https://github.com/khoih-prog/WebServer_WT32_ETH01 -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error #include // https://github.com/khoih-prog/AsyncHTTPRequest_Generic diff --git a/examples/WT32_ETH01/AsyncHTTPRequest_WT32_ETH01/AsyncHTTPRequest_WT32_ETH01.ino b/examples/WT32_ETH01/AsyncHTTPRequest_WT32_ETH01/AsyncHTTPRequest_WT32_ETH01.ino index dbc2a7c..49ea04f 100644 --- a/examples/WT32_ETH01/AsyncHTTPRequest_WT32_ETH01/AsyncHTTPRequest_WT32_ETH01.ino +++ b/examples/WT32_ETH01/AsyncHTTPRequest_WT32_ETH01/AsyncHTTPRequest_WT32_ETH01.ino @@ -57,8 +57,8 @@ #include // https://github.com/khoih-prog/WebServer_WT32_ETH01 -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.6.0" -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 // To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error #include // https://github.com/khoih-prog/AsyncHTTPRequest_Generic diff --git a/examples/multiFileProject/multiFileProject.ino b/examples/multiFileProject/multiFileProject.ino index 4936ee1..3ae9c9e 100644 --- a/examples/multiFileProject/multiFileProject.ino +++ b/examples/multiFileProject/multiFileProject.ino @@ -19,6 +19,9 @@ #error This code is intended to run on the ESP8266, ESP32 or STM32 platform! Please check your Tools->Board setting. #endif +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000 + #include "multiFileProject.h" // Can be included as many times as necessary, without `Multiple Definitions` Linker Error diff --git a/library.json b/library.json index f4be7d6..2a425d5 100644 --- a/library.json +++ b/library.json @@ -1,8 +1,8 @@ { "name":"AsyncHTTPRequest_Generic", "version": "1.6.0", - "description":"Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32-S2), WT32_ETH01 (ESP32 + LAN8720), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.", - "keywords":"communication, async, tcp, http, ESP8266, ESP32, ESP32-S2, wt32-eth01, ESPAsyncTCP, AsyncTCP, stm32, ethernet, wifi, lan8742a, lan8720, f407ve, nucleo, nucleo-144, stm32f7, stm32f4", + "description":"Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.", + "keywords":"communication, async, tcp, http, ESP8266, ESP32, ESP32-S2, ESP32-S3, ESP32-C3, wt32-eth01, ESPAsyncTCP, AsyncTCP, stm32, ethernet, wifi, lan8742a, lan8720, f407ve, nucleo, nucleo-144, stm32f7, stm32f4", "authors": [ { "name": "Bob Lemaire", @@ -45,7 +45,7 @@ { "owner": "khoih-prog", "name": "ESPAsync_WiFiManager", - "version": ">=1.11.0", + "version": ">=1.12.1", "platforms": ["espressif8266", "espressif32"] }, { diff --git a/library.properties b/library.properties index c8b354e..398414a 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=AsyncHTTPRequest_Generic -version=1.6.0 +version=1.7.0 author=Bob Lemaire,Khoi Hoang maintainer=Khoi Hoang -license=MIT -sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32-S2), WT32_ETH01 (ESP32 + LAN8720), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet. +icense=GPLv3 +sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP8266 and currently STM32 with LAN8720 or built-in LAN8742A Ethernet. paragraph=This AsyncHTTPRequest_Generic Library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, for ESP32 (including ESP32-S2), ESP8266 and STM32 with LAN8720 or built-in LAN8742A Ethernet, such as Nucleo-144 F767ZI, F407VE, etc. category=Communication,AsyncTCP,AsyncHTTP url=https://github.com/khoih-prog/AsyncHTTPRequest_Generic diff --git a/platformio/platformio.ini b/platformio/platformio.ini index 390f397..908f4de 100644 --- a/platformio/platformio.ini +++ b/platformio/platformio.ini @@ -43,7 +43,7 @@ lib_deps = ; https://github.com/khoih-prog/STM32AsyncTCP.git ; STM32duino LwIP@>=2.1.2 ; STM32duino STM32Ethernet@>=1.2.0 -; ESPAsync_WiFiManager@>=1.11.0 +; ESPAsync_WiFiManager@>=1.12.1 ; LittleFS_esp32@>=1.0.6 ; WebServer_WT32_ETH01@>=1.4.1 ; PlatformIO 5.x @@ -53,7 +53,7 @@ lib_deps = ; https://github.com/khoih-prog/STM32AsyncTCP.git ; stm32duino/STM32duino LwIP@>=2.1.2 ; stm32duino/STM32duino STM32Ethernet@>=1.2.0 - khoih-prog/ESPAsync_WiFiManager@>=1.11.0 + khoih-prog/ESPAsync_WiFiManager@>=1.12.1 lorol/LittleFS_esp32@>=1.0.6 ; khoih-prog/WebServer_WT32_ETH01@>=1.4.1 diff --git a/src/AsyncHTTPRequest_Debug_Generic.h b/src/AsyncHTTPRequest_Debug_Generic.h index a6f498d..80c9a21 100644 --- a/src/AsyncHTTPRequest_Debug_Generic.h +++ b/src/AsyncHTTPRequest_Debug_Generic.h @@ -17,7 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . - Version: 1.6.0 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -37,6 +37,7 @@ 1.4.1 K Hoang 29/11/2021 Auto detect ESP32 core version and improve connection time for WT32_ETH01 1.5.0 K Hoang 30/12/2021 Fix `multiple-definitions` linker error 1.6.0 K Hoang 23/01/2022 Enable compatibility with old code to include only AsyncHTTPRequest_Generic.h + 1.7.0 K Hoang 10/02/2022 Add support to new ESP32-S3. Add LittleFS support to ESP32-C3. Use core LittleFS *****************************************************************************************************************************/ #pragma once diff --git a/src/AsyncHTTPRequest_Generic.h b/src/AsyncHTTPRequest_Generic.h index 38c9351..521826d 100644 --- a/src/AsyncHTTPRequest_Generic.h +++ b/src/AsyncHTTPRequest_Generic.h @@ -17,7 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . - Version: 1.6.0 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -37,6 +37,7 @@ 1.4.1 K Hoang 29/11/2021 Auto detect ESP32 core version and improve connection time for WT32_ETH01 1.5.0 K Hoang 30/12/2021 Fix `multiple-definitions` linker error 1.6.0 K Hoang 23/01/2022 Enable compatibility with old code to include only AsyncHTTPRequest_Generic.h + 1.7.0 K Hoang 10/02/2022 Add support to new ESP32-S3. Add LittleFS support to ESP32-C3. Use core LittleFS *****************************************************************************************************************************/ #pragma once diff --git a/src/AsyncHTTPRequest_Generic.hpp b/src/AsyncHTTPRequest_Generic.hpp index 318dac2..def5ce4 100644 --- a/src/AsyncHTTPRequest_Generic.hpp +++ b/src/AsyncHTTPRequest_Generic.hpp @@ -17,7 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . - Version: 1.6.0 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -37,6 +37,7 @@ 1.4.1 K Hoang 29/11/2021 Auto detect ESP32 core version and improve connection time for WT32_ETH01 1.5.0 K Hoang 30/12/2021 Fix `multiple-definitions` linker error 1.6.0 K Hoang 23/01/2022 Enable compatibility with old code to include only AsyncHTTPRequest_Generic.h + 1.7.0 K Hoang 10/02/2022 Add support to new ESP32-S3. Add LittleFS support to ESP32-C3. Use core LittleFS *****************************************************************************************************************************/ #pragma once @@ -44,13 +45,13 @@ #ifndef ASYNC_HTTP_REQUEST_GENERIC_HPP #define ASYNC_HTTP_REQUEST_GENERIC_HPP -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION "AsyncHTTPRequest_Generic v1.6.0" +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION "AsyncHTTPRequest_Generic v1.7.0" #define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MAJOR 1 -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MINOR 6 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MINOR 7 #define ASYNC_HTTP_REQUEST_GENERIC_VERSION_PATCH 0 -#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_INT 1006000 +#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_INT 1007000 #include diff --git a/src/AsyncHTTPRequest_Impl_Generic.h b/src/AsyncHTTPRequest_Impl_Generic.h index 3771142..ee5f6e7 100644 --- a/src/AsyncHTTPRequest_Impl_Generic.h +++ b/src/AsyncHTTPRequest_Impl_Generic.h @@ -17,7 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . - Version: 1.6.0 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -37,6 +37,7 @@ 1.4.1 K Hoang 29/11/2021 Auto detect ESP32 core version and improve connection time for WT32_ETH01 1.5.0 K Hoang 30/12/2021 Fix `multiple-definitions` linker error 1.6.0 K Hoang 23/01/2022 Enable compatibility with old code to include only AsyncHTTPRequest_Generic.h + 1.7.0 K Hoang 10/02/2022 Add support to new ESP32-S3. Add LittleFS support to ESP32-C3. Use core LittleFS *****************************************************************************************************************************/ #pragma once @@ -318,8 +319,8 @@ String xbuf::readString(int endPos) } // KH, to remove - AHTTP_LOGDEBUG1("xbuf::readString: Reserved size = ", endPos + 1); - /////// + AHTTP_LOGDEBUG1("xbuf::readString: Reserved size = ", endPos + 1); + /////// if (endPos > _used) { @@ -855,8 +856,6 @@ String AsyncHTTPRequest::responseText() //************************************************************************************************************** -#if 1 - #if (ESP32) #define GLOBAL_STR_LEN (32 * 1024) #elif (ESP8266) @@ -898,7 +897,6 @@ char* AsyncHTTPRequest::responseLongText() return globalLongString; } -#endif //************************************************************************************************************** size_t AsyncHTTPRequest::responseRead(uint8_t* buf, size_t len) @@ -1929,7 +1927,7 @@ char* AsyncHTTPRequest::_charstar(const __FlashStringHelper * str) strcpy_P(ptr, (PGM_P)str); } - // Rturn good ptr or nullptr + // Return good ptr or nullptr return ptr; }