diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43d067b..462ff21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +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.19) or Platform.io version +* Board type (e.g. ESP32S3_DEV, ESP32S2_DEV, ESP32C3_DEV) * Board Core Version (e.g. ESP32 core v2.0.5) * Contextual information (e.g. what you were trying to achieve) * Simplest possible steps to reproduce @@ -25,12 +26,11 @@ Please ensure to specify the following: Please be educated, civilized and constructive. Disrespective posts against [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-event-code-of-conduct) will be ignored and deleted. - ### Example ``` Arduino IDE version: 1.8.19 -ESP32_DEV board +ESP32S3_DEV board ESP32 core v2.0.5 OS: Ubuntu 20.04 LTS Linux xy-Inspiron-3593 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux diff --git a/README.md b/README.md index 32ba074..d05e16c 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ * [Methods for controlling websocket connections](#methods-for-controlling-websocket-connections) * [Adding Default Headers](#adding-default-headers) * [Path variable](#path-variable) -* [How to connect W5500 to ESP32_S3](#How-to-connect-W5500-to-ESP32_S3) +* [How to connect W5500 to ESP32_S2/S3](#How-to-connect-W5500-to-ESP32_S2S3) * [Examples](#examples) * [ 1. Async_AdvancedWebServer](examples/Async_AdvancedWebServer) * [ 2. Async_AdvancedWebServer_MemoryIssues_SendArduinoString](examples/Async_AdvancedWebServer_MemoryIssues_SendArduinoString) @@ -103,6 +103,7 @@ * [4. AsyncWebServer_SendChunked on ESP32S3_DEV with ESP32_S3_W5500](#4-AsyncWebServer_SendChunked-on-ESP32S3_DEV-with-ESP32_S3_W5500) * [5. Async_WebSocketsServer on ESP32S3_DEV with ESP32_S3_W5500](#5-Async_WebSocketsServer-on-ESP32S3_DEV-with-ESP32_S3_W5500) * [6. Async_HTTPBasicAuth on ESP32S3_DEV with ESP32_S3_W5500](#6-Async_HTTPBasicAuth-on-ESP32S3_DEV-with-ESP32_S3_W5500) + * [7. Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_W5500](#7-Async_AdvancedWebServer_SendChunked-on-ESP32S2_DEV-with-ESP32_S2_W5500) * [Debug](#debug) * [Troubleshooting](#troubleshooting) * [Issues](#issues) @@ -220,8 +221,17 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP 1. **ESP32_S3 boards** using `LwIP W5500 Ethernet` + 2. **ESP32_S2 boards** using `LwIP W5500 Ethernet` - Hopefully the `ESP32_S2` and `ESP32_C3-based` boards will be supported in the near future to use `LwIP W5500 or ENC28J60 Ethernet` + Hopefully the `ESP32_C3-based` boards will be supported in the near future to use `LwIP W5500 or ENC28J60 Ethernet` + +--- + +#### ESP32S2_DEV + +

+ +

#### ESP32S3_DEV @@ -230,7 +240,7 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP

- +--- #### W5500 @@ -1502,7 +1512,7 @@ build_flags = --- --- -### How to connect W5500 to ESP32_S3 +### How to connect W5500 to ESP32_S2/S3 You can change the `INT` pin to another one. Default is `GPIO4` @@ -1513,13 +1523,6 @@ You can change the `INT` pin to another one. Default is `GPIO4` --- - -#### ESP32S3_DEV - -

- -

- #### W5500

@@ -1530,6 +1533,14 @@ You can change the `INT` pin to another one. Default is `GPIO4`

+--- + + +#### ESP32S3_DEV + +

+ +

|W5500|<--->|ESP32_S3| @@ -1544,6 +1555,27 @@ You can change the `INT` pin to another one. Default is `GPIO4` |3.3V|<--->|3.3V| +--- + +#### ESP32S2_DEV + +

+ +

