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

Commit

Permalink
v1.5.1 to add example and fix compile error
Browse files Browse the repository at this point in the history
#### 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
  • Loading branch information
khoih-prog authored Sep 11, 2022
1 parent 63ac506 commit 9ee886e
Show file tree
Hide file tree
Showing 16 changed files with 173 additions and 98 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.19) or Platform.io version
* Board Core Version (e.g. ESP32 core v2.0.3)
* Board Core Version (e.g. ESP32 core v2.0.4)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
* Anything that might be relevant in your opinion, such as:
Expand All @@ -28,12 +28,12 @@ Please ensure to specify the following:
```
Arduino IDE version: 1.8.19
WT32_ETH01 board
ESP32 core v2.0.3
ESP32 core v2.0.4
OS: Ubuntu 20.04 LTS
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
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
Context:
I encountered a crash while trying to use the Timer Interrupt.
I encountered a crash while trying to connect to network.
Steps to reproduce:
1. ...
Expand Down
45 changes: 26 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
* [ 4. MQTTS_ThingStream](examples/SSL/MQTTS_ThingStream)
* [ 5. WebClientMulti_SSL](examples/SSL/WebClientMulti_SSL)
* [ 6. WebClient_SSL](examples/SSL/WebClient_SSL)
* [OTA Example](#OTA-example)
* [ 1. MQTT_And_OTA_Ethernet](examples/MQTT_And_OTA_Ethernet) **New**
* [Example AdvancedWebServer](#example-advancedwebserver)
* [File AdvancedWebServer.ino](#file-advancedwebserverino)
* [Debug Terminal Output Samples](#debug-terminal-output-samples)
Expand Down Expand Up @@ -159,11 +161,10 @@ This [**WebServer_WT32_ETH01** library](https://github.com/khoih-prog/WebServer_
---



## Prerequisites

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)
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/)
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/)
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/)

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

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

### VS Code & PlatformIO:

Expand Down Expand Up @@ -464,6 +465,9 @@ Example:
5. [WebClientMulti_SSL](examples/SSL/WebClientMulti_SSL)
6. [WebClient_SSL](examples/SSL/WebClient_SSL)

#### OTA Example
1. [MQTT_And_OTA_Ethernet](examples/MQTT_And_OTA_Ethernet) **New**

---
---

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

```
Starting AdvancedWebServer on 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+
ETH Started
ETH Connected
Expand All @@ -507,7 +511,7 @@ The terminal output of **WT32_ETH01** running [ESP32_FS_EthernetWebServer](examp

```cpp
Starting ESP32_FS_EthernetWebServer on 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+

ETH Started
ETH Connected
Expand Down Expand Up @@ -557,7 +561,7 @@ The terminal output of **WT32_ETH01** running [MQTT_ThingStream example](example
```
Starting MQTT_ThingStream on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
***************************************
esp32-sniffer/12345678/ble
Expand All @@ -581,7 +585,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_Auth example](examples
```
Starting MQTTClient_Auth on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Attempting MQTT connection to broker.emqx.io...connected
Message Send : MQTT_Pub => Hello from MQTTClient_Auth on WT32-ETH01 with ETH_PHY_LAN8720
Expand All @@ -598,7 +602,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_Basic example](example
```
Starting MQTTClient_Basic on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Attempting MQTT connection to broker.emqx.io...connected
Message Send : MQTT_Pub => Hello from MQTTClient_Basic on WT32-ETH01 with ETH_PHY_LAN8720
Expand All @@ -618,7 +622,7 @@ The terminal output of **WT32_ETH01** running [WebClient example](examples/WebCl
```
Starting WebClient on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps

Starting connection to server...
Expand Down Expand Up @@ -686,7 +690,7 @@ The terminal output of **WT32_ETH01** running [UdpNTPClient example](examples/Ud
```
Starting UdpNTPClient on 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+
ETH Started
ETH Connected
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.95
Expand Down Expand Up @@ -724,7 +728,7 @@ The terminal output of **WT32_ETH01** running [BasicHttpClient example](examples
```
Starting BasicHttpClient on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
[HTTP] begin...
[HTTP] GET...
Expand Down Expand Up @@ -786,7 +790,7 @@ The terminal output of **WT32_ETH01** running [BasicHttpsClient example](example
```
Starting BasicHttpsClient on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Waiting for NTP time sync: .
Current time: Tue Jul 6 05:29:39 2021
Expand Down Expand Up @@ -831,7 +835,7 @@ The terminal output of **WT32_ETH01** running [WebClientMulti_SSL example](examp
```
Starting WebClientMulti_SSL on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Waiting for NTP time sync: .
Current time: Tue Jul 6 19:58:27 2021
Expand Down Expand Up @@ -945,7 +949,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL_Complex example](e
```
Starting MQTTClient_SSL_Complex on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Waiting for NTP time sync: .
Current time: Tue Jul 6 18:14:02 2021
Expand All @@ -965,7 +969,7 @@ The terminal output of **WT32_ETH01** running [MQTTS_ThingStream example](exampl
```
Starting MQTTS_ThingStream on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Waiting for NTP time sync: .
Current time: Tue Jul 6 18:38:22 2021
Expand All @@ -991,7 +995,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL example](examples/
```
Starting MQTTClient_SSL on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Waiting for NTP time sync: .
Current time: Tue Jul 6 17:11:00 2021
Expand All @@ -1016,7 +1020,7 @@ The terminal output of **WT32_ETH01** running [MQTTClient_SSL_Auth example](exam
```
Starting MQTTClient_SSL_Auth on 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+
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.232, FULL_DUPLEX, 100Mbps
Waiting for NTP time sync: .
Current time: Tue Jul 6 18:05:14 2021
Expand Down Expand Up @@ -1077,6 +1081,9 @@ Submit issues to: [WebServer_WT32_ETH01 issues](https://github.com/khoih-prog/We
5. Auto detect ESP32 core v1.0.6- or v2.0.0+ to use correct settings
6. Fix `multiple-definitions` linker error.
7. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project
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
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
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

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


* [Changelog](#changelog)
* [Releases v1.5.1](#releases-v151)
* [Releases v1.5.0](#releases-v150)
* [Releases v1.4.1](#releases-v141)
* [Releases v1.4.0](#releases-v140)
Expand All @@ -25,6 +26,12 @@

## Changelog

#### 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](https://github.com/khoih-prog/WebServer_WT32_ETH01/pull/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

#### Releases v1.5.0

1. Fix multiple-definitions linker error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
#define USE_LITTLEFS true
#define USE_SPIFFS false

// For WT32_ETH01 only (A0 = IO36 = 36)
#if defined(ARDUINO_WT32_ETH01)
#define A0 36
#endif

// For ESP32
#if USE_LITTLEFS
//LittleFS has higher priority
Expand Down Expand Up @@ -367,7 +372,7 @@ void handleFileList()
server.send(200, "text/json", output);
}

void initFS(void)
void initFS()
{
// Initialize LittleFS/SPIFFS file-system
// Format SPIFFS if not yet
Expand Down Expand Up @@ -406,7 +411,7 @@ void listDir()
Serial.println();
}

void initWebserver(void)
void initWebserver()
{
//SERVER INIT
//list directory
Expand Down Expand Up @@ -474,7 +479,7 @@ void initWebserver(void)
server.begin();
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
Expand Down Expand Up @@ -512,7 +517,7 @@ void setup(void)
Serial.println(F("/edit to see the file browser"));
}

void loop(void)
void loop()
{
server.handleClient();
}
4 changes: 2 additions & 2 deletions examples/HelloServer/HelloServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(115200);
Expand Down Expand Up @@ -98,7 +98,7 @@ void setup(void)
Serial.println(ETH.localIP());
}

void loop(void)
void loop()
{
server.handleClient();
}
4 changes: 2 additions & 2 deletions examples/HelloServer2/HelloServer2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
Expand Down Expand Up @@ -120,7 +120,7 @@ void setup(void)
Serial.println(ETH.localIP());
}

void loop(void)
void loop()
{
server.handleClient();
}
4 changes: 2 additions & 2 deletions examples/PostServer/PostServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
Expand Down Expand Up @@ -145,7 +145,7 @@ void setup(void)
Serial.println(ETH.localIP());
}

void loop(void)
void loop()
{
server.handleClient();
}
2 changes: 1 addition & 1 deletion examples/WebClient/WebClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void setup()
}
}

void printoutData(void)
void printoutData()
{
// if there are incoming bytes available
// from the server, read them and print them
Expand Down
Loading

0 comments on commit 9ee886e

Please sign in to comment.