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

Commit 9ee886e

Browse files
authored
v1.5.1 to add example and fix compile error
#### Releases v1.5.1 1. Add example [MQTT_And_OTA_Ethernet](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/MQTT_And_OTA_Ethernet) to demo how to use OTA. Check [Added MQTT and OTA over Ethernet example to examples folder #9](#9) 2. Fix compile error for examples [serveStatic](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/serveStatic) and [serveStaticLoadFile](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/serveStaticLoadFile) to use built-in LittleFS library for new ESP32 cores 3. Fix compile error for examples [ESP32_FS_EthernetWebServer](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/ESP32_FS_EthernetWebServer) if WT32_ETH01 is selected as A0 (and many pins) not defined in new ESP32 cores
1 parent 63ac506 commit 9ee886e

16 files changed

+173
-98
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1515
Please ensure to specify the following:
1616

1717
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18-
* Board Core Version (e.g. ESP32 core v2.0.3)
18+
* Board Core Version (e.g. ESP32 core v2.0.4)
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:
@@ -28,12 +28,12 @@ Please ensure to specify the following:
2828
```
2929
Arduino IDE version: 1.8.19
3030
WT32_ETH01 board
31-
ESP32 core v2.0.3
31+
ESP32 core v2.0.4
3232
OS: Ubuntu 20.04 LTS
33-
Linux xy-Inspiron-3593 5.13.0-51-generic #58~20.04.1-Ubuntu SMP Tue Jun 14 11:29:12 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
33+
Linux xy-Inspiron-3593 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3434
3535
Context:
36-
I encountered a crash while trying to use the Timer Interrupt.
36+
I encountered a crash while trying to connect to network.
3737
3838
Steps to reproduce:
3939
1. ...

README.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
* [ 4. MQTTS_ThingStream](examples/SSL/MQTTS_ThingStream)
6969
* [ 5. WebClientMulti_SSL](examples/SSL/WebClientMulti_SSL)
7070
* [ 6. WebClient_SSL](examples/SSL/WebClient_SSL)
71+
* [OTA Example](#OTA-example)
72+
* [ 1. MQTT_And_OTA_Ethernet](examples/MQTT_And_OTA_Ethernet) **New**
7173
* [Example AdvancedWebServer](#example-advancedwebserver)
7274
* [File AdvancedWebServer.ino](#file-advancedwebserverino)
7375
* [Debug Terminal Output Samples](#debug-terminal-output-samples)
@@ -159,11 +161,10 @@ This [**WebServer_WT32_ETH01** library](https://github.com/khoih-prog/WebServer_
159161
---
160162

161163

162-
163164
## Prerequisites
164165

165166
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
166-
2. [`ESP32 Core 2.0.3+`](https://github.com/espressif/arduino-esp32) for ESP32-based WT32_ETH01 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/)
167+
2. [`ESP32 Core 2.0.4+`](https://github.com/espressif/arduino-esp32) for ESP32-based WT32_ETH01 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/)
167168
3. [`ESP32 Core 1.0.6-`](https://github.com/espressif/arduino-esp32) for ESP32-based WT32_ETH01 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/)
168169

169170
---
@@ -179,9 +180,9 @@ You can also use this link [![arduino-library-badge](https://www.ardu-badge.com/
179180
### Manual Install
180181

181182
1. Navigate to [WebServer_WT32_ETH01](https://github.com/khoih-prog/WebServer_WT32_ETH01) page.
182-
2. Download the latest release `WebServer_WT32_ETH01-master.zip`.
183-
3. Extract the zip file to `WebServer_WT32_ETH01-master` directory
184-
4. Copy the whole `WebServer_WT32_ETH01-master` folder to Arduino libraries' directory such as `~/Arduino/libraries/`.
183+
2. Download the latest release `WebServer_WT32_ETH01-main.zip`.
184+
3. Extract the zip file to `WebServer_WT32_ETH01-main` directory
185+
4. Copy the whole `WebServer_WT32_ETH01-main` folder to Arduino libraries' directory such as `~/Arduino/libraries/`.
185186

186187
### VS Code & PlatformIO:
187188

@@ -464,6 +465,9 @@ Example:
464465
5. [WebClientMulti_SSL](examples/SSL/WebClientMulti_SSL)
465466
6. [WebClient_SSL](examples/SSL/WebClient_SSL)
466467

468+
#### OTA Example
469+
1. [MQTT_And_OTA_Ethernet](examples/MQTT_And_OTA_Ethernet) **New**
470+
467471
---
468472
---
469473

@@ -489,7 +493,7 @@ The following are debug terminal output and screen shot when running example [Ad
489493

490494
```
491495
Starting AdvancedWebServer on ESP32_DEV with ETH_PHY_LAN8720
492-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
496+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
493497
494498
ETH Started
495499
ETH Connected
@@ -507,7 +511,7 @@ The terminal output of **WT32_ETH01** running [ESP32_FS_EthernetWebServer](examp
507511

508512
```cpp
509513
Starting ESP32_FS_EthernetWebServer on ESP32_DEV with ETH_PHY_LAN8720
510-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
514+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
511515

512516
ETH Started
513517
ETH Connected
@@ -557,7 +561,7 @@ The terminal output of **WT32_ETH01** running [MQTT_ThingStream example](example
557561
558562
```
559563
Starting MQTT_ThingStream on ESP32_DEV with ETH_PHY_LAN8720
560-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
564+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
561565
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
562566
***************************************
563567
esp32-sniffer/12345678/ble
@@ -581,7 +585,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_Auth example](examples
581585
582586
```
583587
Starting MQTTClient_Auth on ESP32_DEV with ETH_PHY_LAN8720
584-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
588+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
585589
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
586590
Attempting MQTT connection to broker.emqx.io...connected
587591
Message Send : MQTT_Pub => Hello from MQTTClient_Auth on WT32-ETH01 with ETH_PHY_LAN8720
@@ -598,7 +602,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_Basic example](example
598602
599603
```
600604
Starting MQTTClient_Basic on ESP32_DEV with ETH_PHY_LAN8720
601-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
605+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
602606
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
603607
Attempting MQTT connection to broker.emqx.io...connected
604608
Message Send : MQTT_Pub => Hello from MQTTClient_Basic on WT32-ETH01 with ETH_PHY_LAN8720
@@ -618,7 +622,7 @@ The terminal output of **WT32_ETH01** running [WebClient example](examples/WebCl
618622
619623
```
620624
Starting WebClient on ESP32_DEV with ETH_PHY_LAN8720
621-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
625+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
622626
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
623627

624628
Starting connection to server...
@@ -686,7 +690,7 @@ The terminal output of **WT32_ETH01** running [UdpNTPClient example](examples/Ud
686690
687691
```
688692
Starting UdpNTPClient on ESP32_DEV with ETH_PHY_LAN8720
689-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
693+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
690694
ETH Started
691695
ETH Connected
692696
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.95
@@ -724,7 +728,7 @@ The terminal output of **WT32_ETH01** running [BasicHttpClient example](examples
724728
725729
```
726730
Starting BasicHttpClient on ESP32_DEV with ETH_PHY_LAN8720
727-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
731+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
728732
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
729733
[HTTP] begin...
730734
[HTTP] GET...
@@ -786,7 +790,7 @@ The terminal output of **WT32_ETH01** running [BasicHttpsClient example](example
786790
787791
```
788792
Starting BasicHttpsClient on ESP32_DEV with ETH_PHY_LAN8720
789-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
793+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
790794
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
791795
Waiting for NTP time sync: .
792796
Current time: Tue Jul 6 05:29:39 2021
@@ -831,7 +835,7 @@ The terminal output of **WT32_ETH01** running [WebClientMulti_SSL example](examp
831835
832836
```
833837
Starting WebClientMulti_SSL on ESP32_DEV with ETH_PHY_LAN8720
834-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
838+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
835839
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
836840
Waiting for NTP time sync: .
837841
Current time: Tue Jul 6 19:58:27 2021
@@ -945,7 +949,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL_Complex example](e
945949
946950
```
947951
Starting MQTTClient_SSL_Complex on ESP32_DEV with ETH_PHY_LAN8720
948-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
952+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
949953
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
950954
Waiting for NTP time sync: .
951955
Current time: Tue Jul 6 18:14:02 2021
@@ -965,7 +969,7 @@ The terminal output of **WT32_ETH01** running [MQTTS_ThingStream example](exampl
965969
966970
```
967971
Starting MQTTS_ThingStream on ESP32_DEV with ETH_PHY_LAN8720
968-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
972+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
969973
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
970974
Waiting for NTP time sync: .
971975
Current time: Tue Jul 6 18:38:22 2021
@@ -991,7 +995,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL example](examples/
991995
992996
```
993997
Starting MQTTClient_SSL on ESP32_DEV with ETH_PHY_LAN8720
994-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
998+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
995999
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
9961000
Waiting for NTP time sync: .
9971001
Current time: Tue Jul 6 17:11:00 2021
@@ -1016,7 +1020,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL_Auth example](exam
10161020
10171021
```
10181022
Starting MQTTClient_SSL_Auth on ESP32_DEV with ETH_PHY_LAN8720
1019-
WebServer_WT32_ETH01 v1.5.0 for core v2.0.0+
1023+
WebServer_WT32_ETH01 v1.5.1 for core v2.0.0+
10201024
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
10211025
Waiting for NTP time sync: .
10221026
Current time: Tue Jul 6 18:05:14 2021
@@ -1077,6 +1081,9 @@ Submit issues to: [WebServer_WT32_ETH01 issues](https://github.com/khoih-prog/We
10771081
5. Auto detect ESP32 core v1.0.6- or v2.0.0+ to use correct settings
10781082
6. Fix `multiple-definitions` linker error.
10791083
7. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project
1084+
8. Add example [MQTT_And_OTA_Ethernet](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/MQTT_And_OTA_Ethernet) to demo how to use OTA
1085+
9. Fix compile error for examples [serveStatic](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/serveStatic) and [serveStaticLoadFile](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/serveStaticLoadFile) to use built-in LittleFS library for new ESP32 cores
1086+
10. Fix compile error for examples [ESP32_FS_EthernetWebServer](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/ESP32_FS_EthernetWebServer) if WT32_ETH01 is selected as A0 (and many pins) not defined in new ESP32 cores
10801087

10811088
---
10821089
---

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313

1414
* [Changelog](#changelog)
15+
* [Releases v1.5.1](#releases-v151)
1516
* [Releases v1.5.0](#releases-v150)
1617
* [Releases v1.4.1](#releases-v141)
1718
* [Releases v1.4.0](#releases-v140)
@@ -25,6 +26,12 @@
2526

2627
## Changelog
2728

29+
#### Releases v1.5.1
30+
31+
1. Add example [MQTT_And_OTA_Ethernet](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/MQTT_And_OTA_Ethernet) to demo how to use OTA. Check [Added MQTT and OTA over Ethernet example to examples folder #9](https://github.com/khoih-prog/WebServer_WT32_ETH01/pull/9)
32+
2. Fix compile error for examples [serveStatic](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/serveStatic) and [serveStaticLoadFile](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/serveStaticLoadFile) to use built-in LittleFS library for new ESP32 cores
33+
3. Fix compile error for examples [ESP32_FS_EthernetWebServer](https://github.com/khoih-prog/WebServer_WT32_ETH01/tree/main/examples/ESP32_FS_EthernetWebServer) if WT32_ETH01 is selected as A0 (and many pins) not defined in new ESP32 cores
34+
2835
#### Releases v1.5.0
2936

3037
1. Fix multiple-definitions linker error.

examples/ESP32_FS_EthernetWebServer/ESP32_FS_EthernetWebServer.ino

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
#define USE_LITTLEFS true
3131
#define USE_SPIFFS false
3232

33+
// For WT32_ETH01 only (A0 = IO36 = 36)
34+
#if defined(ARDUINO_WT32_ETH01)
35+
#define A0 36
36+
#endif
37+
3338
// For ESP32
3439
#if USE_LITTLEFS
3540
//LittleFS has higher priority
@@ -367,7 +372,7 @@ void handleFileList()
367372
server.send(200, "text/json", output);
368373
}
369374

370-
void initFS(void)
375+
void initFS()
371376
{
372377
// Initialize LittleFS/SPIFFS file-system
373378
// Format SPIFFS if not yet
@@ -406,7 +411,7 @@ void listDir()
406411
Serial.println();
407412
}
408413

409-
void initWebserver(void)
414+
void initWebserver()
410415
{
411416
//SERVER INIT
412417
//list directory
@@ -474,7 +479,7 @@ void initWebserver(void)
474479
server.begin();
475480
}
476481

477-
void setup(void)
482+
void setup()
478483
{
479484
Serial.begin(115200);
480485
while (!Serial);
@@ -512,7 +517,7 @@ void setup(void)
512517
Serial.println(F("/edit to see the file browser"));
513518
}
514519

515-
void loop(void)
520+
void loop()
516521
{
517522
server.handleClient();
518523
}

examples/HelloServer/HelloServer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void handleNotFound()
5656
server.send(404, F("text/plain"), message);
5757
}
5858

59-
void setup(void)
59+
void setup()
6060
{
6161
// Open serial communications and wait for port to open:
6262
Serial.begin(115200);
@@ -98,7 +98,7 @@ void setup(void)
9898
Serial.println(ETH.localIP());
9999
}
100100

101-
void loop(void)
101+
void loop()
102102
{
103103
server.handleClient();
104104
}

examples/HelloServer2/HelloServer2.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void handleNotFound()
5656
server.send(404, F("text/plain"), message);
5757
}
5858

59-
void setup(void)
59+
void setup()
6060
{
6161
Serial.begin(115200);
6262
while (!Serial);
@@ -120,7 +120,7 @@ void setup(void)
120120
Serial.println(ETH.localIP());
121121
}
122122

123-
void loop(void)
123+
void loop()
124124
{
125125
server.handleClient();
126126
}

examples/PostServer/PostServer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void handleNotFound()
105105
server.send(404, F("text/plain"), message);
106106
}
107107

108-
void setup(void)
108+
void setup()
109109
{
110110
Serial.begin(115200);
111111
while (!Serial);
@@ -145,7 +145,7 @@ void setup(void)
145145
Serial.println(ETH.localIP());
146146
}
147147

148-
void loop(void)
148+
void loop()
149149
{
150150
server.handleClient();
151151
}

examples/WebClient/WebClient.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void setup()
7171
}
7272
}
7373

74-
void printoutData(void)
74+
void printoutData()
7575
{
7676
// if there are incoming bytes available
7777
// from the server, read them and print them

0 commit comments

Comments
 (0)