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

Commit 78e9ddc

Browse files
authored
v1.3.0 to support core v2.0.0
#### Releases v1.3.0 ##### Warning: Can be used for either EP32 core v2.0.0+ or v1.0.6-. Default is v2.0.0+ now 1. Making compatible either with breaking core v2.0.0+ or core v1.0.6- 2. Renew examples
1 parent 59f718e commit 78e9ddc

File tree

35 files changed

+248
-78
lines changed

35 files changed

+248
-78
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1414

1515
Please ensure to specify the following:
1616

17-
* Arduino IDE version (e.g. 1.8.15) or Platform.io version
18-
* Board Core Version (e.g. ESP32 core v1.0.6)
17+
* Arduino IDE version (e.g. 1.8.16) or Platform.io version
18+
* Board Core Version (e.g. ESP32 core v2.0.0)
1919
* Contextual information (e.g. what you were trying to achieve)
2020
* Simplest possible steps to reproduce
2121
* Anything that might be relevant in your opinion, such as:
@@ -26,11 +26,11 @@ Please ensure to specify the following:
2626
### Example
2727

2828
```
29-
Arduino IDE version: 1.8.15
29+
Arduino IDE version: 1.8.16
3030
WT32_ETH01 board
31-
ESP32 core v1.0.6
31+
ESP32 core v2.0.0
3232
OS: Ubuntu 20.04 LTS
33-
Linux xy-Inspiron-3593 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
33+
Linux xy-Inspiron-3593 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
3434
3535
Context:
3636
I encountered a crash while trying to use the Timer Interrupt.

README.md

Lines changed: 38 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212

1313

1414
* [Why do we need this WebServer_WT32_ETH01 library](#why-do-we-need-this-webserver_wt32_eth01-library)
15+
* [Important notes](#Important-notes)
1516
* [Features](#features)
1617
* [Currently supported Boards](#currently-supported-boards)
17-
* [Changelog](#changelog)
18-
* [Releases v1.2.0](#releases-v120)
19-
* [Releases v1.1.0](#releases-v110)
20-
* [Releases v1.0.0](#releases-v100)
18+
* [Changelog](changelog.md)
2119
* [Prerequisites](#prerequisites)
2220
* [Installation](#installation)
2321
* [Use Arduino Library Manager](#use-arduino-library-manager)
@@ -100,6 +98,23 @@
10098

10199
### Why do we need this [WebServer_WT32_ETH01 library](https://github.com/khoih-prog/WebServer_WT32_ETH01)
102100

101+
#### Important notes
102+
103+
ESP32 Core v2.0.0 introduces new enum breaking almost all `WT32_ETH01` codes written for core v1.0.6-.
104+
105+
It's really strange to define a breaking enum `arduino_event_id_t` in [**WiFiGeneric.h**#L36-L78](https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/src/WiFiGeneric.h#L36-L78), compared to the old `system_event_id_t`, now placed in [**esp_event_legacy.h**#L29-L63](https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/esp32/include/esp_event/include/esp_event_legacy.h#L29-L63)
106+
107+
It's better to preserve the old enum order and just adding new items **to do no harm to pre-2.0.0 codes**
108+
109+
- Releases v1.2.0 to be used for EP32 core v1.0.6- only
110+
- Releases v1.3.0 can be used for either EP32 core v2.0.0+ or v1.0.6-. **Default is using core v2.0.0+**
111+
112+
To use with core v1.0.6-, just define in your sketch
113+
114+
```
115+
#define USING_CORE_ESP32_CORE_V200_PLUS false
116+
```
117+
103118
#### Features
104119

105120
This [**WebServer_WT32_ETH01 library**](https://github.com/khoih-prog/WebServer_WT32_ETH01) is a simple yet complete WebServer wrapper library for **ESP32-based WT32_ETH01** boards using LAN8720 Ethernet. The functions are similar and compatible to those of [`ESP32 WebServer`](https://github.com/espressif/arduino-esp32/tree/master/libraries/WebServer) and [`ESP8266WebServer`](https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer) libraries to make life much easier to port sketches from ESP8266/ESP32.
@@ -129,32 +144,16 @@ This [**WebServer_WT32_ETH01** library](https://github.com/khoih-prog/WebServer_
129144
---
130145
---
131146

132-
## Changelog
133147

134-
#### Releases v1.2.0
135-
136-
1. Add common code to library
137-
2. Renew examples
138-
139-
#### Releases v1.1.0
140-
141-
1. Add SSL support
142-
2. Add HTTPS and MQTTS examples
143-
144-
#### Releases v1.0.0
145-
146-
1. Initial coding to support WT32_ETH01 boards
147-
148-
149-
---
150-
---
151148

152149
## Prerequisites
153150

154-
1. [`Arduino IDE 1.8.15+` for Arduino](https://www.arduino.cc/en/Main/Software)
155-
2. [`ESP32 Core 1.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
151+
1. [`Arduino IDE 1.8.16+` for Arduino](https://www.arduino.cc/en/Main/Software)
152+
2. [`ESP32 Core 2.0.0+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards using release v1.3.0+. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
153+
2. [`ESP32 Core 1.0.6-`](https://github.com/espressif/arduino-esp32) for ESP32-based boards using release v1.2.0- [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
156154

157155
---
156+
---
158157

159158
## Installation
160159

@@ -672,7 +671,7 @@ The following are debug terminal output and screen shot when running example [Ad
672671
673672
```
674673
Starting AdvancedWebServer on ESP32_DEV with ETH_PHY_LAN8720
675-
WebServer_WT32_ETH01 v1.2.0
674+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
676675

677676
ETH Started
678677
ETH Connected
@@ -690,7 +689,7 @@ The terminal output of **WT32_ETH01** running [ESP32_FS_EthernetWebServer](examp
690689
691690
```cpp
692691
Starting ESP32_FS_EthernetWebServer on ESP32_DEV with ETH_PHY_LAN8720
693-
WebServer_WT32_ETH01 v1.2.0
692+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
694693
695694
ETH Started
696695
ETH Connected
@@ -740,7 +739,7 @@ The terminal output of **WT32_ETH01** running [MQTT_ThingStream example](example
740739

741740
```
742741
Starting MQTT_ThingStream on ESP32_DEV with ETH_PHY_LAN8720
743-
WebServer_WT32_ETH01 v1.2.0
742+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
744743
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
745744
***************************************
746745
esp32-sniffer/12345678/ble
@@ -764,7 +763,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_Auth example](examples
764763

765764
```
766765
Starting MQTTClient_Auth on ESP32_DEV with ETH_PHY_LAN8720
767-
WebServer_WT32_ETH01 v1.2.0
766+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
768767
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
769768
Attempting MQTT connection to broker.emqx.io...connected
770769
Message Send : MQTT_Pub => Hello from MQTTClient_Auth on WT32-ETH01 with ETH_PHY_LAN8720
@@ -781,7 +780,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_Basic example](example
781780

782781
```
783782
Starting MQTTClient_Basic on ESP32_DEV with ETH_PHY_LAN8720
784-
WebServer_WT32_ETH01 v1.2.0
783+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
785784
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
786785
Attempting MQTT connection to broker.emqx.io...connected
787786
Message Send : MQTT_Pub => Hello from MQTTClient_Basic on WT32-ETH01 with ETH_PHY_LAN8720
@@ -801,7 +800,7 @@ The terminal output of **WT32_ETH01** running [WebClient example](examples/WebCl
801800

802801
```
803802
Starting WebClient on ESP32_DEV with ETH_PHY_LAN8720
804-
WebServer_WT32_ETH01 v1.2.0
803+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
805804
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
806805
807806
Starting connection to server...
@@ -869,7 +868,7 @@ The terminal output of **WT32_ETH01** running [UdpNTPClient example](examples/Ud
869868

870869
```
871870
Starting UdpNTPClient on ESP32_DEV with ETH_PHY_LAN8720
872-
WebServer_WT32_ETH01 v1.2.0
871+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
873872
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
874873
UDP Packet received, size 48
875874
From 132.163.97.1, port 123
@@ -898,7 +897,7 @@ The terminal output of **WT32_ETH01** running [BasicHttpClient example](examples
898897

899898
```
900899
Starting BasicHttpClient on ESP32_DEV with ETH_PHY_LAN8720
901-
WebServer_WT32_ETH01 v1.2.0
900+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
902901
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
903902
[HTTP] begin...
904903
[HTTP] GET...
@@ -960,7 +959,7 @@ The terminal output of **WT32_ETH01** running [BasicHttpsClient example](example
960959

961960
```
962961
Starting BasicHttpsClient on ESP32_DEV with ETH_PHY_LAN8720
963-
WebServer_WT32_ETH01 v1.2.0
962+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
964963
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
965964
Waiting for NTP time sync: .
966965
Current time: Tue Jul 6 05:29:39 2021
@@ -1005,7 +1004,7 @@ The terminal output of **WT32_ETH01** running [WebClientMulti_SSL example](examp
10051004

10061005
```
10071006
Starting WebClientMulti_SSL on ESP32_DEV with ETH_PHY_LAN8720
1008-
WebServer_WT32_ETH01 v1.2.0
1007+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
10091008
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
10101009
Waiting for NTP time sync: .
10111010
Current time: Tue Jul 6 19:58:27 2021
@@ -1119,7 +1118,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL_Complex example](e
11191118

11201119
```
11211120
Starting MQTTClient_SSL_Complex on ESP32_DEV with ETH_PHY_LAN8720
1122-
WebServer_WT32_ETH01 v1.2.0
1121+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
11231122
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
11241123
Waiting for NTP time sync: .
11251124
Current time: Tue Jul 6 18:14:02 2021
@@ -1139,7 +1138,7 @@ The terminal output of **WT32_ETH01** running [MQTTS_ThingStream example](exampl
11391138

11401139
```
11411140
Starting MQTTS_ThingStream on ESP32_DEV with ETH_PHY_LAN8720
1142-
WebServer_WT32_ETH01 v1.2.0
1141+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
11431142
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
11441143
Waiting for NTP time sync: .
11451144
Current time: Tue Jul 6 18:38:22 2021
@@ -1165,7 +1164,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL example](examples/
11651164

11661165
```
11671166
Starting MQTTClient_SSL on ESP32_DEV with ETH_PHY_LAN8720
1168-
WebServer_WT32_ETH01 v1.2.0
1167+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
11691168
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
11701169
Waiting for NTP time sync: .
11711170
Current time: Tue Jul 6 17:11:00 2021
@@ -1190,7 +1189,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL_Auth example](exam
11901189

11911190
```
11921191
Starting MQTTClient_SSL_Auth on ESP32_DEV with ETH_PHY_LAN8720
1193-
WebServer_WT32_ETH01 v1.2.0
1192+
WebServer_WT32_ETH01 v1.3.0 for core v2.0.0+
11941193
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
11951194
Waiting for NTP time sync: .
11961195
Current time: Tue Jul 6 18:05:14 2021
@@ -1231,32 +1230,6 @@ If you get compilation errors, more often than not, you may need to install a ne
12311230
---
12321231
---
12331232

1234-
## Releases
1235-
1236-
#### Releases v1.2.0
1237-
1238-
1. Add common code to library
1239-
2. Renew examples
1240-
1241-
#### Releases v1.1.0
1242-
1243-
1. Add SSL support
1244-
2. Add HTTPS and MQTTS examples
1245-
1246-
#### Releases v1.0.0
1247-
1248-
1. Initial coding to support WT32_ETH01 boards
1249-
1250-
---
1251-
1252-
#### Supported Boards
1253-
1254-
This [**WebServer_WT32_ETH01** library](https://github.com/khoih-prog/WebServer_WT32_ETH01) currently supports these following boards:
1255-
1256-
1. **WT32_ETH01 boards** using ESP32-based boards and LAN8720 Ethernet
1257-
1258-
---
1259-
---
12601233

12611234
### Issues ###
12621235

@@ -1273,6 +1246,7 @@ Submit issues to: [WebServer_WT32_ETH01 issues](https://github.com/khoih-prog/We
12731246
1. Add support to ESP32-based **WT32_ETH01** using LAN8720 Ethernet
12741247
2. Add SSL support
12751248
3. Add HTTPS and MQTTS examples
1249+
4. Support breaking ESP32 core v2.0.0+ as well as v1.0.6-
12761250

12771251
---
12781252
---

changelog.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## WebServer_WT32_ETH01
2+
3+
[![arduino-library-badge](https://www.ardu-badge.com/badge/WebServer_WT32_ETH01.svg?)](https://www.ardu-badge.com/WebServer_WT32_ETH01)
4+
[![GitHub release](https://img.shields.io/github/release/khoih-prog/WebServer_WT32_ETH01.svg)](https://github.com/khoih-prog/WebServer_WT32_ETH01/releases)
5+
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
6+
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/WebServer_WT32_ETH01.svg)](http://github.com/khoih-prog/WebServer_WT32_ETH01/issues)
7+
8+
---
9+
---
10+
11+
## Table of Contents
12+
13+
14+
* [Changelog](#changelog)
15+
* [Releases v1.3.0](#releases-v130)
16+
* [Releases v1.2.0](#releases-v120)
17+
* [Releases v1.1.0](#releases-v110)
18+
* [Releases v1.0.0](#releases-v100)
19+
20+
---
21+
---
22+
23+
## Changelog
24+
25+
#### Releases v1.3.0
26+
27+
##### Warning: Can be used for either EP32 core v2.0.0+ or v1.0.6-. Default is v2.0.0+ now
28+
29+
1. Making compatible either with breaking core v2.0.0+ or core v1.0.6-
30+
2. Renew examples
31+
32+
33+
#### Releases v1.2.0
34+
35+
##### Warning: To be used for EP32 core v1.0.6- only
36+
37+
1. Add common code to library
38+
2. Renew examples
39+
40+
#### Releases v1.1.0
41+
42+
1. Add SSL support
43+
2. Add HTTPS and MQTTS examples
44+
45+
#### Releases v1.0.0
46+
47+
1. Initial coding to support WT32_ETH01 boards
48+
49+
50+

examples/AdvancedWebServer/AdvancedWebServer.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
// Debug Level from 0 to 4
4444
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
4545

46+
// Uncomment to use ESP32 core v1.0.6-
47+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
48+
4649
#include <WebServer_WT32_ETH01.h>
4750

4851
WebServer server(80);

examples/ESP32_FS_EthernetWebServer/ESP32_FS_EthernetWebServer.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
// Debug Level from 0 to 4
2828
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
2929

30+
// Uncomment to use ESP32 core v1.0.6-
31+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
32+
3033
#define USE_LITTLEFS true
3134
#define USE_SPIFFS false
3235

examples/HTTPClient/Authorization/Authorization.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// Debug Level from 0 to 4
1616
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
1717

18+
// Uncomment to use ESP32 core v1.0.6-
19+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
20+
1821
#include <WebServer_WT32_ETH01.h>
1922
#include <HTTPClient.h>
2023

examples/HTTPClient/BasicHttpClient/BasicHttpClient.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// Debug Level from 0 to 4
1616
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
1717

18+
// Uncomment to use ESP32 core v1.0.6-
19+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
20+
1821
#include <WebServer_WT32_ETH01.h>
1922
#include <HTTPClient.h>
2023

examples/HTTPClient/BasicHttpsClient/BasicHttpsClient.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// Debug Level from 0 to 4
1616
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
1717

18+
// Uncomment to use ESP32 core v1.0.6-
19+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
20+
1821
#include <WebServer_WT32_ETH01.h>
1922
#include <HTTPClient.h>
2023

examples/HTTPClient/StreamHttpClient/StreamHttpClient.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// Debug Level from 0 to 4
1616
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
1717

18+
// Uncomment to use ESP32 core v1.0.6-
19+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
20+
1821
#include <WebServer_WT32_ETH01.h>
1922
#include <HTTPClient.h>
2023

examples/HelloServer/HelloServer.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// Debug Level from 0 to 4
1616
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
1717

18+
// Uncomment to use ESP32 core v1.0.6-
19+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
20+
1821
#include <WebServer_WT32_ETH01.h>
1922

2023
WebServer server(80);

examples/HelloServer2/HelloServer2.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// Debug Level from 0 to 4
1616
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 3
1717

18+
// Uncomment to use ESP32 core v1.0.6-
19+
//#define USING_CORE_ESP32_CORE_V200_PLUS false
20+
1821
#include <WebServer_WT32_ETH01.h>
1922

2023
WebServer server(80);

0 commit comments

Comments
 (0)