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

Commit ce9badb

Browse files
authored
v1.13.0 for ESP32_S2/C3 & LwIP Ethernet
### Releases v1.13.0 1. Add support to `ESP32S2/C3` boards using `LwIP W5500 or ENC28J60 Ethernet`
1 parent 6701d6e commit ce9badb

14 files changed

+113
-105
lines changed

Images/ESP32S2_DEV.png

352 KB
Loading

Images/ESP32_C3_DevKitC_02.png

205 KB
Loading

changelog.md

+5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717
## Table of Contents
1818

1919
* [Changelog](#changelog)
20+
* [Releases v1.13.0](#releases-v1130)
2021
* [Releases v1.12.0](#releases-v1120)
2122

2223
---
2324
---
2425

2526
## Changelog
2627

28+
### Releases v1.13.0
29+
30+
1. Add support to `ESP32S2/C3` boards using `LwIP W5500 or ENC28J60 Ethernet`
31+
2732
### Releases v1.12.0
2833

2934
1. Initial coding to port [AsyncHTTPRequest_Generic](https://github.com/khoih-prog/AsyncHTTPRequest_Generic) to `ESP32/S2/S3/C3` boards using `LwIP W5500 / ENC28J60 / LAN8720 Ethernet`

examples/ESP32_SC_ENC/AsyncHTTPMultiRequests_ESP32_SC_ENC/AsyncHTTPMultiRequests_ESP32_SC_ENC.ino

+21-5
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757

5858
/////////////////////////////////////////////
5959

60+
// For ESP32-S3
6061
// Optional values to override default settings
61-
//#define SPI_HOST SPI2_HOST
62+
//#define ETH_SPI_HOST SPI2_HOST
6263
//#define SPI_CLOCK_MHZ 8
6364

6465
// Must connect INT to GPIOxx or not working
@@ -69,12 +70,26 @@
6970
//#define SCK_GPIO 12
7071
//#define CS_GPIO 10
7172

73+
// For ESP32_C3
74+
// Optional values to override default settings
75+
// Don't change unless you know what you're doing
76+
//#define ETH_SPI_HOST SPI2_HOST
77+
//#define SPI_CLOCK_MHZ 8
78+
79+
// Must connect INT to GPIOxx or not working
80+
//#define INT_GPIO 10
81+
82+
//#define MISO_GPIO 5
83+
//#define MOSI_GPIO 6
84+
//#define SCK_GPIO 4
85+
//#define CS_GPIO 7
86+
7287
/////////////////////////////////////////////
7388

7489
#include <WebServer_ESP32_SC_ENC.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_ENC
7590

76-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.12.0"
77-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1012000
91+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.13.0"
92+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1013000
7893

7994
// Uncomment for certain HTTP site to optimize
8095
//#define NOT_SEND_HEADER_AFTER_CONNECTED true
@@ -257,6 +272,7 @@ void setup()
257272
#endif
258273

259274
AHTTP_LOGWARN(F("Default SPI pinout:"));
275+
AHTTP_LOGWARN1(F("SPI Host:"), ETH_SPI_HOST);
260276
AHTTP_LOGWARN1(F("MOSI:"), MOSI_GPIO);
261277
AHTTP_LOGWARN1(F("MISO:"), MISO_GPIO);
262278
AHTTP_LOGWARN1(F("SCK:"), SCK_GPIO);
@@ -276,8 +292,8 @@ void setup()
276292

277293
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
278294
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
279-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
280-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
295+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
296+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
281297

282298
// Static IP, leave without this line to get IP via DHCP
283299
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/ESP32_SC_ENC/AsyncHTTPRequest_ESP32_SC_ENC/AsyncHTTPRequest_ESP32_SC_ENC.ino

+21-5
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757

5858
/////////////////////////////////////////////
5959

60+
// For ESP32-S3
6061
// Optional values to override default settings
61-
//#define SPI_HOST SPI2_HOST
62+
//#define ETH_SPI_HOST SPI2_HOST
6263
//#define SPI_CLOCK_MHZ 8
6364

6465
// Must connect INT to GPIOxx or not working
@@ -69,12 +70,26 @@
6970
//#define SCK_GPIO 12
7071
//#define CS_GPIO 10
7172

73+
// For ESP32_C3
74+
// Optional values to override default settings
75+
// Don't change unless you know what you're doing
76+
//#define ETH_SPI_HOST SPI2_HOST
77+
//#define SPI_CLOCK_MHZ 8
78+
79+
// Must connect INT to GPIOxx or not working
80+
//#define INT_GPIO 10
81+
82+
//#define MISO_GPIO 5
83+
//#define MOSI_GPIO 6
84+
//#define SCK_GPIO 4
85+
//#define CS_GPIO 7
86+
7287
/////////////////////////////////////////////
7388

7489
#include <WebServer_ESP32_SC_ENC.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_ENC
7590

76-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.12.0"
77-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1012000
91+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.13.0"
92+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1013000
7893

7994
// Uncomment for certain HTTP site to optimize
8095
//#define NOT_SEND_HEADER_AFTER_CONNECTED true
@@ -219,6 +234,7 @@ void setup()
219234
#endif
220235

221236
AHTTP_LOGWARN(F("Default SPI pinout:"));
237+
AHTTP_LOGWARN1(F("SPI Host:"), ETH_SPI_HOST);
222238
AHTTP_LOGWARN1(F("MOSI:"), MOSI_GPIO);
223239
AHTTP_LOGWARN1(F("MISO:"), MISO_GPIO);
224240
AHTTP_LOGWARN1(F("SCK:"), SCK_GPIO);
@@ -238,8 +254,8 @@ void setup()
238254

239255
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
240256
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
241-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
242-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
257+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
258+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
243259

244260
// Static IP, leave without this line to get IP via DHCP
245261
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/ESP32_SC_W5500/AsyncHTTPMultiRequests_ESP32_SC_W5500/AsyncHTTPMultiRequests_ESP32_SC_W5500.ino

+19-5
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@
5757

5858
//////////////////////////////////////////////////////////
5959

60+
// For ESP32-S3
6061
// Optional values to override default settings
61-
// Don't change unless you know what you're doing
62-
//#define ETH_SPI_HOST SPI3_HOST
63-
//#define SPI_CLOCK_MHZ 25
62+
//#define ETH_SPI_HOST SPI2_HOST
63+
//#define SPI_CLOCK_MHZ 8
6464

6565
// Must connect INT to GPIOxx or not working
6666
//#define INT_GPIO 4
@@ -70,12 +70,26 @@
7070
//#define SCK_GPIO 12
7171
//#define CS_GPIO 10
7272

73+
// For ESP32_C3
74+
// Optional values to override default settings
75+
// Don't change unless you know what you're doing
76+
//#define ETH_SPI_HOST SPI2_HOST
77+
//#define SPI_CLOCK_MHZ 8
78+
79+
// Must connect INT to GPIOxx or not working
80+
//#define INT_GPIO 10
81+
82+
//#define MISO_GPIO 5
83+
//#define MOSI_GPIO 6
84+
//#define SCK_GPIO 4
85+
//#define CS_GPIO 7
86+
7387
//////////////////////////////////////////////////////////
7488

7589
#include <WebServer_ESP32_SC_W5500.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_W5500
7690

77-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.12.0"
78-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1012000
91+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.13.0"
92+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1013000
7993

8094
// Uncomment for certain HTTP site to optimize
8195
//#define NOT_SEND_HEADER_AFTER_CONNECTED true

examples/ESP32_SC_W5500/AsyncHTTPRequest_ESP32_SC_W5500/AsyncHTTPRequest_ESP32_SC_W5500.ino

+19-5
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@
5757

5858
//////////////////////////////////////////////////////////
5959

60+
// For ESP32-S3
6061
// Optional values to override default settings
61-
// Don't change unless you know what you're doing
62-
//#define ETH_SPI_HOST SPI3_HOST
63-
//#define SPI_CLOCK_MHZ 25
62+
//#define ETH_SPI_HOST SPI2_HOST
63+
//#define SPI_CLOCK_MHZ 8
6464

6565
// Must connect INT to GPIOxx or not working
6666
//#define INT_GPIO 4
@@ -70,12 +70,26 @@
7070
//#define SCK_GPIO 12
7171
//#define CS_GPIO 10
7272

73+
// For ESP32_C3
74+
// Optional values to override default settings
75+
// Don't change unless you know what you're doing
76+
//#define ETH_SPI_HOST SPI2_HOST
77+
//#define SPI_CLOCK_MHZ 8
78+
79+
// Must connect INT to GPIOxx or not working
80+
//#define INT_GPIO 10
81+
82+
//#define MISO_GPIO 5
83+
//#define MOSI_GPIO 6
84+
//#define SCK_GPIO 4
85+
//#define CS_GPIO 7
86+
7387
//////////////////////////////////////////////////////////
7488

7589
#include <WebServer_ESP32_SC_W5500.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_W5500
7690

77-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.12.0"
78-
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1012000
91+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPRequest_ESP32_Ethernet v1.13.0"
92+
#define ASYNC_HTTP_REQUEST_ESP32_ETHERNET_VERSION_MIN 1013000
7993

8094
// Uncomment for certain HTTP site to optimize
8195
//#define NOT_SEND_HEADER_AFTER_CONNECTED true

library.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"AsyncHTTPRequest_ESP32_Ethernet",
3-
"version": "1.12.0",
3+
"version": "1.13.0",
44
"description":"Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP library for ESP32/S2/S3/C3, WT32_ETH01 (ESP32 + LAN8720), ESP32 using LwIP ENC28J60, W5500 or LAN8720",
55
"keywords":"communication, async, tcp, http, esp32, esp32-s2, esp32-s3, esp32-c3, wt32-eth01, ethernet, w5500, enc28j60, lan8720, lwip, lwip-ethernet, lwip-enc28j60, lwip-w5500, lwip-lan8720",
66
"authors": [
@@ -63,13 +63,13 @@
6363
{
6464
"owner": "khoih-prog",
6565
"name": "WebServer_ESP32_SC_ENC",
66-
"version": ">=1.0.0",
66+
"version": ">=1.2.0",
6767
"platforms": ["espressif32"]
6868
},
6969
{
7070
"owner": "khoih-prog",
7171
"name": "WebServer_ESP32_SC_W5500",
72-
"version": ">=1.0.1",
72+
"version": ">=1.2.0",
7373
"platforms": ["espressif32"]
7474
}
7575
],

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=AsyncHTTPRequest_ESP32_Ethernet
2-
version=1.12.0
2+
version=1.13.0
33
author=Bob Lemaire,Khoi Hoang <khoih.prog@gmail.com>
44
maintainer=Khoi Hoang <khoih.prog@gmail.com>
55
license=GPLv3

platformio/platformio.ini

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ lib_deps =
4444
; WebServer_WT32_ETH01@>=1.5.1
4545
; WebServer_ESP32_W5500@>=1.5.1
4646
; WebServer_ESP32_ENC@>=1.5.1
47-
; WebServer_ESP32_SC_W5500@>=1.0.1
48-
; WebServer_ESP32_SC_ENC@>=1.0.0
47+
; WebServer_ESP32_SC_W5500@>=1.2.0
48+
; WebServer_ESP32_SC_ENC@>=1.2.0
4949
; PlatformIO 5.x
5050
me-no-dev/AsyncTCP@>=1.1.1
5151
khoih-prog/ESPAsync_WiFiManager@>=1.15.1
5252
khoih-prog/WebServer_WT32_ETH01@>=1.5.1
5353
khoih-prog/WebServer_ESP32_W5500@>=1.5.1
5454
khoih-prog/WebServer_ESP32_ENC@>=1.5.1
55-
khoih-prog/WebServer_ESP32_SC_W5500@>=1.0.1
56-
khoih-prog/WebServer_ESP32_SC_ENC@>=1.0.0
55+
khoih-prog/WebServer_ESP32_SC_W5500@>=1.2.0
56+
khoih-prog/WebServer_ESP32_SC_ENC@>=1.2.0
5757

5858
; ============================================================
5959
build_flags =

src/AsyncHTTPRequest_ESP32_Ethernet.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
You should have received a copy of the GNU General Public License along with this program.
1919
If not, see <https://www.gnu.org/licenses/>.
2020
21-
Version: 1.12.0
21+
Version: 1.13.0
2222
2323
Version Modified By Date Comments
2424
------- ----------- ---------- -----------
2525
1.12.0 K Hoang 16/12/2022 Initial coding to port to ESP32S3 boards using LwIP W5500 or ENC28J60 Ethernet
26+
1.13.0 K Hoang 21/12/2022 Add support to ESP32S2/C3 boards using LwIP W5500 or ENC28J60 Ethernet
2627
*****************************************************************************************************************************/
2728

2829
#pragma once

0 commit comments

Comments
 (0)