Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
v1.7.0 to add ESP32_S2
Browse files Browse the repository at this point in the history
#### Releases v1.7.0

1. Add support to `ESP32_S2` boards using `LwIP W5500 Ethernet`
  • Loading branch information
khoih-prog authored Dec 20, 2022
1 parent 93e6610 commit eeb018f
Show file tree
Hide file tree
Showing 34 changed files with 208 additions and 69 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
143 changes: 125 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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

<p align="center">
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32S2_DEV.png">
</p>


#### ESP32S3_DEV
Expand All @@ -230,7 +240,7 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32S3_DEV.png">
</p>


---

#### W5500

Expand Down Expand Up @@ -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`

Expand All @@ -1513,13 +1523,6 @@ You can change the `INT` pin to another one. Default is `GPIO4`

---


#### ESP32S3_DEV

<p align="center">
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32S3_DEV.png">
</p>

#### W5500

<p align="center">
Expand All @@ -1530,6 +1533,14 @@ You can change the `INT` pin to another one. Default is `GPIO4`
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/W5500_small.png">
</p>

---


#### ESP32S3_DEV

<p align="center">
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32S3_DEV.png">
</p>


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


---

#### ESP32S2_DEV

<p align="center">
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32S2_DEV.png">
</p>


|ENC28J60|<--->|ESP32_S2|
|:-:|:-:|:-:|
|MOSI|<--->|GPIO35|
|MISO|<--->|GPIO37|
|SCK|<--->|GPIO36|
|SS|<--->|GPIO34|
|INT|<--->|GPIO4|
|RST|<--->|RST|
|GND|<--->|GND|
|3.3V|<--->|3.3V|


---
---

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

<p align="center">
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/AsyncWebServer_SendChunked_ESP32_S2.png">
</p>


---
---

Expand Down Expand Up @@ -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`


---
---
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
## Table of contents

* [Changelog](#changelog)
* [Releases v1.7.0](#releases-v170)
* [Releases v1.6.3](#releases-v163)


Expand All @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -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":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
license=GPLv3
Expand Down
Binary file added pics/AsyncWebServer_SendChunked_ESP32_S2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/ESP32S2_DEV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/AsyncEventSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/AsyncEventSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand Down
3 changes: 2 additions & 1 deletion src/AsyncJson.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/AsyncWebServer_ESP32_SC_W5500.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit eeb018f

Please sign in to comment.