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

Commit 1bc3563

Browse files
authored
v1.7.0 to add ESP32_S2
#### Releases v1.7.0 1. Add support to `ESP32_S2` boards using `LwIP ENC28J60 Ethernet`.
1 parent bda58d9 commit 1bc3563

File tree

1 file changed

+106
-22
lines changed

1 file changed

+106
-22
lines changed

README.md

+106-22
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
* [Methods for controlling websocket connections](#methods-for-controlling-websocket-connections)
7878
* [Adding Default Headers](#adding-default-headers)
7979
* [Path variable](#path-variable)
80-
* [How to connect ENC28J60 to ESP32_S3](#How-to-connect-ENC28J60-to-ESP32_S3)
80+
* [How to connect ENC28J60 to ESP32_S2/S3](#How-to-connect-ENC28J60-to-ESP32_S2S3)
8181
* [Examples](#examples)
8282
* [ 1. Async_AdvancedWebServer](examples/Async_AdvancedWebServer)
8383
* [ 2. Async_AdvancedWebServer_MemoryIssues_SendArduinoString](examples/Async_AdvancedWebServer_MemoryIssues_SendArduinoString)
@@ -225,11 +225,19 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP
225225
#### Currently supported Boards
226226

227227
1. **ESP32_S3 boards** using `LwIP ENC28J60 Ethernet`
228+
2. **ESP32_S2 boards** using `LwIP ENC28J60 Ethernet`
228229

229-
Hopefully the `ESP32_S2` and `ESP32_C3-based` boards will be supported in the near future to use `LwIP W5500 or ENC28J60 Ethernet`
230+
Hopefully the `ESP32_C3-based` boards will be supported in the near future to use `LwIP W5500 or ENC28J60 Ethernet`
230231

231232

232233

234+
#### ESP32S2_DEV
235+
236+
<p align="center">
237+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/raw/main/pics/ESP32S2_DEV.png">
238+
</p>
239+
240+
233241
#### ESP32S3_DEV
234242

235243
<p align="center">
@@ -1253,7 +1261,7 @@ IPAddress myDNS(8, 8, 8, 8);
12531261
// For ENC28J60 & ESP32-S3
12541262
// Optional values to override default settings
12551263
// Don't change unless you know what you're doing
1256-
//#define SPI_HOST SPI3_HOST
1264+
//#define ETH_SPI_HOST SPI3_HOST
12571265
//#define SPI_CLOCK_MHZ 8
12581266

12591267
// Must connect INT to GPIOxx or not working
@@ -1313,7 +1321,7 @@ void setup()
13131321
Serial.println(ASYNC_WEBSERVER_ESP32_SC_ENC_VERSION);
13141322

13151323
AWS_LOGWARN(F("Default SPI pinout:"));
1316-
AWS_LOGWARN1(F("SPI Host:"), SPI_HOST);
1324+
AWS_LOGWARN1(F("SPI Host:"), ETH_SPI_HOST);
13171325
AWS_LOGWARN1(F("MOSI:"), MOSI_GPIO);
13181326
AWS_LOGWARN1(F("MISO:"), MISO_GPIO);
13191327
AWS_LOGWARN1(F("SCK:"), SCK_GPIO);
@@ -1333,8 +1341,8 @@ void setup()
13331341

13341342
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
13351343
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
1336-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
1337-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
1344+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
1345+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
13381346

13391347
// Static IP, leave without this line to get IP via DHCP
13401348
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
@@ -1508,7 +1516,7 @@ build_flags =
15081516
---
15091517
---
15101518

1511-
### How to connect ENC28J60 to ESP32_S3
1519+
### How to connect ENC28J60 to ESP32_S2/S3
15121520

15131521
You can change the `INT` pin to another one. Default is `GPIO4`
15141522

@@ -1517,23 +1525,24 @@ You can change the `INT` pin to another one. Default is `GPIO4`
15171525
#define INT_GPIO 4
15181526
```
15191527

1528+
15201529
---
15211530

15221531

1523-
#### ESP32S3_DEV
1532+
#### ENC28J60
15241533

15251534
<p align="center">
1526-
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/raw/main/pics/ESP32S3_DEV.png">
1527-
</p>
1535+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/raw/main/pics/ENC28J60.png">
1536+
</p>
15281537

1538+
---
15291539

1530-
#### ENC28J60
1540+
#### ESP32S3_DEV
15311541

15321542
<p align="center">
1533-
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/raw/main/pics/ENC28J60.png">
1534-
</p>
1543+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/raw/main/pics/ESP32S3_DEV.png">
1544+
</p>
15351545

1536-
---
15371546

15381547
|ENC28J60|<--->|ESP32_S3|
15391548
|:-:|:-:|:-:|
@@ -1542,6 +1551,26 @@ You can change the `INT` pin to another one. Default is `GPIO4`
15421551
|SCK|<--->|GPIO12|
15431552
|SS|<--->|GPIO10|
15441553
|INT|<--->|GPIO4|
1554+
|GND|<--->|GND|
1555+
|3.3V|<--->|3.3V|
1556+
1557+
1558+
---
1559+
1560+
#### ESP32S2_DEV
1561+
1562+
<p align="center">
1563+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/raw/main/pics/ESP32S2_DEV.png">
1564+
</p>
1565+
1566+
1567+
|ENC28J60|<--->|ESP32_S2|
1568+
|:-:|:-:|:-:|
1569+
|MOSI|<--->|GPIO35|
1570+
|MISO|<--->|GPIO37|
1571+
|SCK|<--->|GPIO36|
1572+
|SS|<--->|GPIO34|
1573+
|INT|<--->|GPIO4|
15451574
|RST|<--->|RST|
15461575
|GND|<--->|GND|
15471576
|3.3V|<--->|3.3V|
@@ -1574,7 +1603,7 @@ You can change the `INT` pin to another one. Default is `GPIO4`
15741603

15751604
### Example [Async_AdvancedWebServer](examples/Async_AdvancedWebServer)
15761605

1577-
https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/blob/a41c9b3f290fa58ee5fa0bc87bab3e8ef05f4670/examples/Async_AdvancedWebServer/Async_AdvancedWebServer.ino#L41-L258
1606+
https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/blob/bda58d919d25fdee17df7aa99488fadec6c59002/examples/Async_AdvancedWebServer/Async_AdvancedWebServer.ino#L41-L258
15781607

15791608

15801609
You can access the Async Advanced WebServer @ the server IP
@@ -1595,7 +1624,7 @@ Following are debug terminal output and screen shots when running example [Async
15951624

15961625
```cpp
15971626
Start AsyncMultiWebServer_ESP32_ENC on ESP32S3_DEV with ESP32_S3_ENC28J60
1598-
AsyncWebServer_ESP32_SC_ENC v1.6.3 for core v2.0.0+
1627+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
15991628
[AWS] Default SPI pinout:
16001629
[AWS] SPI Host: 1
16011630
[AWS] MOSI: 11
@@ -1645,7 +1674,7 @@ Following is the debug terminal and screen shot when running example [Async_Adva
16451674
16461675
```cpp
16471676
Start Async_AdvancedWebServer_MemoryIssues_Send_CString on ESP32S3_DEV with ESP32_S3_ENC28J60
1648-
AsyncWebServer_ESP32_SC_ENC v1.6.3 for core v2.0.0+
1677+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
16491678
[AWS] Default SPI pinout:
16501679
[AWS] SPI Host: 1
16511680
[AWS] MOSI: 11
@@ -1681,7 +1710,7 @@ While using `Arduino String`, the HEAP usage is very large
16811710

16821711
```cpp
16831712
Start Async_AdvancedWebServer_MemoryIssues_SendArduinoString on ESP32S3_DEV with ESP32_S3_ENC28J60
1684-
AsyncWebServer_ESP32_SC_ENC v1.6.3 for core v2.0.0+
1713+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
16851714
[AWS] Default SPI pinout:
16861715
[AWS] SPI Host: 1
16871716
[AWS] MOSI: 11
@@ -1721,7 +1750,7 @@ Following is debug terminal output when running example [Async_AdvancedWebServer
17211750
17221751
```cpp
17231752
Start Async_AdvancedWebServer_SendChunked on ESP32S3_DEV with ESP32_S3_ENC28J60
1724-
AsyncWebServer_ESP32_SC_ENC v1.6.3 for core v2.0.0+
1753+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
17251754
[AWS] Default SPI pinout:
17261755
[AWS] SPI Host: 1
17271756
[AWS] MOSI: 11
@@ -1781,7 +1810,7 @@ Following is debug terminal output when running example [AsyncWebServer_SendChun
17811810

17821811
```cpp
17831812
Start AsyncWebServer_SendChunked on ESP32S3_DEV with ESP32_S3_ENC28J60
1784-
AsyncWebServer_ESP32_SC_ENC v1.6.3 for core v2.0.0+
1813+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
17851814
[AWS] Default SPI pinout:
17861815
[AWS] SPI Host: 1
17871816
[AWS] MOSI: 11
@@ -1847,7 +1876,7 @@ Following is debug terminal output when running example [Async_WebSocketsServer]
18471876
18481877
```cpp
18491878
Starting Async_WebSocketsServer on ESP32S3_DEV with ESP32_S3_ENC28J60
1850-
AsyncWebServer_ESP32_SC_ENC v1.6.3 for core v2.0.0+
1879+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
18511880
[AWS] Default SPI pinout:
18521881
[AWS] SPI Host: 1
18531882
[AWS] MOSI: 11
@@ -1877,7 +1906,7 @@ Following is debug terminal output when running example [Async_HTTPBasicAuth](ex
18771906

18781907
```cpp
18791908
Start Async_HTTPBasicAuth on ESP32S3_DEV with ESP32_S3_ENC28J60
1880-
AsyncWebServer_ESP32_SC_ENC v1.6.3 for core v2.0.0+
1909+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
18811910
[AWS] Default SPI pinout:
18821911
[AWS] SPI Host: 1
18831912
[AWS] MOSI: 11
@@ -1898,6 +1927,59 @@ Login using username = admin and password = esp32_enc28j60
18981927
```
18991928
19001929
1930+
---
1931+
1932+
#### 7. Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_ENC28J60
1933+
1934+
Following is debug terminal output when running example [Async_AdvancedWebServer_SendChunked](examples/Async_AdvancedWebServer_SendChunked) on `ESP32S2_DEV with ESP32_S2_ENC28J60`, using ESP32 core `v2.0.0+`, to demo how to use `beginChunkedResponse()` to send large `html` in chunks. The `built-in MAC address` is used now instead of user-defined one.
1935+
1936+
1937+
```cpp
1938+
Start Async_AdvancedWebServer_SendChunked on ESP32S2_DEV with ESP32_S2_ENC28J60
1939+
AsyncWebServer_ESP32_SC_ENC v1.7.0 for core v2.0.0+
1940+
[AWS] Default SPI pinout:
1941+
[AWS] SPI Host: 1
1942+
[AWS] MOSI: 35
1943+
[AWS] MISO: 37
1944+
[AWS] SCK: 36
1945+
[AWS] CS: 34
1946+
[AWS] INT: 4
1947+
[AWS] SPI Clock (MHz): 8
1948+
[AWS] =========================
1949+
1950+
ETH Started
1951+
ETH Connected
1952+
ETH MAC: 7E:DF:A1:08:64:27, IPv4: 192.168.2.132
1953+
FULL_DUPLEX, 10Mbps
1954+
AsyncWebServer is @ IP : 192.168.2.132
1955+
..[AWS] Total length to send in chunks = 31259
1956+
[AWS] Bytes sent in chunk = 5620
1957+
[AWS] Bytes sent in chunk = 4300
1958+
[AWS] Bytes sent in chunk = 4300
1959+
[AWS] Bytes sent in chunk = 4300
1960+
[AWS] Bytes sent in chunk = 4300
1961+
[AWS] Bytes sent in chunk = 4300
1962+
[AWS] Bytes sent in chunk = 4139
1963+
[AWS] Bytes sent in chunk = 0
1964+
[AWS] Total length to send in chunks = 31279
1965+
[AWS] Bytes sent in chunk = 5620
1966+
[AWS] Bytes sent in chunk = 4300
1967+
[AWS] Bytes sent in chunk = 4300
1968+
[AWS] Bytes sent in chunk = 4300
1969+
[AWS] Bytes sent in chunk = 4300
1970+
[AWS] Bytes sent in chunk = 4300
1971+
[AWS] Bytes sent in chunk = 4159
1972+
[AWS] Bytes sent in chunk = 0
1973+
```
1974+
1975+
1976+
You can access the Async Advanced WebServers @ the server IP
1977+
1978+
<p align="center">
1979+
<img src="https://github.com/khoih-prog/AsyncWebServer_ESP32_SC_ENC/raw/main/pics/AsyncWebServer_SendChunked_ESP32_S2.png">
1980+
</p>
1981+
1982+
19011983
---
19021984
---
19031985

@@ -1951,6 +2033,8 @@ Submit issues to: [AsyncWebServer_ESP32_SC_ENC issues](https://github.com/khoih-
19512033
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
19522034
9. Use `allman astyle` and add `utils`
19532035
10. Add `Async_WebSocketsServer`, `Async_HttpBasicAuth` and `MQTT` examples
2036+
11. Add support to **ESP32S2-based boards** using `LwIP ENC28J60 Ethernet`
2037+
19542038

19552039
---
19562040
---

0 commit comments

Comments
 (0)