+ + +|ENC28J60|<--->|ESP32_S2| +|:-:|:-:|:-:| +|MOSI|<--->|GPIO35| +|MISO|<--->|GPIO37| +|SCK|<--->|GPIO36| +|SS|<--->|GPIO34| +|INT|<--->|GPIO4| +|RST|<--->|RST| +|GND|<--->|GND| +|3.3V|<--->|3.3V| + + --- --- @@ -1593,7 +1625,7 @@ Following are debug terminal output and screen shots when running example [Async ```cpp Start AsyncMultiWebServer_ESP32_W5500 on ESP32S3_DEV with ESP32_S3_W5500 -AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+ +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ [AWS] Default SPI pinout: [AWS] SPI_HOST: 2 [AWS] MOSI: 11 @@ -1643,7 +1675,7 @@ Following is the debug terminal and screen shot when running example [Async_Adva ```cpp Start Async_AdvancedWebServer_MemoryIssues_Send_CString on ESP32S3_DEV with ESP32_S3_W5500 -AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+ +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ [AWS] Default SPI pinout: [AWS] SPI_HOST: 2 [AWS] MOSI: 11 @@ -1677,7 +1709,7 @@ While using `Arduino String`, the HEAP usage is very large ```cpp Start Async_AdvancedWebServer_MemoryIssues_SendArduinoString on ESP32S3_DEV with ESP32_S3_W5500 -AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+ +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ [AWS] Default SPI pinout: [AWS] SPI_HOST: 2 [AWS] MOSI: 11 @@ -1719,7 +1751,7 @@ Following is debug terminal output when running example [Async_AdvancedWebServer ```cpp Start Async_AdvancedWebServer_SendChunked on ESP32S3_DEV with ESP32_S3_W5500 -AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+ +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ [AWS] Default SPI pinout: [AWS] SPI_HOST: 2 [AWS] MOSI: 11 @@ -1789,7 +1821,7 @@ Following is debug terminal output when running example [AsyncWebServer_SendChun ```cpp Start AsyncWebServer_SendChunked on ESP32S3_DEV with ESP32_S3_W5500 -AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+ +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ [AWS] Default SPI pinout: [AWS] SPI_HOST: 2 [AWS] MOSI: 11 @@ -1840,7 +1872,7 @@ Following is debug terminal output when running example [Async_WebSocketsServer] ```cpp Starting Async_WebSocketsServer on ESP32S3_DEV with ESP32_S3_W5500 -AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+ +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ [AWS] Default SPI pinout: [AWS] SPI_HOST: 2 [AWS] MOSI: 11 @@ -1870,7 +1902,7 @@ Following is debug terminal output when running example [Async_HTTPBasicAuth](ex ```cpp Start Async_HTTPBasicAuth on ESP32S3_DEV with ESP32_S3_W5500 -AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+ +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ [AWS] Default SPI pinout: [AWS] SPI_HOST: 2 [AWS] MOSI: 11 @@ -1891,6 +1923,79 @@ Login using username = admin and password = esp32_w5500 ``` +--- + +#### 7. Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_W5500 + +Following is debug terminal output when running example [Async_AdvancedWebServer_SendChunked](examples/Async_AdvancedWebServer_SendChunked) on `ESP32S2_DEV with LwIP W5500`, using ESP32 core `v2.0.0+`, to demo how to use `beginChunkedResponse()` to send large `html` in chunks. The `built-in MAC address` is now used instead of user-defined one. + +```cpp +Start Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_W5500 +AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+ +[AWS] Default SPI pinout: +[AWS] SPI_HOST: 2 +[AWS] MOSI: 35 +[AWS] MISO: 37 +[AWS] SCK: 36 +[AWS] CS: 34 +[AWS] INT: 4 +[AWS] SPI Clock (MHz): 25 +[AWS] ========================= + +ETH Started +ETH Connected +ETH MAC: 7E:DF:A1:08:32:C9, IPv4: 192.168.2.133 +FULL_DUPLEX, 100Mbps +AsyncWebServer is @ IP : 192.168.2.133 +.[AWS] Total length to send in chunks = 31259 +[AWS] Bytes sent in chunk = 5620 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 2791 +[AWS] Bytes sent in chunk = 0 +[AWS] Total length to send in chunks = 31279 +[AWS] Bytes sent in chunk = 5620 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 1428 +[AWS] Bytes sent in chunk = 2811 +[AWS] Bytes sent in chunk = 0 +``` + +You can access the Async Advanced WebServers @ the server IP + +

+ +

+ + --- --- @@ -1943,6 +2048,8 @@ Submit issues to: [AsyncWebServer_ESP32_SC_W5500 issues](https://github.com/khoi 8. Add examples [Async_AdvancedWebServer_SendChunked](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/Async_AdvancedWebServer_SendChunked) and [AsyncWebServer_SendChunked](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/AsyncWebServer_SendChunked) to demo how to use `beginChunkedResponse()` to send large `html` in chunks 9. Use `allman astyle` and add `utils` 10. Add `Async_WebSocketsServer`, `Async_HttpBasicAuth` and `MQTT` examples +11. Add support to **ESP32S2-based boards** using `LwIP W5500 Ethernet` + --- --- diff --git a/changelog.md b/changelog.md index 3919fc1..027147f 100644 --- a/changelog.md +++ b/changelog.md @@ -15,6 +15,7 @@ ## Table of contents * [Changelog](#changelog) + * [Releases v1.7.0](#releases-v170) * [Releases v1.6.3](#releases-v163) @@ -23,6 +24,10 @@ ## Changelog +#### Releases v1.7.0 + +1. Add support to `ESP32_S2` boards using `LwIP W5500 Ethernet` + #### Releases v1.6.3 1. Initial coding to port [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) to ESP32_S3 boards using `LwIP W5500 Ethernet`. diff --git a/library.json b/library.json index c8f70e8..01b2b95 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name":"AsyncWebServer_ESP32_SC_W5500", - "version": "1.6.3", + "version": "1.7.0", "description":"Asynchronous HTTP and WebSocket Server Library for (ESP32_S2/S3/C3 + LwIP W5500). Now supporting using CString to save heap to send very large data and with examples to demo how to use beginChunkedResponse() to send large html in chunks", "keywords":"http, async, async-webserver, async-websocket, websocket, webserver, esp32, esp32-s2, esp32-s3, esp32-c3, w5500, lwip, lwip-w5500, lwip-ethernet", "authors": diff --git a/library.properties b/library.properties index 49fffbd..228e62c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=AsyncWebServer_ESP32_SC_W5500 -version=1.6.3 +version=1.7.0 author=Hristo Gochkov,Khoi Hoang maintainer=Khoi Hoang license=GPLv3 diff --git a/pics/AsyncWebServer_SendChunked_ESP32_S2.png b/pics/AsyncWebServer_SendChunked_ESP32_S2.png new file mode 100644 index 0000000..324f9d4 Binary files /dev/null and b/pics/AsyncWebServer_SendChunked_ESP32_S2.png differ diff --git a/pics/ESP32S2_DEV.png b/pics/ESP32S2_DEV.png new file mode 100644 index 0000000..b73e4d0 Binary files /dev/null and b/pics/ESP32S2_DEV.png differ diff --git a/src/AsyncEventSource.cpp b/src/AsyncEventSource.cpp index 51ad7fc..82c10ac 100644 --- a/src/AsyncEventSource.cpp +++ b/src/AsyncEventSource.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "Arduino.h" diff --git a/src/AsyncEventSource.h b/src/AsyncEventSource.h index 176cf11..fa307b3 100644 --- a/src/AsyncEventSource.h +++ b/src/AsyncEventSource.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef ASYNCEVENTSOURCE_H_ diff --git a/src/AsyncJson.h b/src/AsyncJson.h index 2ecc810..4b6d0e5 100644 --- a/src/AsyncJson.h +++ b/src/AsyncJson.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ /* Async Response to use with ArduinoJson and AsyncWebServer diff --git a/src/AsyncWebServer_ESP32_SC_W5500.cpp b/src/AsyncWebServer_ESP32_SC_W5500.cpp index 5ee43de..e45970c 100644 --- a/src/AsyncWebServer_ESP32_SC_W5500.cpp +++ b/src/AsyncWebServer_ESP32_SC_W5500.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "AsyncWebServer_ESP32_SC_W5500.h" diff --git a/src/AsyncWebServer_ESP32_SC_W5500.h b/src/AsyncWebServer_ESP32_SC_W5500.h index 6330186..4b157cb 100644 --- a/src/AsyncWebServer_ESP32_SC_W5500.h +++ b/src/AsyncWebServer_ESP32_SC_W5500.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef _AsyncWebServer_ESP32_SC_W5500_H_ @@ -51,8 +52,6 @@ #define SHIELD_TYPE "ESP32_S2_W5500" #endif -#error ESP32_S2 not supported yet. Please use EthernetWebServer - #elif ( ARDUINO_ESP32C3_DEV ) #if (_ETHERNET_WEBSERVER_LOGLEVEL_ > 3) #if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) @@ -100,21 +99,21 @@ #warning Using code for ESP32 core v2.0.0+ in AsyncWebServer_ESP32_SC_W5500.h #endif - #define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION "AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v2.0.0+" + #define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION "AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+" #else #if (_ASYNC_WEBSERVER_LOGLEVEL_ > 3 ) #warning Using code for ESP32 core v1.0.6- in AsyncWebServer_ESP32_SC_W5500.h #endif - #define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION "AsyncWebServer_ESP32_SC_W5500 v1.6.3 for core v1.0.6-" + #define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION "AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v1.0.6-" #endif #define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION_MAJOR 1 -#define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION_MINOR 6 -#define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION_PATCH 3 +#define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION_MINOR 7 +#define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION_PATCH 0 -#define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION_INT 1006003 +#define ASYNC_WEBSERVER_ESP32_SC_W5500_VERSION_INT 1007000 ///////////////////////////////////////////////// @@ -143,6 +142,8 @@ #include +////////////////////////////////////////////////////////////// + #if USING_ESP32_S3 #if !defined(ETH_SPI_HOST) @@ -224,23 +225,23 @@ #endif #if !defined(INT_GPIO) - #define INT_GPIO 4 + #define INT_GPIO 10 #endif #if !defined(MISO_GPIO) - #define MISO_GPIO 5 + #define MISO_GPIO 7 #endif #if !defined(MOSI_GPIO) - #define MOSI_GPIO 6 + #define MOSI_GPIO 5 #endif - #if !defined(SCK_GPIO) + #if !defined(SCK_GPIO) 6 #define SCK_GPIO #endif #if !defined(CS_GPIO) - #define CS_GPIO 7 + #define CS_GPIO 4 #endif #endif diff --git a/src/AsyncWebServer_ESP32_SC_W5500_Debug.h b/src/AsyncWebServer_ESP32_SC_W5500_Debug.h index 2c96c34..017da81 100644 --- a/src/AsyncWebServer_ESP32_SC_W5500_Debug.h +++ b/src/AsyncWebServer_ESP32_SC_W5500_Debug.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #pragma once diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index 0b68a64..67854e4 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "Arduino.h" diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index 8b6ff28..b81d209 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef ASYNCWEBSOCKET_H_ diff --git a/src/AsyncWebSynchronization.h b/src/AsyncWebSynchronization.h index a1d725e..063005b 100644 --- a/src/AsyncWebSynchronization.h +++ b/src/AsyncWebSynchronization.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef ASYNCWEBSYNCHRONIZATION_H_ diff --git a/src/ESP32_W5500_SPIFFSEditor.cpp b/src/ESP32_W5500_SPIFFSEditor.cpp index 73db56d..94fc017 100644 --- a/src/ESP32_W5500_SPIFFSEditor.cpp +++ b/src/ESP32_W5500_SPIFFSEditor.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "ESP32_W5500_SPIFFSEditor.h" diff --git a/src/ESP32_W5500_SPIFFSEditor.h b/src/ESP32_W5500_SPIFFSEditor.h index 05e1741..cecaea5 100644 --- a/src/ESP32_W5500_SPIFFSEditor.h +++ b/src/ESP32_W5500_SPIFFSEditor.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef ESP32_W5500_SPIFFSEditor_H_ diff --git a/src/StringArray.h b/src/StringArray.h index 03dae6a..304c17b 100644 --- a/src/StringArray.h +++ b/src/StringArray.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef STRINGARRAY_H_ diff --git a/src/WebAuthentication.cpp b/src/WebAuthentication.cpp index 3ea958e..79da701 100644 --- a/src/WebAuthentication.cpp +++ b/src/WebAuthentication.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "WebAuthentication.h" diff --git a/src/WebAuthentication.h b/src/WebAuthentication.h index 2d5dcdf..fdddfe0 100644 --- a/src/WebAuthentication.h +++ b/src/WebAuthentication.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef WEB_AUTHENTICATION_H_ diff --git a/src/WebHandlerImpl.h b/src/WebHandlerImpl.h index 88fa157..7b6d934 100644 --- a/src/WebHandlerImpl.h +++ b/src/WebHandlerImpl.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef ASYNCWEBSERVERHANDLERIMPL_H_ diff --git a/src/WebHandlers.cpp b/src/WebHandlers.cpp index 3b5862c..998ebdd 100644 --- a/src/WebHandlers.cpp +++ b/src/WebHandlers.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "AsyncWebServer_ESP32_SC_W5500.h" diff --git a/src/WebRequest.cpp b/src/WebRequest.cpp index 1c832d8..686769c 100644 --- a/src/WebRequest.cpp +++ b/src/WebRequest.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ //#include "ESPAsyncWebServer.h" diff --git a/src/WebResponseImpl.h b/src/WebResponseImpl.h index 95a64b6..715e7f1 100644 --- a/src/WebResponseImpl.h +++ b/src/WebResponseImpl.h @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef ASYNCWEBSERVERRESPONSEIMPL_H_ diff --git a/src/WebResponses.cpp b/src/WebResponses.cpp index 3419219..3c7ae5b 100644 --- a/src/WebResponses.cpp +++ b/src/WebResponses.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "AsyncWebServer_ESP32_SC_W5500.h" diff --git a/src/WebServer.cpp b/src/WebServer.cpp index 83e97eb..e5e2321 100644 --- a/src/WebServer.cpp +++ b/src/WebServer.cpp @@ -22,11 +22,12 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include "AsyncWebServer_ESP32_SC_W5500.h" diff --git a/src/w5500/esp32_sc_w5500.cpp b/src/w5500/esp32_sc_w5500.cpp index 9e7012f..d2d7645 100644 --- a/src/w5500/esp32_sc_w5500.cpp +++ b/src/w5500/esp32_sc_w5500.cpp @@ -9,11 +9,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500 Licensed under GPLv3 license - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #define _ETHERNET_WEBSERVER_LOGLEVEL_ 1 @@ -82,16 +83,14 @@ bool ESP32_W5500::begin(int MISO, int MOSI, int SCLK, int CS, int INT, int SPICL sprintf(macStr, "%02X:%02X:%02X:%02X:%02X:%02X", mac_eth[0], mac_eth[1], mac_eth[2], mac_eth[3], mac_eth[4], mac_eth[5]); - AWS_LOGINFO1("Using built-in mac_eth =", macStr); - Serial.print("Using built-in mac_eth = "); - Serial.println(macStr); + AWS_LOGWARN1("Using built-in mac_eth =", macStr); esp_base_mac_addr_set( mac_eth ); } else { - AWS_LOGINFO("Using user mac_eth"); - Serial.println("Using user mac_eth"); + AWS_LOGWARN("Using user mac_eth"); + memcpy(mac_eth, W5500_Mac, sizeof(mac_eth)); esp_base_mac_addr_set( W5500_Mac ); @@ -137,7 +136,11 @@ bool ESP32_W5500::begin(int MISO, int MOSI, int SCLK, int CS, int INT, int SPICL eth_mac->set_addr(eth_mac, W5500_Mac); -#if 1 +#if USING_ESP32_S3 + eth_mac->set_addr(eth_mac, W5500_Mac); +#else + eth_mac->set_addr(eth_mac, mac_eth); +#endif if ( (SPICLOCK_MHZ < 14) || (SPICLOCK_MHZ > 25) ) { @@ -145,8 +148,6 @@ bool ESP32_W5500::begin(int MISO, int MOSI, int SCLK, int CS, int INT, int SPICL ESP_ERROR_CHECK(ESP_FAIL); } -#endif - /* attach Ethernet driver to TCP/IP stack */ if (esp_netif_attach(eth_netif, esp_eth_new_netif_glue(eth_handle)) != ESP_OK) { diff --git a/src/w5500/esp32_sc_w5500.h b/src/w5500/esp32_sc_w5500.h index 7623cbe..cc8783d 100644 --- a/src/w5500/esp32_sc_w5500.h +++ b/src/w5500/esp32_sc_w5500.h @@ -9,11 +9,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500 Licensed under GPLv3 license - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #ifndef _ESP32_W5500_H_ diff --git a/src/w5500/esp_eth/esp_eth_mac_w5500.c b/src/w5500/esp_eth/esp_eth_mac_w5500.c index 754dc4b..635a43c 100644 --- a/src/w5500/esp_eth/esp_eth_mac_w5500.c +++ b/src/w5500/esp_eth/esp_eth_mac_w5500.c @@ -9,11 +9,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500 Licensed under GPLv3 license - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ // Copyright 2020 Espressif Systems (Shanghai) PTE LTD diff --git a/src/w5500/esp_eth/esp_eth_phy_w5500.c b/src/w5500/esp_eth/esp_eth_phy_w5500.c index 138de95..a067a83 100644 --- a/src/w5500/esp_eth/esp_eth_phy_w5500.c +++ b/src/w5500/esp_eth/esp_eth_phy_w5500.c @@ -9,11 +9,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500 Licensed under GPLv3 license - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ // Copyright 2020 Espressif Systems (Shanghai) PTE LTD // diff --git a/src/w5500/esp_eth/esp_eth_spi_w5500.c b/src/w5500/esp_eth/esp_eth_spi_w5500.c index f9d4fc6..c4c6db9 100644 --- a/src/w5500/esp_eth/esp_eth_spi_w5500.c +++ b/src/w5500/esp_eth/esp_eth_spi_w5500.c @@ -9,11 +9,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500 Licensed under GPLv3 license - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ #include diff --git a/src/w5500/esp_eth/esp_eth_w5500.h b/src/w5500/esp_eth/esp_eth_w5500.h index 63cb3d0..edbe57e 100644 --- a/src/w5500/esp_eth/esp_eth_w5500.h +++ b/src/w5500/esp_eth/esp_eth_w5500.h @@ -9,11 +9,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500 Licensed under GPLv3 license - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ // Copyright 2021 Espressif Systems (Shanghai) PTE LTD diff --git a/src/w5500/esp_eth/w5500.h b/src/w5500/esp_eth/w5500.h index 7bfb00f..7c14019 100644 --- a/src/w5500/esp_eth/w5500.h +++ b/src/w5500/esp_eth/w5500.h @@ -9,11 +9,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500 Licensed under GPLv3 license - Version: 1.6.3 + Version: 1.7.0 Version Modified By Date Comments ------- ----------- ---------- ----------- 1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3 + 1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500) *****************************************************************************************************************************/ // Copyright 2020 Espressif Systems (Shanghai) PTE LTD