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

Commit 9f1dfa5

Browse files
authored
v1.8.0 to add ESP32_C3
#### Releases v1.8.0 1. Add support to `ESP32_C3` boards using `LwIP W5500 Ethernet`
1 parent eeb018f commit 9f1dfa5

34 files changed

+244
-137
lines changed

README.md

Lines changed: 116 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
## Table of contents
1717

18-
* [Table of contents](#table-of-contents)
1918
* [Important Note](#Important-Note)
2019
* [Why do we need this AsyncWebServer_ESP32_SC_W5500 library](#why-do-we-need-this-AsyncWebServer_ESP32_SC_W5500-library)
2120
* [Features](#features)
@@ -77,7 +76,7 @@
7776
* [Methods for controlling websocket connections](#methods-for-controlling-websocket-connections)
7877
* [Adding Default Headers](#adding-default-headers)
7978
* [Path variable](#path-variable)
80-
* [How to connect W5500 to ESP32_S2/S3](#How-to-connect-W5500-to-ESP32_S2S3)
79+
* [How to connect W5500 to ESP32_S2/S3/C3](#How-to-connect-W5500-to-ESP32_S2S3C3)
8180
* [Examples](#examples)
8281
* [ 1. Async_AdvancedWebServer](examples/Async_AdvancedWebServer)
8382
* [ 2. Async_AdvancedWebServer_MemoryIssues_SendArduinoString](examples/Async_AdvancedWebServer_MemoryIssues_SendArduinoString)
@@ -104,6 +103,7 @@
104103
* [5. Async_WebSocketsServer on ESP32S3_DEV with ESP32_S3_W5500](#5-Async_WebSocketsServer-on-ESP32S3_DEV-with-ESP32_S3_W5500)
105104
* [6. Async_HTTPBasicAuth on ESP32S3_DEV with ESP32_S3_W5500](#6-Async_HTTPBasicAuth-on-ESP32S3_DEV-with-ESP32_S3_W5500)
106105
* [7. Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_W5500](#7-Async_AdvancedWebServer_SendChunked-on-ESP32S2_DEV-with-ESP32_S2_W5500)
106+
* [8. Async_AdvancedWebServer_SendChunked on ESP32C3_DEV with ESP32_C3_W5500](#8-Async_AdvancedWebServer_SendChunked-on-ESP32C3_DEV-with-ESP32_C3_W5500)
107107
* [Debug](#debug)
108108
* [Troubleshooting](#troubleshooting)
109109
* [Issues](#issues)
@@ -222,8 +222,8 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP
222222

223223
1. **ESP32_S3 boards** using `LwIP W5500 Ethernet`
224224
2. **ESP32_S2 boards** using `LwIP W5500 Ethernet`
225+
3. **ESP32_C3 boards** using `LwIP W5500 Ethernet`
225226

226-
Hopefully the `ESP32_C3-based` boards will be supported in the near future to use `LwIP W5500 or ENC28J60 Ethernet`
227227

228228
---
229229

@@ -240,6 +240,13 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP
240240
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32S3_DEV.png">
241241
</p>
242242

243+
244+
#### ESP32C3_DEV
245+
246+
<p align="center">
247+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32_C3_DevKitC_02.png">
248+
</p>
249+
243250
---
244251

245252
#### W5500
@@ -1512,7 +1519,7 @@ build_flags =
15121519
---
15131520
---
15141521

1515-
### How to connect W5500 to ESP32_S2/S3
1522+
### How to connect W5500 to ESP32_S2/S3/C3
15161523

15171524
You can change the `INT` pin to another one. Default is `GPIO4`
15181525

@@ -1575,6 +1582,29 @@ You can change the `INT` pin to another one. Default is `GPIO4`
15751582
|GND|<--->|GND|
15761583
|3.3V|<--->|3.3V|
15771584

1585+
---
1586+
1587+
1588+
#### ESP32C3_DEV
1589+
1590+
<p align="center">
1591+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/ESP32_C3_DevKitC_02.png">
1592+
</p>
1593+
1594+
1595+
|W5500|<--->|ESP32_C3|
1596+
|:-:|:-:|:-:|
1597+
|MOSI|<--->|GPIO6|
1598+
|MISO|<--->|GPIO5|
1599+
|SCK|<--->|GPIO4|
1600+
|SS|<--->|GPIO7|
1601+
|INT|<--->|GPIO10|
1602+
|RST|<--->|RST|
1603+
|GND|<--->|GND|
1604+
|3.3V|<--->|3.3V|
1605+
1606+
1607+
15781608

15791609
---
15801610
---
@@ -1625,7 +1655,7 @@ Following are debug terminal output and screen shots when running example [Async
16251655

16261656
```cpp
16271657
Start AsyncMultiWebServer_ESP32_W5500 on ESP32S3_DEV with ESP32_S3_W5500
1628-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1658+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
16291659
[AWS] Default SPI pinout:
16301660
[AWS] SPI_HOST: 2
16311661
[AWS] MOSI: 11
@@ -1675,7 +1705,7 @@ Following is the debug terminal and screen shot when running example [Async_Adva
16751705
16761706
```cpp
16771707
Start Async_AdvancedWebServer_MemoryIssues_Send_CString on ESP32S3_DEV with ESP32_S3_W5500
1678-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1708+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
16791709
[AWS] Default SPI pinout:
16801710
[AWS] SPI_HOST: 2
16811711
[AWS] MOSI: 11
@@ -1709,7 +1739,7 @@ While using `Arduino String`, the HEAP usage is very large
17091739

17101740
```cpp
17111741
Start Async_AdvancedWebServer_MemoryIssues_SendArduinoString on ESP32S3_DEV with ESP32_S3_W5500
1712-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1742+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
17131743
[AWS] Default SPI pinout:
17141744
[AWS] SPI_HOST: 2
17151745
[AWS] MOSI: 11
@@ -1751,7 +1781,7 @@ Following is debug terminal output when running example [Async_AdvancedWebServer
17511781
17521782
```cpp
17531783
Start Async_AdvancedWebServer_SendChunked on ESP32S3_DEV with ESP32_S3_W5500
1754-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1784+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
17551785
[AWS] Default SPI pinout:
17561786
[AWS] SPI_HOST: 2
17571787
[AWS] MOSI: 11
@@ -1821,7 +1851,7 @@ Following is debug terminal output when running example [AsyncWebServer_SendChun
18211851

18221852
```cpp
18231853
Start AsyncWebServer_SendChunked on ESP32S3_DEV with ESP32_S3_W5500
1824-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1854+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
18251855
[AWS] Default SPI pinout:
18261856
[AWS] SPI_HOST: 2
18271857
[AWS] MOSI: 11
@@ -1872,7 +1902,7 @@ Following is debug terminal output when running example [Async_WebSocketsServer]
18721902
18731903
```cpp
18741904
Starting Async_WebSocketsServer on ESP32S3_DEV with ESP32_S3_W5500
1875-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1905+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
18761906
[AWS] Default SPI pinout:
18771907
[AWS] SPI_HOST: 2
18781908
[AWS] MOSI: 11
@@ -1902,7 +1932,7 @@ Following is debug terminal output when running example [Async_HTTPBasicAuth](ex
19021932

19031933
```cpp
19041934
Start Async_HTTPBasicAuth on ESP32S3_DEV with ESP32_S3_W5500
1905-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1935+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
19061936
[AWS] Default SPI pinout:
19071937
[AWS] SPI_HOST: 2
19081938
[AWS] MOSI: 11
@@ -1922,7 +1952,6 @@ Open http://192.168.2.88/ in your browser to see it working
19221952
Login using username = admin and password = esp32_w5500
19231953
```
19241954
1925-
19261955
---
19271956
19281957
#### 7. Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_W5500
@@ -1931,7 +1960,7 @@ Following is debug terminal output when running example [Async_AdvancedWebServer
19311960
19321961
```cpp
19331962
Start Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_W5500
1934-
AsyncWebServer_ESP32_SC_W5500 v1.7.0 for core v2.0.0+
1963+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
19351964
[AWS] Default SPI pinout:
19361965
[AWS] SPI_HOST: 2
19371966
[AWS] MOSI: 35
@@ -1995,6 +2024,79 @@ You can access the Async Advanced WebServers @ the server IP
19952024
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/AsyncWebServer_SendChunked_ESP32_S2.png">
19962025
</p>
19972026

2027+
---
2028+
2029+
#### 8. Async_AdvancedWebServer_SendChunked on ESP32C3_DEV with ESP32_C3_W5500
2030+
2031+
Following is debug terminal output when running example [Async_AdvancedWebServer_SendChunked](examples/Async_AdvancedWebServer_SendChunked) on `ESP32C3_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.
2032+
2033+
```cpp
2034+
Start Async_AdvancedWebServer_SendChunked on ESP32C3_DEV with ESP32_C3_W5500
2035+
AsyncWebServer_ESP32_SC_W5500 v1.8.0 for core v2.0.0+
2036+
[AWS] Default SPI pinout:
2037+
[AWS] SPI_HOST: 1
2038+
[AWS] MOSI: 6
2039+
[AWS] MISO: 5
2040+
[AWS] SCK: 4
2041+
[AWS] CS: 7
2042+
[AWS] INT: 10
2043+
[AWS] SPI Clock (MHz): 25
2044+
[AWS] =========================
2045+
2046+
ETH Started
2047+
ETH Connected
2048+
ETH MAC: 7C:DF:A1:BC:BC:53, IPv4: 192.168.2.135
2049+
FULL_DUPLEX, 100Mbps
2050+
AsyncWebServer is @ IP : 192.168.2.135
2051+
.[AWS] Total length to send in chunks = 31259
2052+
[AWS] Bytes sent in chunk = 5620
2053+
[AWS] Bytes sent in chunk = 1428
2054+
[AWS] Bytes sent in chunk = 1428
2055+
[AWS] Bytes sent in chunk = 1428
2056+
[AWS] Bytes sent in chunk = 1428
2057+
[AWS] Bytes sent in chunk = 1428
2058+
[AWS] Bytes sent in chunk = 1428
2059+
[AWS] Bytes sent in chunk = 1428
2060+
[AWS] Bytes sent in chunk = 1428
2061+
[AWS] Bytes sent in chunk = 1428
2062+
[AWS] Bytes sent in chunk = 1428
2063+
[AWS] Bytes sent in chunk = 1428
2064+
[AWS] Bytes sent in chunk = 1428
2065+
[AWS] Bytes sent in chunk = 1428
2066+
[AWS] Bytes sent in chunk = 1428
2067+
[AWS] Bytes sent in chunk = 1428
2068+
[AWS] Bytes sent in chunk = 1428
2069+
[AWS] Bytes sent in chunk = 2791
2070+
[AWS] Bytes sent in chunk = 0
2071+
[AWS] Total length to send in chunks = 31279
2072+
[AWS] Bytes sent in chunk = 5620
2073+
[AWS] Bytes sent in chunk = 1428
2074+
[AWS] Bytes sent in chunk = 1428
2075+
[AWS] Bytes sent in chunk = 1428
2076+
[AWS] Bytes sent in chunk = 1428
2077+
[AWS] Bytes sent in chunk = 1428
2078+
[AWS] Bytes sent in chunk = 1428
2079+
[AWS] Bytes sent in chunk = 1428
2080+
[AWS] Bytes sent in chunk = 1428
2081+
[AWS] Bytes sent in chunk = 1428
2082+
[AWS] Bytes sent in chunk = 1428
2083+
[AWS] Bytes sent in chunk = 1428
2084+
[AWS] Bytes sent in chunk = 1428
2085+
[AWS] Bytes sent in chunk = 1428
2086+
[AWS] Bytes sent in chunk = 1428
2087+
[AWS] Bytes sent in chunk = 1428
2088+
[AWS] Bytes sent in chunk = 1428
2089+
[AWS] Bytes sent in chunk = 2811
2090+
[AWS] Bytes sent in chunk = 0
2091+
```
2092+
2093+
You can access the Async Advanced WebServers @ the server IP
2094+
2095+
<p align="center">
2096+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500/raw/main/pics/AsyncWebServer_SendChunked_ESP32_C3.png">
2097+
</p>
2098+
2099+
19982100
19992101
---
20002102
---
@@ -2049,6 +2151,7 @@ Submit issues to: [AsyncWebServer_ESP32_SC_W5500 issues](https://github.com/khoi
20492151
9. Use `allman astyle` and add `utils`
20502152
10. Add `Async_WebSocketsServer`, `Async_HttpBasicAuth` and `MQTT` examples
20512153
11. Add support to **ESP32S2-based boards** using `LwIP W5500 Ethernet`
2154+
12. Add support to **ESP32C3-based boards** using `LwIP W5500 Ethernet`
20522155

20532156

20542157
---

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
## Table of contents
1616

1717
* [Changelog](#changelog)
18+
* [Releases v1.8.0](#releases-v180)
1819
* [Releases v1.7.0](#releases-v170)
1920
* [Releases v1.6.3](#releases-v163)
2021

@@ -24,6 +25,10 @@
2425

2526
## Changelog
2627

28+
#### Releases v1.8.0
29+
30+
1. Add support to `ESP32_C3` boards using `LwIP W5500 Ethernet`
31+
2732
#### Releases v1.7.0
2833

2934
1. Add support to `ESP32_S2` boards using `LwIP W5500 Ethernet`

examples/Async_AdvancedWebServer/Async_AdvancedWebServer.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,20 @@ IPAddress myDNS(8, 8, 8, 8);
9696
//#define SCK_GPIO 12
9797
//#define CS_GPIO 10
9898

99+
// For ESP32_C3
100+
// Optional values to override default settings
101+
// Don't change unless you know what you're doing
102+
//#define ETH_SPI_HOST SPI2_HOST
103+
//#define SPI_CLOCK_MHZ 25
104+
105+
// Must connect INT to GPIOxx or not working
106+
//#define INT_GPIO 10
107+
108+
//#define MISO_GPIO 5
109+
//#define MOSI_GPIO 6
110+
//#define SCK_GPIO 4
111+
//#define CS_GPIO 7
112+
99113
//////////////////////////////////////////////////////////
100114

101115
#include <AsyncTCP.h>

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"AsyncWebServer_ESP32_SC_W5500",
3-
"version": "1.7.0",
3+
"version": "1.8.0",
44
"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",
55
"keywords":"http, async, async-webserver, async-websocket, websocket, webserver, esp32, esp32-s2, esp32-s3, esp32-c3, w5500, lwip, lwip-w5500, lwip-ethernet",
66
"authors":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=AsyncWebServer_ESP32_SC_W5500
2-
version=1.7.0
2+
version=1.8.0
33
author=Hristo Gochkov,Khoi Hoang
44
maintainer=Khoi Hoang <khoih.prog@gmail.com>
55
license=GPLv3
75.6 KB
Loading

pics/ESP32_C3_DevKitC_02.png

205 KB
Loading

src/AsyncEventSource.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
AsyncEventSource.cpp - Dead simple Ethernet AsyncWebServer.
33
4-
For W5500 LwIP Ethernet in ESP32_SC_W5500 (ESP32_S2/3, ESP32_C3 + W5500)
4+
For W5500 LwIP Ethernet in ESP32_SC_W5500 (ESP32_S2/S3/C3 + W5500)
55
6-
AsyncWebServer_ESP32_SC_W5500 is a library for the LwIP Ethernet W5500 in ESP32_S2/3, ESP32_C3 to run AsyncWebServer
6+
AsyncWebServer_ESP32_SC_W5500 is a library for the LwIP Ethernet W5500 in ESP32_S2/S3/C3 to run AsyncWebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500
@@ -22,12 +22,13 @@
2222
You should have received a copy of the GNU Lesser General Public License along with this library;
2323
if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2424
25-
Version: 1.7.0
25+
Version: 1.8.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
2929
1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3
3030
1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500)
31+
1.8.0 K Hoang 20/12/2022 Add support to ESP32_C3_W5500 (ESP32_C3 + LwIP W5500)
3132
*****************************************************************************************************************************/
3233

3334
#include "Arduino.h"

src/AsyncEventSource.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
AsyncEventSource.h - Dead simple Ethernet AsyncWebServer.
33
4-
For W5500 LwIP Ethernet in ESP32_SC_W5500 (ESP32_S2/3, ESP32_C3 + W5500)
4+
For W5500 LwIP Ethernet in ESP32_SC_W5500 (ESP32_S2/S3/C3 + W5500)
55
6-
AsyncWebServer_ESP32_SC_W5500 is a library for the LwIP Ethernet W5500 in ESP32_S2/3, ESP32_C3 to run AsyncWebServer
6+
AsyncWebServer_ESP32_SC_W5500 is a library for the LwIP Ethernet W5500 in ESP32_S2/S3/C3 to run AsyncWebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500
@@ -22,12 +22,13 @@
2222
You should have received a copy of the GNU Lesser General Public License along with this library;
2323
if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2424
25-
Version: 1.7.0
25+
Version: 1.8.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
2929
1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3
3030
1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500)
31+
1.8.0 K Hoang 20/12/2022 Add support to ESP32_C3_W5500 (ESP32_C3 + LwIP W5500)
3132
*****************************************************************************************************************************/
3233

3334
#ifndef ASYNCEVENTSOURCE_H_

src/AsyncJson.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
AsyncJson.h - Dead simple Ethernet AsyncWebServer.
33
4-
For W5500 LwIP Ethernet in ESP32_SC_W5500 (ESP32_S2/3, ESP32_C3 + W5500)
4+
For W5500 LwIP Ethernet in ESP32_SC_W5500 (ESP32_S2/S3/C3 + W5500)
55
6-
AsyncWebServer_ESP32_SC_W5500 is a library for the LwIP Ethernet W5500 in ESP32_S2/3, ESP32_C3 to run AsyncWebServer
6+
AsyncWebServer_ESP32_SC_W5500 is a library for the LwIP Ethernet W5500 in ESP32_S2/S3/C3 to run AsyncWebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_W5500
@@ -22,12 +22,13 @@
2222
You should have received a copy of the GNU Lesser General Public License along with this library;
2323
if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2424
25-
Version: 1.7.0
25+
Version: 1.8.0
2626
2727
Version Modified By Date Comments
2828
------- ----------- ---------- -----------
2929
1.6.3 K Hoang 15/12/2022 Initial porting for W5500 + ESP32_S3. Sync with AsyncWebServer_ESP32_W5500 v1.6.3
3030
1.7.0 K Hoang 19/12/2022 Add support to ESP32_S2_W5500 (ESP32_S2 + LwIP W5500)
31+
1.8.0 K Hoang 20/12/2022 Add support to ESP32_C3_W5500 (ESP32_C3 + LwIP W5500)
3132
*****************************************************************************************************************************/
3233
/*
3334
Async Response to use with ArduinoJson and AsyncWebServer

0 commit comments

Comments
 (0)