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

Commit

Permalink
v2.4.0 for ESP32 and LwIP W5500 Ethernet
Browse files Browse the repository at this point in the history
### Releases v2.4.0

1. Add support to ESP32 boards using `LwIP W5500 Ethernet`
2. Fix bug. Check [Fix "blank new line in chunk" bug #50](khoih-prog/AsyncHTTPRequest_Generic#50)
  • Loading branch information
khoih-prog authored Dec 1, 2022
1 parent 6168613 commit 4f4c284
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 33 deletions.
144 changes: 124 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
* [1. ESP32 has 2 ADCs, named ADC1 and ADC2](#1--esp32-has-2-adcs-named-adc1-and-adc2)
* [2. ESP32 ADCs functions](#2-esp32-adcs-functions)
* [3. ESP32 WiFi uses ADC2 for WiFi functions](#3-esp32-wifi-uses-adc2-for-wifi-functions)
* [HOWTO use ESP32 with LwIP W5500 or ENC28J60 Ethernet](#HOWTO-use-ESP32-with-LwIP-W5500-or-ENC28J60-Ethernet)
* [1. ESP32 Wiring](#1-ESP32-wiring)
* [Examples](#examples)
* [For ESP32](#for-esp32)
* [1. AsyncHTTPSRequest_ESP](examples/AsyncHTTPSRequest_ESP)
Expand All @@ -63,6 +65,7 @@
* [ 9. AsyncHTTPSRequest_ESP_Multi on ESP32_DEV](#9-AsyncHTTPSRequest_ESP_Multi-on-ESP32_DEV) **New**
* [10. AsyncHTTP_HTTPSRequest_ESP on ESP32_DEV](#10-AsyncHTTP_HTTPSRequest_ESP-on-ESP32_DEV) **New**
* [11. AsyncHTTPSRequest_ESP32_ENC using ESP32_DEV with ESP32_ENC28J60](#11-AsyncHTTPSRequest_ESP32_ENC-using-ESP32_DEV-with-ESP32_ENC28J60) **New**
* [12. AsyncHTTPSRequest_ESP32_W5500 using ESP32_DEV with ESP32_W5500](#12-AsyncHTTPSRequest_ESP32_W5500-using-ESP32_DEV-with-ESP32_W5500) **New**
* [Debug](#debug)
* [Troubleshooting](#troubleshooting)
* [Issues](#issues)
Expand Down Expand Up @@ -163,6 +166,8 @@ This library is based on, modified from:

#### 3. **ESP32 boards using LwIP ENC28J60 Ethernet**

#### 4. **ESP32 boards using LwIP W5500 Ethernet**


---

Expand All @@ -184,8 +189,9 @@ This library is based on, modified from:
3. [`AsyncTCP_SSL v1.3.1+`](https://github.com/khoih-prog/AsyncTCP_SSL) for ESP32. [![GitHub release](https://img.shields.io/github/release/khoih-prog/AsyncTCP_SSL.svg)](https://github.com/khoih-prog/AsyncTCP_SSL/releases)
4. [`WebServer_WT32_ETH01 v1.5.1+`](https://github.com/khoih-prog/WebServer_WT32_ETH01) for ESP32-based WT32_ETH01 using **either ESP32 core v2.0.0+ or v1.0.6-**. [![GitHub release](https://img.shields.io/github/release/khoih-prog/WebServer_WT32_ETH01.svg)](https://github.com/khoih-prog/WebServer_WT32_ETH01/releases)
5. [`WebServer_ESP32_ENC v1.5.1+`](https://github.com/khoih-prog/WebServer_ESP32_ENC) for ESP32 boards using `LwIP ENC28J60 Ethernet`. [![GitHub release](https://img.shields.io/github/release/khoih-prog/WebServer_ESP32_ENC.svg)](https://github.com/khoih-prog/WebServer_ESP32_ENC/releases)
5. [`ESPAsync_WiFiManager library v1.15.1+`](https://github.com/khoih-prog/ESPAsync_WiFiManager) for ESP32/ESP8266 using some examples. [![GitHub release](https://img.shields.io/github/release/khoih-prog/ESPAsync_WiFiManager.svg)](https://github.com/khoih-prog/ESPAsync_WiFiManager/releases)
6. [`AsyncHTTPRequest_Generic library v1.11.0+`](https://github.com/khoih-prog/AsyncHTTPRequest_Generic) for ESP32/ESP8266 using with [AsyncHTTP_HTTPSRequest_ESP example](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTP_HTTPSRequest_ESP). [![GitHub release](https://img.shields.io/github/release/khoih-prog/AsyncHTTPRequest_Generic.svg)](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/releases)
6. [`WebServer_ESP32_W5500 v1.5.1+`](https://github.com/khoih-prog/WebServer_ESP32_W5500) for ESP32 boards using `LwIP W5500 Ethernet`. [![GitHub release](https://img.shields.io/github/release/khoih-prog/WebServer_ESP32_W5500.svg)](https://github.com/khoih-prog/WebServer_ESP32_W5500/releases)
7. [`ESPAsync_WiFiManager library v1.15.1+`](https://github.com/khoih-prog/ESPAsync_WiFiManager) for ESP32/ESP8266 using some examples. [![GitHub release](https://img.shields.io/github/release/khoih-prog/ESPAsync_WiFiManager.svg)](https://github.com/khoih-prog/ESPAsync_WiFiManager/releases)
8. [`AsyncHTTPRequest_Generic library v1.12.0+`](https://github.com/khoih-prog/AsyncHTTPRequest_Generic) for ESP32/ESP8266 using with [AsyncHTTP_HTTPSRequest_ESP example](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTP_HTTPSRequest_ESP). [![GitHub release](https://img.shields.io/github/release/khoih-prog/AsyncHTTPRequest_Generic.svg)](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/releases)



Expand Down Expand Up @@ -323,6 +329,29 @@ Look in file [**adc_common.c**](https://github.com/espressif/esp-idf/blob/master
- Use `ADC1`, and pins GPIO32-GPIO39
- If somehow it's a must to use those pins serviced by `ADC2` (**GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27**), use the **fix mentioned at the end** of [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to work with ESP32 WiFi/BlueTooth (BT/BLE).
---
---
### HOWTO use ESP32 with LwIP W5500 or ENC28J60 Ethernet
#### 1. ESP32 Wiring
This is the wiring for ESP8266 `W5500` or `ENC28J60` Ethernet when using `SS = GPIO5`
https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/blob/6168613ea8c6cb4fd9dcdf831bacba7d0db04fa6/examples/ESP32_W5500/AsyncHTTPSRequest_ESP32_W5500/AsyncHTTPSRequest_ESP32_W5500.ino#L81-L92
|W5x00/ENC28J60 Ethernet|<--->|ESP32|
|:-:|:-:|:-:|
|MOSI|<--->|MOSI = GPIO23|
|MISO|<--->|MISO = GPIO19|
|SCK|<--->|SCK = GPIO18|
|SS|<--->|GPIO5|
|INT|<--->|GPIO4|
|GND|<--->|GND|
|VCC|<--->|+3.3V|
---
---
Expand All @@ -343,6 +372,10 @@ Look in file [**adc_common.c**](https://github.com/espressif/esp-idf/blob/master
1. [AsyncHTTPSRequest_ESP32_ENC](examples/ESP32_ENC/AsyncHTTPSRequest_ESP32_ENC)
#### For ESP32_W5500
1. [AsyncHTTPSRequest_ESP32_W5500](examples/ESP32_W5500/AsyncHTTPSRequest_ESP32_W5500)
#### For ESP32, WT32_ETH01 or ESP32_ENC
1. [multiFileProject](examples/multiFileProject)
Expand All @@ -366,7 +399,7 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](exa
```cpp
Starting AsyncHTTPSRequest_ESP using ESP32_DEV
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
Connecting to WiFi SSID: HueNet1
...
AsyncHTTPSRequest @ IP : 192.168.2.80
Expand Down Expand Up @@ -426,7 +459,7 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](exa
```cpp
Starting AsyncHTTPSRequest_ESP using ESP32S2_DEV
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
Connecting to WiFi SSID: HueNet1
.......
AsyncHTTPSRequest @ IP : 192.168.2.79
Expand Down Expand Up @@ -503,7 +536,7 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](exa
```cpp
Starting AsyncHTTPSRequest_ESP using ESP32C3_DEV
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
Connecting to WiFi SSID: HueNet1
.........
AsyncHTTPSRequest @ IP : 192.168.2.80
Expand Down Expand Up @@ -552,9 +585,9 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_ESP_WiFi

```cpp
Starting AsyncHTTPSRequest_ESP_WiFiManager using LittleFS on ESP32_DEV
ESPAsync_WiFiManager v1.15.0
ESPAsync_WiFiManager v1.15.1
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
Stored: SSID = HueNet1, Pass = 12345678
Got stored Credentials. Timeout 120s
ConnectMultiWiFi in setup
Expand Down Expand Up @@ -588,9 +621,9 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_WT32_ETH

```cpp
Starting AsyncHTTPSRequest_WT32_ETH01 using ESP32_DEV with ETH_PHY_LAN8720
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.82, FULL_DUPLEX, 100Mbps

HTTP WebClient is @ IP : 192.168.2.82
Expand Down Expand Up @@ -622,9 +655,9 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_WT32_ETH

```cpp
Starting AsyncHTTPSRequest_WT32_ETH01 using ESP32_DEV with ETH_PHY_LAN8720
WebServer_WT32_ETH01 v1.5.0 for core v1.0.6-
WebServer_WT32_ETH01 v1.5.1 for core v1.0.6-
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps

HTTP WebClient is @ IP : 192.168.2.232
Expand Down Expand Up @@ -656,8 +689,8 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_ESP_WiFi

```cpp
Starting AsyncHTTPSRequest_ESP_WiFiManager using LittleFS on ESP32C3_DEV
ESPAsync_WiFiManager v1.15.0
AsyncHTTPSRequest_Generic v2.2.1
ESPAsync_WiFiManager v1.15.1
AsyncHTTPSRequest_Generic v2.4.0
Stored: SSID = HueNet1, Pass = password
Got stored Credentials. Timeout 120s
ConnectMultiWiFi in setup
Expand Down Expand Up @@ -710,8 +743,8 @@ Following is the debug terminal when running example [AsyncHTTPSRequest_ESP_WiFi

```cpp
Starting AsyncHTTPSRequest_ESP_WiFiManager using LittleFS on ESP32S3_DEV
ESPAsync_WiFiManager v1.15.0
AsyncHTTPSRequest_Generic v2.2.1
ESPAsync_WiFiManager v1.15.1
AsyncHTTPSRequest_Generic v2.4.0
Stored: SSID = HueNet1, Pass = password
Got stored Credentials. Timeout 120s
ConnectMultiWiFi in setup
Expand Down Expand Up @@ -747,7 +780,7 @@ The terminal output of [AsyncHTTPSRequest_ESP_Multi example](examples/AsyncHTTPS
```cpp
Starting AsyncHTTPSRequest_ESP_Multi on ESP32_DEV
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
Connecting to WiFi SSID: HueNet1
...
AsyncHTTPSRequest @ IP : 192.168.2.187
Expand Down Expand Up @@ -821,8 +854,8 @@ The terminal output of [AsyncHTTP_HTTPSRequest_ESP example](examples/AsyncHTTP_H
```cpp
Starting AsyncHTTP_HTTPSRequest_ESP on ESP32_DEV
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPRequest_Generic v1.10.2
AsyncHTTPSRequest_Generic v2.4.0
AsyncHTTPRequest_Generic v1.12.0
Connecting to WiFi SSID: HueNet1
...
AsyncHTTPSRequest @ IP : 192.168.2.80
Expand Down Expand Up @@ -906,14 +939,14 @@ week_number: 42

#### 11. AsyncHTTPSRequest_ESP32_ENC using ESP32_DEV with ESP32_ENC28J60

Following is the debug terminal when running example [AsyncHTTPSRequest_ESP32_ENC](examples/ESP32_ENC/AsyncHTTPSRequest_ESP32_ENC) on `ESP32_DEV` boards using `LwIP ENC28J60 Ethernet`, to demonstrate the operation of SSL Async HTTPS request, using [AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL)
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP32_ENC](examples/ESP32_ENC/AsyncHTTPSRequest_ESP32_ENC) on `ESP32_DEV` boards using `LwIP ENC28J60 Ethernet`, to demonstrate the operation of `SSL Async HTTPS` request, using [AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL)


```cpp
Starting AsyncHTTPSRequest_ESP32_ENC using ESP32_DEV with ESP32_ENC28J60
WebServer_ESP32_ENC v1.5.1 for core v2.0.0+
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.2.1
AsyncHTTPSRequest_Generic v2.4.0
[AHTTPS] Default SPI pinout:
[AHTTPS] MOSI: 23
[AHTTPS] MISO: 19
Expand Down Expand Up @@ -966,6 +999,74 @@ utc_offset: -05:00
week_number: 48
**************************************
```
---
#### 12. AsyncHTTPSRequest_ESP32_W5500 using ESP32_DEV with ESP32_W5500
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP32_W5500](examples/ESP32_W5500/AsyncHTTPSRequest_ESP32_W5500) on `ESP32_DEV` boards using `LwIP W5500 Ethernet`, to demonstrate the operation of `SSL Async HTTPS` request, using [AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL)
```cpp
Starting AsyncHTTPSRequest_ESP32_W5500 using ESP32_DEV with ESP32_W5500
WebServer_ESP32_W5500 v1.5.1 for core v2.0.0+
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.4.0
[AHTTPS] Default SPI pinout:
[AHTTPS] SPI_HOST: 2
[AHTTPS] MOSI: 23
[AHTTPS] MISO: 19
[AHTTPS] SCK: 18
[AHTTPS] CS: 5
[AHTTPS] INT: 4
[AHTTPS] SPI Clock (MHz): 25
[AHTTPS] =========================
ETH Started
ETH Connected
ETH MAC: DE:AD:BE:EF:BE:12, IPv4: 192.168.2.103
FULL_DUPLEX, 100Mbps
HTTP WebClient is @ IP : 192.168.2.103
**************************************
abbreviation: EST
client_ip: 216.154.12.9
datetime: 2022-11-30T19:05:25.743559-05:00
day_of_week: 3
day_of_year: 334
dst: false
dst_from:
dst_offset: 0
dst_until:
raw_offset: -18000
timezone: America/Toronto
unixtime: 1669853125
utc_datetime: 2022-12-01T00:05:25.743559+00:00
utc_offset: -05:00
week_number: 48
**************************************
HHHHHH
**************************************
abbreviation: EST
client_ip: 216.154.12.9
datetime: 2022-11-30T19:06:24.624668-05:00
day_of_week: 3
day_of_year: 334
dst: false
dst_from:
dst_offset: 0
dst_until:
raw_offset: -18000
timezone: America/Toronto
unixtime: 1669853184
utc_datetime: 2022-12-01T00:06:24.624668+00:00
utc_offset: -05:00
week_number: 48
**************************************
HHHH
```
---
---

Expand Down Expand Up @@ -1035,6 +1136,9 @@ Submit issues to: [AsyncHTTPSRequest_Generic issues](https://github.com/khoih-pr
21. Default to reconnect to the same `host:port` after connected for new HTTP sites.
22. Use `allman` astyle
23. Add support to ESP32 boards using `LwIP ENC28J60 Ethernet`
24. Add support to ESP32 boards using `LwIP W5500 Ethernet`
25. [Fix "blank new line in chunk" bug #50](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/pull/50)


---
---
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

## Changelog

### Releases v2.4.0

1. Add support to ESP32 boards using `LwIP W5500 Ethernet`
2. Fix bug. Check [Fix "blank new line in chunk" bug #50](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/pull/50)

### Releases v2.3.0

1. Add support to ESP32 boards using `LwIP ENC28J60 Ethernet`
Expand Down
8 changes: 7 additions & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@
"version": ">=1.5.1",
"platforms": ["espressif32"]
},
{
"owner": "khoih-prog",
"name": "WebServer_ESP32_W5500",
"version": ">=1.5.1",
"platforms": ["espressif32"]
},
{
"owner": "khoih-prog",
"name": "AsyncHTTPRequest_Generic",
"version": ">=1.11.0",
"version": ">=1.12.0",
"platforms": ["espressif8266", "espressif32"]
},
{
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=AsyncHTTPSRequest_Generic
version=2.3.0
version=2.4.0
author=Bob Lemaire,Khoi Hoang <khoih.prog@gmail.com>
maintainer=Khoi Hoang <khoih.prog@gmail.com>
license=GPLv3
Expand All @@ -8,5 +8,5 @@ paragraph=Supporting in the future for RP2040W, ESP8266, Portenta_H7, STM32 with
category=Communication
url=https://github.com/khoih-prog/AsyncHTTPSRequest_Generic
architectures=*
depends=AsyncTCP_SSL, WebServer_WT32_ETH01, WebServer_ESP32_ENC, AsyncHTTPRequest_Generic, ESPAsync_WiFiManager
depends=AsyncTCP_SSL, WebServer_WT32_ETH01, WebServer_ESP32_ENC, WebServer_ESP32_W5500, AsyncHTTPRequest_Generic, ESPAsync_WiFiManager
includes=AsyncHTTPSRequest_Generic.h,AsyncHTTPSRequest_Generic.hpp
6 changes: 4 additions & 2 deletions platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@ lib_ldf_mode = chain+
lib_deps =
; PlatformIO 4.x
; AsyncTCP_SSL@>=1.3.1
; AsyncHTTPRequest_Generic@>=1.11.0
; AsyncHTTPRequest_Generic@>=1.12.0
; WebServer_WT32_ETH01@>=1.5.1
; WebServer_ESP32_ENC@>=1.5.1
; WebServer_ESP32_W5500@>=1.5.1
; ESPAsync_WiFiManager@>=1.15.1
; PlatformIO 5.x
khoih-prog/AsyncTCP_SSL@>=1.3.1
khoih-prog/AsyncHTTPRequest_Generic@>=1.11.0
khoih-prog/AsyncHTTPRequest_Generic@>=1.12.0
khoih-prog/WebServer_WT32_ETH01@>=1.5.1
khoih-prog/WebServer_ESP32_ENC@>=1.5.1
khoih-prog/WebServer_ESP32_W5500@>=1.5.1
khoih-prog/ESPAsync_WiFiManager@>=1.15.1


Expand Down
3 changes: 2 additions & 1 deletion src/AsyncHTTPSRequest_Debug_Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
Version: 2.3.0
Version: 2.4.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -37,6 +37,7 @@
2.2.0 K Hoang 20/10/2022 Fix crash and memory leak
2.2.1 K Hoang 09/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites
2.3.0 K Hoang 28/11/2022 Add support to ESP32 boards using LwIP ENC28J60 Ethernet
2.4.0 K Hoang 30/11/2022 Add support to ESP32 boards using LwIP W5500 Ethernet. Fix bug
*****************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/AsyncHTTPSRequest_Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
Version: 2.3.0
Version: 2.4.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -37,6 +37,7 @@
2.2.0 K Hoang 20/10/2022 Fix crash and memory leak
2.2.1 K Hoang 09/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites
2.3.0 K Hoang 28/11/2022 Add support to ESP32 boards using LwIP ENC28J60 Ethernet
2.4.0 K Hoang 30/11/2022 Add support to ESP32 boards using LwIP W5500 Ethernet. Fix bug
*****************************************************************************************************************************/

#pragma once
Expand Down
Loading

0 comments on commit 4f4c284

Please sign in to comment.