diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6639a763..8b667a0d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -14,8 +14,8 @@ 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.13) or Platform.io version
-* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.0, etc.)
+* Arduino IDE version (e.g. 1.8.15) or Platform.io version
+* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.1, etc.)
* 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:
@@ -26,10 +26,11 @@ Please ensure to specify the following:
### Example
```
-Arduino IDE version: 1.8.13
-Arduino SAM DUE Core Version 1.6.12
+Arduino IDE version: 1.8.15
+WT32_ETH01 board
+ESP32 core v1.0.6
OS: Ubuntu 20.04 LTS
-Linux xy-Inspiron-3593 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
+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
Context:
The board couldn't autoreconnect to Local Blynk Server after router power recycling.
@@ -40,6 +41,7 @@ Steps to reproduce:
3. ...
4. ...
```
+
### Sending Feature Requests
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.
diff --git a/README.md b/README.md
index 53719054..7669a94c 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,7 @@
* [Currently supported Boards](#currently-supported-boards)
* [Currently supported Ethernet shields/modules](#currently-supported-ethernet-shieldsmodules)
* [Changelog](#changelog)
+ * [Major Releases v1.5.0](#major-releases-v150)
* [Major Releases v1.4.0](#major-releases-v140)
* [Major Releases v1.3.0](#major-releases-v130)
* [Major Releases v1.2.0](#major-releases-v120)
@@ -105,12 +106,14 @@
* [ 5. Ethernet_SAMD](examples/Ethernet_SAMD)
* [ 6. Ethernet_SAM_DUE](examples/Ethernet_SAM_DUE)
* [ 7. Ethernet_Teensy](examples/Ethernet_Teensy)
- * [ 8. **MQTT_ThingStream_Ethernet_Generic**](examples/MQTT_ThingStream_Ethernet_Generic)
- * [ 9. **MQTT_ThingStream_Ethernet_nRF52**](examples/MQTT_ThingStream_Ethernet_nRF52)
- * [10. **MQTT_ThingStream_Ethernet_RP2040**](examples/MQTT_ThingStream_Ethernet_RP2040). **New**
- * [11. **MQTT_ThingStream_Ethernet_SAMD**](examples/MQTT_ThingStream_Ethernet_SAMD)
- * [12. **MQTT_ThingStream_Ethernet_SAM_DUE**](examples/MQTT_ThingStream_Ethernet_SAM_DUE)
- * [13. **MQTT_ThingStream_Ethernet_Teensy**](examples/MQTT_ThingStream_Ethernet_Teensy)
+ * [ 8. Ethernet_WT32_ETH01](examples/Ethernet_WT32_ETH01). **New**
+ * [ 9. **MQTT_ThingStream_Ethernet_Generic**](examples/MQTT_ThingStream_Ethernet_Generic)
+ * [10. **MQTT_ThingStream_Ethernet_nRF52**](examples/MQTT_ThingStream_Ethernet_nRF52)
+ * [11. **MQTT_ThingStream_Ethernet_RP2040**](examples/MQTT_ThingStream_Ethernet_RP2040). **New**
+ * [12. **MQTT_ThingStream_Ethernet_SAMD**](examples/MQTT_ThingStream_Ethernet_SAMD)
+ * [13. **MQTT_ThingStream_Ethernet_SAM_DUE**](examples/MQTT_ThingStream_Ethernet_SAM_DUE)
+ * [14. **MQTT_ThingStream_Ethernet_Teensy**](examples/MQTT_ThingStream_Ethernet_Teensy)
+ * [15. **MQTT_ThingStream_Ethernet_WT32_ETH01**](examples/MQTT_ThingStream_Ethernet_WT32_ETH01). **New**
* [So, how it works?](#so-how-it-works)
* [Example Ethernet_Generic](#example-ethernet_generic)
* [1. File Ethernet_Generic.ino](#1-file-ethernet_genericino)
@@ -137,6 +140,10 @@
* [7. Ethernet_RP2040 on MBED RASPBERRY_PI_PICO with W5500 using EthernetLarge Library](#7-ethernet_rp2040-on-mbed-raspberry_pi_pico-with-w5500-using-ethernetlarge-library)
* [7.1. DRD => Config Portal](#71-drd--config-portal)
* [7.2. Data Saved => Exit Config Portal](#72-data-saved--exit-config-portal)
+ * [8. MQTT_ThingStream_Ethernet_WT32_ETH01 on WT32-ETH01](#8-mqtt_thingstream_ethernet_wt32_eth01-on-wt32-eth01)
+ * [8.1. Normal run with correct ThingStream MQTT Credentials](#81-normal-run-with-correct-thingstream-mqtt-credentials)
+
+
* [Debug](#debug)
* [Troubleshooting](#troubleshooting)
* [Releases](#releases)
@@ -203,20 +210,27 @@ This [**Ethernet_Manager** library](https://github.com/khoih-prog/Ethernet_Manag
9. RP2040-based boards, such as **Nano RP2040 Connect**, using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed).
10. RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** v2.1.0+ core](https://github.com/arduino/ArduinoCore-mbed)
+
+11. **WT32_ETH01 boards** using ESP32-based boards and LAN8720 Ethernet
+
+---
- ---
-
-#### Currently Supported Ethernet shields/modules:
+#### Supported Ethernet shields/modules:
1. W5x00 using [`Ethernet`](https://www.arduino.cc/en/Reference/Ethernet), [`EthernetLarge`](https://github.com/OPEnSLab-OSU/EthernetLarge), [`Ethernet2`](https://github.com/adafruit/Ethernet2) or [`Ethernet3`](https://github.com/sstaub/Ethernet3) library
2. ENC28J60 using [`EthernetENC`](https://github.com/jandrassy/EthernetENC) or [`UIPEthernet`](https://github.com/UIPEthernet/UIPEthernet) library
3. Teensy 4.1 NativeEthernet using [`NativeEthernet Library version stable111+`](https://github.com/vjmuzik/NativeEthernet).
+4. LAN8720 Ethernet used in WT32_ETH01 boards
---
---
## Changelog
+### Major Releases v1.5.0
+
+1. Add support to ESP32-based WT32-ETH01 (ESP32 + LAN8720) boards, using EEPROM, SPIFFS or LittleFS
+
### Major Releases v1.4.0
1. Add support to RP2040-based boards, such as **Nano RP2040 Connect**, using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed) and LittleFS.
@@ -260,18 +274,18 @@ This [**Ethernet_Manager** library](https://github.com/khoih-prog/Ethernet_Manag
## Prerequisites
- 1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
+ 1. [`Arduino IDE 1.8.15+` for Arduino](https://www.arduino.cc/en/Main/Software)
2. [`Teensy core v1.51`](https://www.pjrc.com/teensy/td_download.html) for Teensy (4.0, 3.6, 3.5, 3,2, 3.1, 3.0) boards and [`Teensy core v1.53+`](https://www.pjrc.com/teensy/td_download.html) for Teensy 4.1 boards using NativeEthernet.
3. [`Arduino SAM DUE core v1.6.12+`](https://www.arduino.cc/en/Guide/ArduinoDue) for SAM DUE ARM Cortex-M3 boards.
4. [`Arduino SAMD core 1.8.11+`](https://www.arduino.cc/en/Guide/ArduinoM0) for SAMD ARM Cortex-M0+ boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-samd.svg)](https://github.com/arduino/ArduinoCore-samd/releases/latest)
- 5. [`Adafruit SAMD core 1.7.2+`](https://www.adafruit.com/) for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). [![GitHub release](https://img.shields.io/github/release/adafruit/ArduinoCore-samd.svg)](https://github.com/adafruit/ArduinoCore-samd/releases/latest)
+ 5. [`Adafruit SAMD core 1.7.3+`](https://www.adafruit.com/) for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). [![GitHub release](https://img.shields.io/github/release/adafruit/ArduinoCore-samd.svg)](https://github.com/adafruit/ArduinoCore-samd/releases/latest)
6. [`Seeeduino SAMD core 1.8.1+`](https://github.com/Seeed-Studio/ArduinoCore-samd) for SAMD21/SAMD51 boards (XIAO M0, Wio Terminal, etc.). [![Latest release](https://img.shields.io/github/release/Seeed-Studio/ArduinoCore-samd.svg)](https://github.com/Seeed-Studio/ArduinoCore-samd/releases/latest/)
- 7. [`Adafruit nRF52 v0.22.1+`](https://www.adafruit.com) for nRF52 boards such as Adafruit NRF52840_FEATHER, NRF52832_FEATHER, NRF52840_FEATHER_SENSE, NRF52840_ITSYBITSY, NRF52840_CIRCUITPLAY, NRF52840_CLUE, NRF52840_METRO, NRF52840_PCA10056, PARTICLE_XENON, **NINA_B302_ublox**, etc. [![GitHub release](https://img.shields.io/github/release/adafruit/Adafruit_nRF52_Arduino.svg)](https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/latest)
- 8. [`ESP8266 Core 3.0.0+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/). To use ESP8266 core 2.7.1+ for LittleFS.
+ 7. [`Adafruit nRF52 v0.24.0+`](https://www.adafruit.com) for nRF52 boards such as Adafruit NRF52840_FEATHER, NRF52832_FEATHER, NRF52840_FEATHER_SENSE, NRF52840_ITSYBITSY, NRF52840_CIRCUITPLAY, NRF52840_CLUE, NRF52840_METRO, NRF52840_PCA10056, PARTICLE_XENON, **NINA_B302_ublox**, etc. [![GitHub release](https://img.shields.io/github/release/adafruit/Adafruit_nRF52_Arduino.svg)](https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/latest)
+ 8. [`ESP8266 Core 3.0.1+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/). To use ESP8266 core 2.7.1+ for LittleFS.
9. [`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/)
10. [`ESP32S2 Core 1.0.6+`](https://github.com/espressif/arduino-esp32/tree/esp32s2) for ESP32S2-based boards.
-11. [`Earle Philhower's arduino-pico core v1.6.2+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
-12. [`Arduino mbed_rp2040 core 2.1.0+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
+11. [`Earle Philhower's arduino-pico core v1.9.1+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
+12. [`Arduino mbed_rp2040 core 2.2.0+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
13. Depending on which Ethernet card you're using:
- [`Ethernet library v2.0.0+`](https://github.com/arduino-libraries/Ethernet) for W5100, W5200 and W5500. [![GitHub release](https://img.shields.io/github/release/arduino-libraries/Ethernet.svg)](https://github.com/arduino-libraries/Ethernet/releases/latest)
- [`EthernetLarge library v2.0.0+`](https://github.com/OPEnSLab-OSU/EthernetLarge) for W5100, W5200 and W5500.
@@ -285,10 +299,11 @@ This [**Ethernet_Manager** library](https://github.com/khoih-prog/Ethernet_Manag
- [`FlashStorage_SAMD library v1.1.0+`](https://github.com/khoih-prog/FlashStorage_SAMD) for SAMD21 and SAMD51 boards (ZERO, MKR, NANO_33_IOT, M0, M0 Pro, AdaFruit Itsy-Bitsy M4, etc.). [![GitHub release](https://img.shields.io/github/release/khoih-prog/FlashStorage_SAMD.svg)](https://github.com/khoih-prog/FlashStorage_SAMD/releases/latest)
- [`Adafruit's LittleFS/InternalFS`](www.adafruit.com) for nRF52
15. [`EthernetWebServer library v1.5.0+`](https://github.com/khoih-prog/EthernetWebServer). To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/EthernetWebServer.svg?)](https://www.ardu-badge.com/EthernetWebServer).
-16. [`ESP_DoubleResetDetector library v1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) for ESP32 and ESP8266. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector).
-17. [`DoubleResetDetector_Generic library v1.3.0+`](https://github.com/khoih-prog/DoubleResetDetector_Generic) for other boards (not ESP32 or ESP8266). To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/DoubleResetDetector_Generic.svg?)](https://www.ardu-badge.com/DoubleResetDetector_Generic).
-18. [`Functional-VLPP library v1.0.2+`](https://github.com/khoih-prog/functional-vlpp) to use server's lambda function. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Functional-Vlpp.svg?)](https://www.ardu-badge.com/Functional-Vlpp)
-19. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [esp32 core v1.0.6](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS).
+16. [`WebServer_WT32_ETH01 library v1.1.0+`](https://github.com/khoih-prog/WebServer_WT32_ETH01) for WT32_ETH01 boards. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/WebServer_WT32_ETH01.svg?)](https://www.ardu-badge.com/WebServer_WT32_ETH01).
+17. [`ESP_DoubleResetDetector library v1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) for ESP32 and ESP8266. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector).
+18. [`DoubleResetDetector_Generic library v1.4.0+`](https://github.com/khoih-prog/DoubleResetDetector_Generic) for other boards (not ESP32 or ESP8266). To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/DoubleResetDetector_Generic.svg?)](https://www.ardu-badge.com/DoubleResetDetector_Generic).
+19. [`Functional-VLPP library v1.0.2+`](https://github.com/khoih-prog/functional-vlpp) to use server's lambda function. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Functional-Vlpp.svg?)](https://www.ardu-badge.com/Functional-Vlpp)
+20. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [esp32 core v1.0.6](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS).
---
@@ -1325,12 +1340,14 @@ Please be noted that the following **reserved names are already used in library*
5. [Ethernet_SAMD](examples/Ethernet_SAMD)
6. [Ethernet_SAM_DUE](examples/Ethernet_SAM_DUE)
7. [Ethernet_Teensy](examples/Ethernet_Teensy)
- 8. [**MQTT_ThingStream_Ethernet_Generic**](examples/MQTT_ThingStream_Ethernet_Generic).
- 9. [**MQTT_ThingStream_Ethernet_nRF52**](examples/MQTT_ThingStream_Ethernet_nRF52).
-10. [**MQTT_ThingStream_Ethernet_RP2040**](examples/MQTT_ThingStream_Ethernet_RP2040). **New**
-11. [**MQTT_ThingStream_Ethernet_SAMD**](examples/MQTT_ThingStream_Ethernet_SAMD).
-12. [**MQTT_ThingStream_Ethernet_SAM_DUE**](examples/MQTT_ThingStream_Ethernet_SAM_DUE).
-13. [**MQTT_ThingStream_Ethernet_Teensy**](examples/MQTT_ThingStream_Ethernet_Teensy).
+ 8. [Ethernet_WT32_ETH01](examples/Ethernet_WT32_ETH01). **New**
+ 9. [**MQTT_ThingStream_Ethernet_Generic**](examples/MQTT_ThingStream_Ethernet_Generic).
+10. [**MQTT_ThingStream_Ethernet_nRF52**](examples/MQTT_ThingStream_Ethernet_nRF52).
+11. [**MQTT_ThingStream_Ethernet_RP2040**](examples/MQTT_ThingStream_Ethernet_RP2040). **New**
+12. [**MQTT_ThingStream_Ethernet_SAMD**](examples/MQTT_ThingStream_Ethernet_SAMD).
+13. [**MQTT_ThingStream_Ethernet_SAM_DUE**](examples/MQTT_ThingStream_Ethernet_SAM_DUE).
+14. [**MQTT_ThingStream_Ethernet_Teensy**](examples/MQTT_ThingStream_Ethernet_Teensy).
+15. [**MQTT_ThingStream_Ethernet_WT32_ETH01**](examples/MQTT_ThingStream_Ethernet_WT32_ETH01). **New**
---
---
@@ -2413,8 +2430,8 @@ This is the terminal output of an Adafruit NRF52840_FEATHER board with W5500 Eth
```
Start Ethernet_nRF52 on NRF52840_FEATHER
Ethernet Shield type W5x00 using Ethernet2 Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
[ETHERNET_WEBSERVER] =========== USE_ETHERNET2 ===========
[ETHERNET_WEBSERVER] Default SPI pinout:
[ETHERNET_WEBSERVER] MOSI: 25
@@ -2505,8 +2522,8 @@ Pubs Topics = old-mqtt-PubTopic
```cpp
Start Ethernet_nRF52 on NRF52840_FEATHER
Ethernet Shield type : W5x00 using Ethernet2 Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
[ETHERNET_WEBSERVER] =========== USE_ETHERNET2 ===========
[ETHERNET_WEBSERVER] Default SPI pinout:
[ETHERNET_WEBSERVER] MOSI: 25
@@ -2688,8 +2705,8 @@ This is the terminal output of an SeeedStudio SAMD21 SEEED_XIAO_M0 board with W5
```
Start Ethernet_SAMD on SEEED_XIAO_M0
Ethernet Shield type : W5x00 using Ethernet Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
Flag read = 0xffffffff
No doubleResetDetected
SetFlag write = 0xd0d01234
@@ -2765,8 +2782,8 @@ This is the terminal output of an Arduino SAM DUE board with W5100 Ethernet shie
```
Start Ethernet_SAM_DUE on SAM DUE
Ethernet Shield type : W5x00 using EthernetLarge Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
Flag read = 0xd0d01234
doubleResetDetected
ClearFlag write = 0xd0d04321
@@ -2851,7 +2868,7 @@ If no valid config data are stored in EEPROM, it will switch to `Configuration M
```
Start MQTT_ThingStream_Ethernet_Generic using LittleFS on ESP8266_NODEMCU
Ethernet Shield type : W5x00 using Ethernet2 Library
-Ethernet_Manager v1.4.0
+Ethernet_Manager v1.5.0
ESP_DoubleResetDetector Version v1.1.1
=========================
Currently Used SPI pinout:
@@ -2899,7 +2916,7 @@ Enter your credentials (Blynk Servers/Tokens and Port). If you prefer static IP,
```
Start MQTT_ThingStream_Ethernet_Generic using LittleFS on ESP8266_NODEMCU
Ethernet Shield type : W5x00 using Ethernet2 Library
-Ethernet_Manager v1.4.0
+Ethernet_Manager v1.5.0
ESP_DoubleResetDetector Version v1.1.1
=========================
Currently Used SPI pinout:
@@ -2959,8 +2976,8 @@ This is the terminal output of NRF52840_FEATHER board with ENC28J60 using Ethern
```
Start MQTT_ThingStream_Ethernet_Generic on NRF52840_FEATHER
Ethernet Shield type : ENC28J60 using EthernetENC Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
LittleFS Flag read = 0xd0d01234
Flag read = 0xd0d01234
doubleResetDetected
@@ -2997,8 +3014,8 @@ esp32-sniffer/12345678/ble
```
Start MQTT_ThingStream_Ethernet_Generic on NRF52840_FEATHER
Ethernet Shield type : ENC28J60 using EthernetENC Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
LittleFS Flag read = 0xd0d04321
Flag read = 0xd0d04321
No doubleResetDetected
@@ -3054,8 +3071,8 @@ This is the terminal output of RASPBERRY_PI_PICO board with W5x00 using Ethernet
```
Start MQTT_ThingStream_Ethernet_RP2040 on RASPBERRY_PI_PICO
Ethernet Shield type : W5x00 using Ethernet Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
[EWS] =========== USE_ETHERNET ===========
[EWS] Default SPI pinout:
[EWS] MOSI: 19
@@ -3111,8 +3128,8 @@ esp32-sniffer/12345678/ble
```
Start MQTT_ThingStream_Ethernet_RP2040 on RASPBERRY_PI_PICO
Ethernet Shield type : W5x00 using Ethernet Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
[EWS] =========== USE_ETHERNET ===========
[EWS] Default SPI pinout:
[EWS] MOSI: 19
@@ -3184,8 +3201,8 @@ This is the terminal output of an MBED RASPBERRY_PI_PICO board with W5500 Ethern
```
Start Ethernet_RP2040 on MBED RASPBERRY_PI_PICO
Ethernet Shield type : W5x00 using EthernetLarge Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
[EWS] MOSI: 3
@@ -3257,8 +3274,8 @@ HHHH[ETM] h:Updating LittleFS: /fs/etm_config.dat
```
Start Ethernet_RP2040 on MBED RASPBERRY_PI_PICO
Ethernet Shield type : W5x00 using EthernetLarge Library
-Ethernet_Manager v1.4.0
-DoubleResetDetector_Generic v1.3.0
+Ethernet_Manager v1.5.0
+DoubleResetDetector_Generic v1.4.0
[EWS] =========== USE_ETHERNET_LARGE ===========
[EWS] Default SPI pinout:
[EWS] MOSI: 3
@@ -3314,6 +3331,92 @@ ClearFlag write = 0xd0d04321
HHHHHH
```
+---
+
+
+#### 8. MQTT_ThingStream_Ethernet_WT32_ETH01 on WT32-ETH01
+
+This is the terminal output of WT32-ETH01 board with LAN8720 Ethernet, running complex [MQTT_ThingStream_Ethernet_WT32_ETH01](examples/MQTT_ThingStream_Ethernet_WT32_ETH01) example to demonstrate how to use dynamic parameters, entered via Config Portal, to connect to [**ThingStream MQTT Server**](mqtt.thingstream.io).
+
+#### 8.1. Normal run with correct ThingStream MQTT Credentials
+
+```
+Start MQTT_ThingStream_Ethernet_WT32_ETH01 on WT32-ETH01
+Ethernet Shield type : ETH_PHY_LAN8720
+WebServer_WT32_ETH01 v1.1.0
+Ethernet_Manager v1.5.0
+ESP_DoubleResetDetector v1.1.1
+[ETM] Set CustomsStyle to :
+[ETM] Set CustomsHeadElement to :
+[ETM] Set CORS Header to : Your Access-Control-Allow-Origin
+LittleFS Flag read = 0xD0D04321
+No doubleResetDetected
+Saving config file...
+Saving config file OK
+[ETM] LoadCfgFile
+[ETM] OK
+[ETM] ======= Start Stored Config Data =======
+[ETM] Header= WT32_ETH01 , BoardName= WT32_ETH01
+[ETM] StaticIP= 192.168.2.232
+[ETM] i= 0 ,id= mqtt
+[ETM] data= default-mqtt-server
+[ETM] i= 1 ,id= mqpt
+[ETM] data= 1883
+[ETM] i= 2 ,id= user
+[ETM] data= default-mqtt-username
+[ETM] i= 3 ,id= mqpw
+[ETM] data= default-mqtt-password
+[ETM] i= 4 ,id= clid
+[ETM] data= default-mqtt-clientID
+[ETM] CCSum=0x 7f0 ,RCSum=0x 7f0
+[ETM] LoadCredFile
+[ETM] CrR:pdata= mqtt.thingstream.io ,len= 48
+[ETM] CrR:pdata= 1883 ,len= 6
+[ETM] CrR:pdata= mqtt_user ,len= 34
+[ETM] CrR:pdata= mqtt_pass ,len= 48
+[ETM] CrR:pdata= client_ID ,len= 48
+[ETM] OK
+[ETM] CrCCsum=0x 2785 ,CrRCsum=0x 2785
+[ETM] Valid Stored Dynamic Data
+[ETM] Start connectEthernet using Static IP = 192.168.2.232
+[ETM] myGW IP = 192.168.2.1
+[ETM] ETH Started
+[ETM] ETH MAC: A8:03:2A:A1:61:73 , IPv4: 192.168.2.232
+[ETM] FULL_DUPLEX, Link Speed (Mbps) 100
+[ETM] IP: 192.168.2.232
+[ETM] Check if isForcedCP
+[ETM] LoadCPFile
+[ETM] OK
+[ETM] begin:Ethernet Connected.
+Connected! IP address: 192.168.2.232
+***************************************
+esp32-sniffer/12345678/ble
+***************************************
+Connecting to MQTT_SERVER = mqtt.thingstream.io, MQTT_PORT= 1883
+Attempting MQTT connection to mqtt.thingstream.io
+MQTT_CLIENT_ID = client_ID
+MQTT_USER = mqtt_user
+MQTT_PASS = mqtt_pass
+...connected
+Published connection message successfully!
+Subcribed to: esp32-sniffer/12345678/ble
+
+Your stored Credentials :
+MQTT Server = mqtt.thingstream.io
+Port = 1883
+MQTT UserName = mqtt_user
+MQTT PWD = mqtt_pass
+Client ID = client_ID
+HStop doubleResetDetecting
+Saving config file...
+Saving config file OK
+
+MQTT Message Send : esp32-sniffer/12345678/ble => Hello from MQTT_ThingStream on WT32-ETH01 with ETH_PHY_LAN8720
+H
+MQTT Message receive [esp32-sniffer/12345678/ble] Hello from MQTT_ThingStream on WT32-ETH01 with ETH_PHY_LAN8720
+H
+```
+
---
---
@@ -3345,6 +3448,10 @@ Sometimes, the library will only work if you update the board core to the latest
## Releases
+### Major Releases v1.5.0
+
+1. Add support to ESP32-based WT32-ETH01 (ESP32 + LAN8720) boards, using EEPROM, SPIFFS or LittleFS
+
### Major Releases v1.4.0
1. Add support to RP2040-based boards, such as **Nano RP2040 Connect**, using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed) and LittleFS.
@@ -3405,12 +3512,15 @@ This [**Ethernet_Manager** library](https://github.com/khoih-prog/Ethernet_Manag
8. RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [Earle Philhower's arduino-pico core](https://github.com/earlephilhower/arduino-pico).
9. RP2040-based boards, such as **Nano RP2040 Connect**, using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed).
10. RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** v2.1.0+ core](https://github.com/arduino/ArduinoCore-mbed)
+
+11. **WT32_ETH01 boards** using ESP32-based boards and LAN8720 Ethernet
#### Supported Ethernet shields/modules:
1. W5x00 using [`Ethernet`](https://www.arduino.cc/en/Reference/Ethernet), [`EthernetLarge`](https://github.com/OPEnSLab-OSU/EthernetLarge), [`Ethernet2`](https://github.com/adafruit/Ethernet2) or [`Ethernet3`](https://github.com/sstaub/Ethernet3) library
2. ENC28J60 using [`EthernetENC`](https://github.com/jandrassy/EthernetENC) or [`UIPEthernet`](https://github.com/UIPEthernet/UIPEthernet) library
3. Teensy 4.1 NativeEthernet using [`NativeEthernet Library version stable111+`](https://github.com/vjmuzik/NativeEthernet).
+4. LAN8720 Ethernet used in WT32_ETH01 boards
---
---
@@ -3457,6 +3567,8 @@ Default Credentials and dynamic parameters
23. Add support to RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [Earle Philhower's arduino-pico core](https://github.com/earlephilhower/arduino-pico) and LittleFS.
24. Add support to RP2040-based boards, such as **Nano RP2040 Connect**, using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed) and LittleFS.
25. Add support to RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** v2.1.0+ core](https://github.com/arduino/ArduinoCore-mbed) and LittleFS.
+26. Add support to **WT32_ETH01 boards** using ESP32-based boards and LAN8720 Ethernet
+
---
---
diff --git a/examples/AM2315_Ethernet/AM2315_Ethernet.ino b/examples/AM2315_Ethernet/AM2315_Ethernet.ino
index f94bc24f..b22606af 100644
--- a/examples/AM2315_Ethernet/AM2315_Ethernet.ino
+++ b/examples/AM2315_Ethernet/AM2315_Ethernet.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
AM2315_Ethernet.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/AM2315_Ethernet/Credentials.h b/examples/AM2315_Ethernet/Credentials.h
index 1c82d900..e899daf7 100644
--- a/examples/AM2315_Ethernet/Credentials.h
+++ b/examples/AM2315_Ethernet/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/AM2315_Ethernet/defines.h b/examples/AM2315_Ethernet/defines.h
index 4014702d..0498bb80 100644
--- a/examples/AM2315_Ethernet/defines.h
+++ b/examples/AM2315_Ethernet/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/AM2315_Ethernet/dynamicParams.h b/examples/AM2315_Ethernet/dynamicParams.h
index ba75afdc..c1486b08 100644
--- a/examples/AM2315_Ethernet/dynamicParams.h
+++ b/examples/AM2315_Ethernet/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_Generic/Credentials.h b/examples/Ethernet_Generic/Credentials.h
index 4654c7b9..84826cf4 100644
--- a/examples/Ethernet_Generic/Credentials.h
+++ b/examples/Ethernet_Generic/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_Generic/Ethernet_Generic.ino b/examples/Ethernet_Generic/Ethernet_Generic.ino
index 3d63cff2..039e1ba9 100644
--- a/examples/Ethernet_Generic/Ethernet_Generic.ino
+++ b/examples/Ethernet_Generic/Ethernet_Generic.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
Ethernet_Generic.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/Ethernet_Generic/defines.h b/examples/Ethernet_Generic/defines.h
index 4014702d..0498bb80 100644
--- a/examples/Ethernet_Generic/defines.h
+++ b/examples/Ethernet_Generic/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_Generic/dynamicParams.h b/examples/Ethernet_Generic/dynamicParams.h
index ba75afdc..c1486b08 100644
--- a/examples/Ethernet_Generic/dynamicParams.h
+++ b/examples/Ethernet_Generic/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_RP2040/Credentials.h b/examples/Ethernet_RP2040/Credentials.h
index 6b14fa72..d7b1ee21 100644
--- a/examples/Ethernet_RP2040/Credentials.h
+++ b/examples/Ethernet_RP2040/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_RP2040/Ethernet_RP2040.ino b/examples/Ethernet_RP2040/Ethernet_RP2040.ino
index f3d7c094..bbb512cf 100644
--- a/examples/Ethernet_RP2040/Ethernet_RP2040.ino
+++ b/examples/Ethernet_RP2040/Ethernet_RP2040.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
Ethernet_RP2040.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/Ethernet_RP2040/defines.h b/examples/Ethernet_RP2040/defines.h
index c563df59..cdb37018 100644
--- a/examples/Ethernet_RP2040/defines.h
+++ b/examples/Ethernet_RP2040/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_RP2040/dynamicParams.h b/examples/Ethernet_RP2040/dynamicParams.h
index ba75afdc..c1486b08 100644
--- a/examples/Ethernet_RP2040/dynamicParams.h
+++ b/examples/Ethernet_RP2040/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_SAMD/Credentials.h b/examples/Ethernet_SAMD/Credentials.h
index 252abc7a..10fca1dc 100644
--- a/examples/Ethernet_SAMD/Credentials.h
+++ b/examples/Ethernet_SAMD/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_SAMD/Ethernet_SAMD.ino b/examples/Ethernet_SAMD/Ethernet_SAMD.ino
index cb50d273..6e9fef68 100644
--- a/examples/Ethernet_SAMD/Ethernet_SAMD.ino
+++ b/examples/Ethernet_SAMD/Ethernet_SAMD.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
Ethernet_SAMD.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/Ethernet_SAMD/defines.h b/examples/Ethernet_SAMD/defines.h
index 4d6319a0..0b3e70c0 100644
--- a/examples/Ethernet_SAMD/defines.h
+++ b/examples/Ethernet_SAMD/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_SAMD/dynamicParams.h b/examples/Ethernet_SAMD/dynamicParams.h
index ba75afdc..c1486b08 100644
--- a/examples/Ethernet_SAMD/dynamicParams.h
+++ b/examples/Ethernet_SAMD/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_SAM_DUE/Credentials.h b/examples/Ethernet_SAM_DUE/Credentials.h
index ba49a58e..24d17885 100644
--- a/examples/Ethernet_SAM_DUE/Credentials.h
+++ b/examples/Ethernet_SAM_DUE/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_SAM_DUE/Ethernet_SAM_DUE.ino b/examples/Ethernet_SAM_DUE/Ethernet_SAM_DUE.ino
index 615384d2..b3991233 100644
--- a/examples/Ethernet_SAM_DUE/Ethernet_SAM_DUE.ino
+++ b/examples/Ethernet_SAM_DUE/Ethernet_SAM_DUE.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
Ethernet_SAM_DUE.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/Ethernet_SAM_DUE/defines.h b/examples/Ethernet_SAM_DUE/defines.h
index f9ddfe5e..5e5cbf1c 100644
--- a/examples/Ethernet_SAM_DUE/defines.h
+++ b/examples/Ethernet_SAM_DUE/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_SAM_DUE/dynamicParams.h b/examples/Ethernet_SAM_DUE/dynamicParams.h
index ba75afdc..c1486b08 100644
--- a/examples/Ethernet_SAM_DUE/dynamicParams.h
+++ b/examples/Ethernet_SAM_DUE/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_Teensy/Credentials.h b/examples/Ethernet_Teensy/Credentials.h
index 277f524d..b6ecdeaf 100644
--- a/examples/Ethernet_Teensy/Credentials.h
+++ b/examples/Ethernet_Teensy/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_Teensy/Ethernet_Teensy.ino b/examples/Ethernet_Teensy/Ethernet_Teensy.ino
index 0c61f255..e79dc8d6 100644
--- a/examples/Ethernet_Teensy/Ethernet_Teensy.ino
+++ b/examples/Ethernet_Teensy/Ethernet_Teensy.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
Ethernet_Teensy.ino
- For W5x00, ENC28J60 and Teensy 4.1 NativeEthernet.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/Ethernet_Teensy/defines.h b/examples/Ethernet_Teensy/defines.h
index 2d588127..d2ba9487 100644
--- a/examples/Ethernet_Teensy/defines.h
+++ b/examples/Ethernet_Teensy/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_Teensy/dynamicParams.h b/examples/Ethernet_Teensy/dynamicParams.h
index ba75afdc..c1486b08 100644
--- a/examples/Ethernet_Teensy/dynamicParams.h
+++ b/examples/Ethernet_Teensy/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_WT32_ETH01/Credentials.h b/examples/Ethernet_WT32_ETH01/Credentials.h
new file mode 100644
index 00000000..80e3627a
--- /dev/null
+++ b/examples/Ethernet_WT32_ETH01/Credentials.h
@@ -0,0 +1,67 @@
+/****************************************************************************************************************************
+ Credentials.h
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+ *****************************************************************************************************************************/
+
+#ifndef Credentials_h
+#define Credentials_h
+
+#include "defines.h"
+
+/// Start Default Config Data //////////////////
+
+/*
+typedef struct Configuration
+{
+ char header [16];
+ char static_IP [16];
+ char board_name [24];
+ int checkSum;
+} Ethernet_Configuration;
+*/
+
+#define TO_LOAD_DEFAULT_CONFIG_DATA false
+
+#if TO_LOAD_DEFAULT_CONFIG_DATA
+
+bool LOAD_DEFAULT_CONFIG_DATA = false;
+
+Ethernet_Configuration defaultConfig =
+{
+ //char header[16], dummy, not used
+#if USE_SSL
+ "Eth_SSL",
+#else
+ "Eth_NonSSL",
+#endif
+
+ // char static_IP [16];
+ //"192.168.2.232",
+ // Use dynamic DHCP IP
+ "",
+ //char board_name [24];
+ "WT32-ETH01",
+ // terminate the list
+ //int checkSum, dummy, not used
+ 0
+ /////////// End Default Config Data /////////////
+};
+
+#else
+
+bool LOAD_DEFAULT_CONFIG_DATA = false;
+
+Ethernet_Configuration defaultConfig;
+
+#endif // TO_LOAD_DEFAULT_CONFIG_DATA
+
+/////////// End Default Config Data /////////////
+
+#endif //Credentials_h
diff --git a/examples/Ethernet_WT32_ETH01/Ethernet_WT32_ETH01.ino b/examples/Ethernet_WT32_ETH01/Ethernet_WT32_ETH01.ino
new file mode 100644
index 00000000..a52abaa5
--- /dev/null
+++ b/examples/Ethernet_WT32_ETH01/Ethernet_WT32_ETH01.ino
@@ -0,0 +1,215 @@
+/****************************************************************************************************************************
+ Ethernet_RP2040.ino
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+
+ Version: 1.5.0
+
+ Version Modified By Date Comments
+ ------- ----------- ---------- -----------
+ 1.0.0 K Hoang 14/12/2020 Initial coding.
+ 1.1.0 K Hoang 17/12/2020 Add support to ESP32/ESP8266. Add MQTT related examples to demo dynamic parameter usage
+ 1.1.1 K Hoang 28/12/2020 Suppress all possible compiler warnings
+ 1.2.0 K Hoang 22/02/2021 Optimize code and use better FlashStorage_SAMD and FlashStorage_STM32.
+ Add customs HTML header feature. Fix bug.
+ 1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
+ 1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
+ *****************************************************************************************************************************/
+
+#include "defines.h"
+#include "Credentials.h"
+#include "dynamicParams.h"
+
+Ethernet_Manager ethernet_manager;
+
+IPAddress localEthernetIP;
+
+void heartBeatPrint()
+{
+ static int num = 1;
+
+ localEthernetIP = ETH.localIP();
+
+ if ( ( (uint32_t) localEthernetIP != 0 ) )
+ {
+ Serial.print(F("H"));
+ }
+ else
+ Serial.print(F("F"));
+
+ if (num == 80)
+ {
+ Serial.println();
+ num = 1;
+ }
+ else if (num++ % 10 == 0)
+ {
+ Serial.print(F(" "));
+ }
+}
+
+void check_status()
+{
+ #define STATUS_CHECK_INTERVAL 10000L
+
+ static unsigned long checkstatus_timeout = STATUS_CHECK_INTERVAL;
+
+ // Send status report every STATUS_REPORT_INTERVAL (60) seconds: we don't need to send updates frequently if there is no status change.
+ if ((millis() > checkstatus_timeout))
+ {
+ heartBeatPrint();
+ checkstatus_timeout = millis() + STATUS_CHECK_INTERVAL;
+ }
+}
+
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
+void WiFiEvent(WiFiEvent_t event)
+{
+ switch (event)
+ {
+ case SYSTEM_EVENT_ETH_START:
+ ETM_LOGERROR(F("ETH Started"));
+ //set eth hostname here
+ ETH.setHostname("WT32-ETH01");
+ break;
+ case SYSTEM_EVENT_ETH_CONNECTED:
+ ETM_LOGERROR(F("ETH Connected"));
+ break;
+
+ case SYSTEM_EVENT_ETH_GOT_IP:
+ if (!ethernet_manager.ethernetConnected)
+ {
+ ETM_LOGERROR3(F("ETH MAC:"), ETH.macAddress(), F(", IPv4:"), ETH.localIP());
+
+ if (ETH.fullDuplex())
+ {
+ ETM_LOGERROR1(F("FULL_DUPLEX, Link Speed (Mbps)"), ETH.linkSpeed());
+ }
+ else
+ {
+ ETM_LOGERROR1(F("HALF_DUPLEX, Link Speed (Mbps)"), ETH.linkSpeed());
+ }
+
+ ethernet_manager.ethernetConnected = true;
+ }
+
+ break;
+
+ case SYSTEM_EVENT_ETH_DISCONNECTED:
+ ETM_LOGERROR(F("ETH Disconnected"));
+ ethernet_manager.ethernetConnected = false;
+ break;
+
+ case SYSTEM_EVENT_ETH_STOP:
+ ETM_LOGERROR(F("\nETH Stopped"));
+ ethernet_manager.ethernetConnected = false;
+ break;
+
+ default:
+ break;
+ }
+}
+
+void setup()
+{
+ // Debug console
+ Serial.begin(115200);
+ while (!Serial);
+
+ // Using this if Serial debugging is not necessary or not using Serial port
+ //while (!Serial && (millis() < 3000));
+
+ Serial.print("\nStart Ethernet_WT32_ETH01 on "); Serial.println(BOARD_NAME);
+ Serial.print("Ethernet Shield type : "); Serial.println(SHIELD_TYPE);
+ Serial.println(WEBSERVER_WT32_ETH01_VERSION);
+ Serial.println(ETHERNET_MANAGER_VERSION);
+ Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
+
+ WiFi.onEvent(WiFiEvent);
+
+ //////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ ethernet_manager.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ ethernet_manager.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ ethernet_manager.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ ethernet_manager.begin();
+
+ //////////////////////////////////////////////
+
+ localEthernetIP = ETH.localIP();
+
+ if ( (uint32_t) localEthernetIP != 0 )
+ {
+ Serial.print(F("Connected! IP address: "));
+ Serial.println(localEthernetIP);
+ }
+ else
+ {
+ Serial.println(F("Ethernet not Connected! Please check."));
+ }
+}
+
+#if (USE_DYNAMIC_PARAMETERS)
+void displayCredentials()
+{
+ Serial.println("\nYour stored Credentials :");
+
+ for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ {
+ Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ }
+}
+
+void displayCredentialsOnce()
+{
+ static bool displayedCredentials = false;
+
+ if (!displayedCredentials)
+ {
+ for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ {
+ if (!strlen(myMenuItems[i].pdata))
+ {
+ break;
+ }
+
+ if ( i == (NUM_MENU_ITEMS - 1) )
+ {
+ displayedCredentials = true;
+ displayCredentials();
+ }
+ }
+ }
+}
+#endif
+
+void loop()
+{
+ ethernet_manager.run();
+
+ check_status();
+
+#if (USE_DYNAMIC_PARAMETERS)
+ displayCredentialsOnce();
+#endif
+}
diff --git a/examples/Ethernet_WT32_ETH01/defines.h b/examples/Ethernet_WT32_ETH01/defines.h
new file mode 100644
index 00000000..8dc1e13d
--- /dev/null
+++ b/examples/Ethernet_WT32_ETH01/defines.h
@@ -0,0 +1,70 @@
+/****************************************************************************************************************************
+ defines.h
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+ *****************************************************************************************************************************/
+
+#ifndef defines_h
+#define defines_h
+
+#if ESP32
+ #if defined(ETHERNET_USE_WT32_ETH01)
+ #undef ETHERNET_USE_WT32_ETH01
+ #endif
+ #define ETHERNET_USE_WT32_ETH01 true
+ #define USE_DYNAMIC_PARAMETERS true
+
+ #warning Use ESP32 architecture for WT32_ETH01
+#else
+ #error This code is designed to run on WT32_ETH01 and ESP32 platform! Please check your Tools->Board setting.
+#endif
+
+/* Comment this out to disable prints and save space */
+#define DEBUG_ETHERNET_WEBSERVER_PORT Serial
+
+// Debug Level from 0 to 4
+#define _ETHERNET_WEBSERVER_LOGLEVEL_ 2
+#define _ETHERNET_MANAGER_LOGLEVEL_ 2
+
+/////////////////////////////////////////////
+
+#define DOUBLERESETDETECTOR_DEBUG true
+
+#define USE_LITTLEFS true
+#define USE_SPIFFS false
+
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
+#define USE_DYNAMIC_PARAMETERS true
+
+//////////////////////////////////////////
+
+
+#include
+
+#ifndef SHIELD_TYPE
+#define SHIELD_TYPE "WT32_ETH01"
+#endif
+
+#define W5100_CS 10
+#define SDCARD_CS 4
+
+#define ETHERNET_HOST_NAME "WT32_ETH01"
+
+#endif //defines_h
diff --git a/examples/Ethernet_WT32_ETH01/dynamicParams.h b/examples/Ethernet_WT32_ETH01/dynamicParams.h
new file mode 100644
index 00000000..c1486b08
--- /dev/null
+++ b/examples/Ethernet_WT32_ETH01/dynamicParams.h
@@ -0,0 +1,76 @@
+/****************************************************************************************************************************
+ dynamicParams.h
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+ *****************************************************************************************************************************/
+
+#ifndef dynamicParams_h
+#define dynamicParams_h
+
+#include "defines.h"
+
+// USE_DYNAMIC_PARAMETERS defined in defined.h
+
+/////////////// Start dynamic Credentials ///////////////
+
+/**************************************
+ #define MAX_ID_LEN 5
+ #define MAX_DISPLAY_NAME_LEN 16
+
+ typedef struct
+ {
+ char id [MAX_ID_LEN + 1];
+ char displayName [MAX_DISPLAY_NAME_LEN + 1];
+ char *pdata;
+ uint8_t maxlen;
+ } MenuItem;
+**************************************/
+
+#if USE_DYNAMIC_PARAMETERS
+
+ #define MAX_MQTT_SERVER_LEN 34
+ char MQTT_Server [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server";
+
+ #define MAX_MQTT_PORT_LEN 6
+ char MQTT_Port [MAX_MQTT_PORT_LEN + 1] = "1883";
+
+ #define MAX_MQTT_USERNAME_LEN 34
+ char MQTT_UserName [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username";
+
+ #define MAX_MQTT_PW_LEN 34
+ char MQTT_PW [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password";
+
+ #define MAX_MQTT_SUBS_TOPIC_LEN 34
+ char MQTT_SubsTopic [MAX_MQTT_SUBS_TOPIC_LEN + 1] = "default-mqtt-SubTopic";
+
+ #define MAX_MQTT_PUB_TOPIC_LEN 34
+ char MQTT_PubTopic [MAX_MQTT_PUB_TOPIC_LEN + 1] = "default-mqtt-PubTopic";
+
+ MenuItem myMenuItems [] =
+ {
+ { "mqtt", "MQTT Server", MQTT_Server, MAX_MQTT_SERVER_LEN },
+ { "mqpt", "Port", MQTT_Port, MAX_MQTT_PORT_LEN },
+ { "user", "MQTT UserName", MQTT_UserName, MAX_MQTT_USERNAME_LEN },
+ { "mqpw", "MQTT PWD", MQTT_PW, MAX_MQTT_PW_LEN },
+ { "subs", "Subs Topics", MQTT_SubsTopic, MAX_MQTT_SUBS_TOPIC_LEN },
+ { "pubs", "Pubs Topics", MQTT_PubTopic, MAX_MQTT_PUB_TOPIC_LEN },
+ };
+
+ uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize;
+
+#else
+
+ MenuItem myMenuItems [] = {};
+
+ uint16_t NUM_MENU_ITEMS = 0;
+#endif
+
+/////// // End dynamic Credentials ///////////
+
+#endif //dynamicParams_h
diff --git a/examples/Ethernet_nRF52/Credentials.h b/examples/Ethernet_nRF52/Credentials.h
index 6b14fa72..d7b1ee21 100644
--- a/examples/Ethernet_nRF52/Credentials.h
+++ b/examples/Ethernet_nRF52/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_nRF52/Ethernet_nRF52.ino b/examples/Ethernet_nRF52/Ethernet_nRF52.ino
index ce658244..1763b74a 100644
--- a/examples/Ethernet_nRF52/Ethernet_nRF52.ino
+++ b/examples/Ethernet_nRF52/Ethernet_nRF52.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
Ethernet_nRF52.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/Ethernet_nRF52/defines.h b/examples/Ethernet_nRF52/defines.h
index 95679615..d71b0da8 100644
--- a/examples/Ethernet_nRF52/defines.h
+++ b/examples/Ethernet_nRF52/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/Ethernet_nRF52/dynamicParams.h b/examples/Ethernet_nRF52/dynamicParams.h
index ba75afdc..c1486b08 100644
--- a/examples/Ethernet_nRF52/dynamicParams.h
+++ b/examples/Ethernet_nRF52/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_Generic/Credentials.h b/examples/MQTT_ThingStream_Ethernet_Generic/Credentials.h
index 56fd9f8a..d25f73e3 100644
--- a/examples/MQTT_ThingStream_Ethernet_Generic/Credentials.h
+++ b/examples/MQTT_ThingStream_Ethernet_Generic/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_Generic/MQTT_ThingStream_Ethernet_Generic.ino b/examples/MQTT_ThingStream_Ethernet_Generic/MQTT_ThingStream_Ethernet_Generic.ino
index 9ed98fe9..ee98bc1f 100644
--- a/examples/MQTT_ThingStream_Ethernet_Generic/MQTT_ThingStream_Ethernet_Generic.ino
+++ b/examples/MQTT_ThingStream_Ethernet_Generic/MQTT_ThingStream_Ethernet_Generic.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
MQTT_ThingStream_Ethernet_Generic.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/MQTT_ThingStream_Ethernet_Generic/defines.h b/examples/MQTT_ThingStream_Ethernet_Generic/defines.h
index d90fcb37..2539d4fe 100644
--- a/examples/MQTT_ThingStream_Ethernet_Generic/defines.h
+++ b/examples/MQTT_ThingStream_Ethernet_Generic/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_Generic/dynamicParams.h b/examples/MQTT_ThingStream_Ethernet_Generic/dynamicParams.h
index 38d26c81..f23150da 100644
--- a/examples/MQTT_ThingStream_Ethernet_Generic/dynamicParams.h
+++ b/examples/MQTT_ThingStream_Ethernet_Generic/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_RP2040/Credentials.h b/examples/MQTT_ThingStream_Ethernet_RP2040/Credentials.h
index dba89af1..6b99362d 100644
--- a/examples/MQTT_ThingStream_Ethernet_RP2040/Credentials.h
+++ b/examples/MQTT_ThingStream_Ethernet_RP2040/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_RP2040/MQTT_ThingStream_Ethernet_RP2040.ino b/examples/MQTT_ThingStream_Ethernet_RP2040/MQTT_ThingStream_Ethernet_RP2040.ino
index 6728b1c6..46d6927b 100644
--- a/examples/MQTT_ThingStream_Ethernet_RP2040/MQTT_ThingStream_Ethernet_RP2040.ino
+++ b/examples/MQTT_ThingStream_Ethernet_RP2040/MQTT_ThingStream_Ethernet_RP2040.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
MQTT_ThingStream_Ethernet_RP2040.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/MQTT_ThingStream_Ethernet_RP2040/defines.h b/examples/MQTT_ThingStream_Ethernet_RP2040/defines.h
index ba9bd6c1..366ab069 100644
--- a/examples/MQTT_ThingStream_Ethernet_RP2040/defines.h
+++ b/examples/MQTT_ThingStream_Ethernet_RP2040/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_RP2040/dynamicParams.h b/examples/MQTT_ThingStream_Ethernet_RP2040/dynamicParams.h
index 38d26c81..f23150da 100644
--- a/examples/MQTT_ThingStream_Ethernet_RP2040/dynamicParams.h
+++ b/examples/MQTT_ThingStream_Ethernet_RP2040/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_SAMD/Credentials.h b/examples/MQTT_ThingStream_Ethernet_SAMD/Credentials.h
index e750adc4..2378f224 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAMD/Credentials.h
+++ b/examples/MQTT_ThingStream_Ethernet_SAMD/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_SAMD/MQTT_ThingStream_Ethernet_SAMD.ino b/examples/MQTT_ThingStream_Ethernet_SAMD/MQTT_ThingStream_Ethernet_SAMD.ino
index 15ab78fe..4a1b4127 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAMD/MQTT_ThingStream_Ethernet_SAMD.ino
+++ b/examples/MQTT_ThingStream_Ethernet_SAMD/MQTT_ThingStream_Ethernet_SAMD.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
MQTT_ThingStream_Ethernet_SAMD.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/MQTT_ThingStream_Ethernet_SAMD/defines.h b/examples/MQTT_ThingStream_Ethernet_SAMD/defines.h
index 3225a9af..a2450e37 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAMD/defines.h
+++ b/examples/MQTT_ThingStream_Ethernet_SAMD/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_SAMD/dynamicParams.h b/examples/MQTT_ThingStream_Ethernet_SAMD/dynamicParams.h
index 38d26c81..f23150da 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAMD/dynamicParams.h
+++ b/examples/MQTT_ThingStream_Ethernet_SAMD/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/Credentials.h b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/Credentials.h
index e750adc4..2378f224 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/Credentials.h
+++ b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/MQTT_ThingStream_Ethernet_SAM_DUE.ino b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/MQTT_ThingStream_Ethernet_SAM_DUE.ino
index c93e3500..7e2f95ee 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/MQTT_ThingStream_Ethernet_SAM_DUE.ino
+++ b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/MQTT_ThingStream_Ethernet_SAM_DUE.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
MQTT_ThingStream_Ethernet_SAM_DUE.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/defines.h b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/defines.h
index f9ddfe5e..5e5cbf1c 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/defines.h
+++ b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/dynamicParams.h b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/dynamicParams.h
index 38d26c81..f23150da 100644
--- a/examples/MQTT_ThingStream_Ethernet_SAM_DUE/dynamicParams.h
+++ b/examples/MQTT_ThingStream_Ethernet_SAM_DUE/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_Teensy/Credentials.h b/examples/MQTT_ThingStream_Ethernet_Teensy/Credentials.h
index e750adc4..2378f224 100644
--- a/examples/MQTT_ThingStream_Ethernet_Teensy/Credentials.h
+++ b/examples/MQTT_ThingStream_Ethernet_Teensy/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_Teensy/MQTT_ThingStream_Ethernet_Teensy.ino b/examples/MQTT_ThingStream_Ethernet_Teensy/MQTT_ThingStream_Ethernet_Teensy.ino
index 68b58c57..91c59e9b 100644
--- a/examples/MQTT_ThingStream_Ethernet_Teensy/MQTT_ThingStream_Ethernet_Teensy.ino
+++ b/examples/MQTT_ThingStream_Ethernet_Teensy/MQTT_ThingStream_Ethernet_Teensy.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
MQTT_ThingStream_Ethernet_Teensy.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/MQTT_ThingStream_Ethernet_Teensy/defines.h b/examples/MQTT_ThingStream_Ethernet_Teensy/defines.h
index 2d588127..d2ba9487 100644
--- a/examples/MQTT_ThingStream_Ethernet_Teensy/defines.h
+++ b/examples/MQTT_ThingStream_Ethernet_Teensy/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_Teensy/dynamicParams.h b/examples/MQTT_ThingStream_Ethernet_Teensy/dynamicParams.h
index 38d26c81..f23150da 100644
--- a/examples/MQTT_ThingStream_Ethernet_Teensy/dynamicParams.h
+++ b/examples/MQTT_ThingStream_Ethernet_Teensy/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/Credentials.h b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/Credentials.h
new file mode 100644
index 00000000..e1202902
--- /dev/null
+++ b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/Credentials.h
@@ -0,0 +1,67 @@
+/****************************************************************************************************************************
+ Credentials.h
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+ *****************************************************************************************************************************/
+
+#ifndef Credentials_h
+#define Credentials_h
+
+#include "defines.h"
+
+/// Start Default Config Data //////////////////
+
+/*
+typedef struct Configuration
+{
+ char header [16];
+ char static_IP [16];
+ char board_name [24];
+ int checkSum;
+} Ethernet_Configuration;
+*/
+
+#define TO_LOAD_DEFAULT_CONFIG_DATA true
+
+#if TO_LOAD_DEFAULT_CONFIG_DATA
+
+bool LOAD_DEFAULT_CONFIG_DATA = false;
+
+Ethernet_Configuration defaultConfig =
+{
+ //char header[16], dummy, not used
+#if USE_SSL
+ "Eth_SSL",
+#else
+ "Eth_NonSSL",
+#endif
+
+ // char static_IP [16];
+ //"192.168.2.232",
+ // Use dynamic DHCP IP
+ "",
+ //char board_name [24];
+ "WT32-ETH01",
+ // terminate the list
+ //int checkSum, dummy, not used
+ 0
+ /////////// End Default Config Data /////////////
+};
+
+#else
+
+bool LOAD_DEFAULT_CONFIG_DATA = false;
+
+Ethernet_Configuration defaultConfig;
+
+#endif // TO_LOAD_DEFAULT_CONFIG_DATA
+
+/////////// End Default Config Data /////////////
+
+#endif //Credentials_h
diff --git a/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/MQTT_ThingStream_Ethernet_WT32_ETH01.ino b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/MQTT_ThingStream_Ethernet_WT32_ETH01.ino
new file mode 100644
index 00000000..ade9ba89
--- /dev/null
+++ b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/MQTT_ThingStream_Ethernet_WT32_ETH01.ino
@@ -0,0 +1,363 @@
+/****************************************************************************************************************************
+ MQTT_ThingStream_Ethernet_RP2040.ino
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+
+ Version: 1.5.0
+
+ Version Modified By Date Comments
+ ------- ----------- ---------- -----------
+ 1.0.0 K Hoang 14/12/2020 Initial coding.
+ 1.1.0 K Hoang 17/12/2020 Add support to ESP32/ESP8266. Add MQTT related examples to demo dynamic parameter usage
+ 1.1.1 K Hoang 28/12/2020 Suppress all possible compiler warnings
+ 1.2.0 K Hoang 22/02/2021 Optimize code and use better FlashStorage_SAMD and FlashStorage_STM32.
+ Add customs HTML header feature. Fix bug.
+ 1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
+ 1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
+ *****************************************************************************************************************************/
+
+#include "defines.h"
+#include "Credentials.h"
+#include "dynamicParams.h"
+
+///////////// Start MQTT ThingStream ///////////////
+#include
+
+// GOT FROM ThingsStream!
+
+const char *MQTT_PREFIX_TOPIC = "esp32-sniffer/";
+const char *MQTT_ANNOUNCE_TOPIC = "/status";
+const char *MQTT_CONTROL_TOPIC = "/control";
+const char *MQTT_BLE_TOPIC = "/ble";
+
+String topic = MQTT_PREFIX_TOPIC + String("12345678") + MQTT_BLE_TOPIC;
+String subTopic = MQTT_PREFIX_TOPIC + String("12345678") + MQTT_BLE_TOPIC;
+
+//////////// End MQTT ThingStream ///////////////
+
+Ethernet_Manager ethernet_manager;
+
+IPAddress localEthernetIP;
+
+
+///////////// Start MQTT ThingStream ///////////////
+
+void mqtt_receive_callback(char* topic, byte* payload, unsigned int length);
+
+unsigned long lastMsg = 0;
+
+// Initialize the SSL client library
+WiFiClient ethClient;
+
+PubSubClient* client = NULL;
+
+/*
+ Called whenever a payload is received from a subscribed MQTT topic
+*/
+void mqtt_receive_callback(char* topic, byte* payload, unsigned int length)
+{
+ Serial.print("\nMQTT Message receive [");
+ Serial.print(topic);
+ Serial.print("] ");
+
+ for (unsigned int i = 0; i < length; i++)
+ {
+ Serial.print((char)payload[i]);
+ }
+
+ Serial.println();
+}
+
+void reconnect()
+{
+ // Loop until we're reconnected
+ while (!client->connected())
+ {
+ Serial.print("Attempting MQTT connection to ");
+ Serial.println(MQTT_SERVER);
+
+ Serial.print("MQTT_CLIENT_ID = ");
+ Serial.println(MQTT_CLIENT_ID);
+ Serial.print("MQTT_USER = ");
+ Serial.println(MQTT_USER);
+ Serial.print("MQTT_PASS = ");
+ Serial.println(MQTT_PASS);
+
+ // Attempt to connect
+ int connect_status = client->connect(MQTT_CLIENT_ID, MQTT_USER, MQTT_PASS, topic.c_str(), 2, false, "");
+
+ if (connect_status)
+ {
+ Serial.println("...connected");
+
+ // Once connected, publish an announcement...
+ String data = "Hello from MQTTClient_SSL on " + String(BOARD_NAME);
+
+ client->publish(topic.c_str(), data.c_str());
+
+ Serial.println("Published connection message successfully!");
+
+ Serial.print("Subcribed to: ");
+ Serial.println(subTopic);
+
+ // ... and resubscribe
+ client->subscribe(subTopic.c_str());
+ // for loopback testing
+ client->subscribe(topic.c_str());
+ }
+ else
+ {
+ Serial.print("failed, rc=");
+ Serial.print(client->state());
+ Serial.println(" try again in 5 seconds");
+
+ // Wait 5 seconds before retrying
+ delay(5000);
+ }
+ }
+}
+
+///////////// End MQTT ThingStream ///////////////
+
+void heartBeatPrint()
+{
+ static int num = 1;
+
+ localEthernetIP = ETH.localIP();
+
+ if ( ( (uint32_t) localEthernetIP != 0 ) )
+ {
+ Serial.print(F("H"));
+ }
+ else
+ Serial.print(F("F"));
+
+ if (num == 80)
+ {
+ Serial.println();
+ num = 1;
+ }
+ else if (num++ % 10 == 0)
+ {
+ Serial.print(F(" "));
+ }
+}
+
+void check_status()
+{
+ #define STATUS_CHECK_INTERVAL 10000L
+
+ static unsigned long checkstatus_timeout = STATUS_CHECK_INTERVAL;
+
+ // Send status report every STATUS_REPORT_INTERVAL (60) seconds: we don't need to send updates frequently if there is no status change.
+ if ((millis() > checkstatus_timeout))
+ {
+ heartBeatPrint();
+ checkstatus_timeout = millis() + STATUS_CHECK_INTERVAL;
+ }
+}
+
+#if USING_CUSTOMS_STYLE
+const char NewCustomsStyle[] /*PROGMEM*/ = "";
+#endif
+
+void WiFiEvent(WiFiEvent_t event)
+{
+ switch (event)
+ {
+ case SYSTEM_EVENT_ETH_START:
+ ETM_LOGERROR(F("ETH Started"));
+ //set eth hostname here
+ ETH.setHostname("WT32-ETH01");
+ break;
+ case SYSTEM_EVENT_ETH_CONNECTED:
+ ETM_LOGERROR(F("ETH Connected"));
+ break;
+
+ case SYSTEM_EVENT_ETH_GOT_IP:
+ if (!ethernet_manager.ethernetConnected)
+ {
+ ETM_LOGERROR3(F("ETH MAC:"), ETH.macAddress(), F(", IPv4:"), ETH.localIP());
+
+ if (ETH.fullDuplex())
+ {
+ ETM_LOGERROR1(F("FULL_DUPLEX, Link Speed (Mbps)"), ETH.linkSpeed());
+ }
+ else
+ {
+ ETM_LOGERROR1(F("HALF_DUPLEX, Link Speed (Mbps)"), ETH.linkSpeed());
+ }
+
+ ethernet_manager.ethernetConnected = true;
+ }
+
+ break;
+
+ case SYSTEM_EVENT_ETH_DISCONNECTED:
+ ETM_LOGERROR(F("ETH Disconnected"));
+ ethernet_manager.ethernetConnected = false;
+ break;
+
+ case SYSTEM_EVENT_ETH_STOP:
+ ETM_LOGERROR(F("\nETH Stopped"));
+ ethernet_manager.ethernetConnected = false;
+ break;
+
+ default:
+ break;
+ }
+}
+
+void setup()
+{
+ // Debug console
+ Serial.begin(115200);
+ while (!Serial);
+
+ // Using this if Serial debugging is not necessary or not using Serial port
+ //while (!Serial && (millis() < 3000));
+
+ Serial.print("\nStart MQTT_ThingStream_Ethernet_WT32_ETH01 on "); Serial.println(BOARD_NAME);
+ Serial.print("Ethernet Shield type : "); Serial.println(SHIELD_TYPE);
+ Serial.println(WEBSERVER_WT32_ETH01_VERSION);
+ Serial.println(ETHERNET_MANAGER_VERSION);
+ Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
+
+ WiFi.onEvent(WiFiEvent);
+
+ //////////////////////////////////////////////
+
+#if USING_CUSTOMS_STYLE
+ ethernet_manager.setCustomsStyle(NewCustomsStyle);
+#endif
+
+#if USING_CUSTOMS_HEAD_ELEMENT
+ ethernet_manager.setCustomsHeadElement("");
+#endif
+
+#if USING_CORS_FEATURE
+ ethernet_manager.setCORSHeader("Your Access-Control-Allow-Origin");
+#endif
+
+ ethernet_manager.begin();
+
+ //////////////////////////////////////////////
+
+ localEthernetIP = ETH.localIP();
+
+ if ( (uint32_t) localEthernetIP != 0 )
+ {
+ Serial.print(F("Connected! IP address: "));
+ Serial.println(localEthernetIP);
+ }
+ else
+ {
+ Serial.println(F("Ethernet not Connected! Please check."));
+ }
+
+ Serial.println("***************************************");
+ Serial.println(topic);
+ Serial.println("***************************************");
+}
+
+#if (USE_DYNAMIC_PARAMETERS)
+void displayCredentials()
+{
+ Serial.println("\nYour stored Credentials :");
+
+ for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ {
+ Serial.println(String(myMenuItems[i].displayName) + " = " + myMenuItems[i].pdata);
+ }
+}
+
+void displayCredentialsOnce()
+{
+ static bool displayedCredentials = false;
+
+ if (!displayedCredentials)
+ {
+ for (int i = 0; i < NUM_MENU_ITEMS; i++)
+ {
+ if (!strlen(myMenuItems[i].pdata))
+ {
+ break;
+ }
+
+ if ( i == (NUM_MENU_ITEMS - 1) )
+ {
+ displayedCredentials = true;
+ displayCredentials();
+ }
+ }
+ }
+}
+#endif
+
+#define MQTT_PUBLISH_INTERVAL_MS 20000L
+
+String data = "Hello from MQTT_ThingStream on " + String(BOARD_NAME) + " with " + String(SHIELD_TYPE);
+const char *pubData = data.c_str();
+
+void loop()
+{
+ static bool inConfigMode = true;
+ static unsigned long currentMillis;
+
+ inConfigMode = ethernet_manager.run();
+
+ if (!inConfigMode)
+ {
+ if (!client)
+ {
+ Serial.print("Connecting to MQTT_SERVER = ");
+ Serial.print(MQTT_SERVER);
+ Serial.print(", MQTT_PORT= ");
+ Serial.println(atoi(MQTT_PORT));
+
+ client = new PubSubClient(MQTT_SERVER, atoi(MQTT_PORT), mqtt_receive_callback, ethClient);
+
+ // Note - the default maximum packet size is 256 bytes. If the
+ // combined length of clientId, username and password exceed this use the
+ // following to increase the buffer size:
+ //client->setBufferSize(256);
+ }
+
+ if (!client->connected())
+ {
+ reconnect();
+ }
+
+ // Sending Data
+ currentMillis = millis();
+
+ if (currentMillis - lastMsg > MQTT_PUBLISH_INTERVAL_MS)
+ {
+ lastMsg = currentMillis;
+
+ if (!client->publish(topic.c_str(), pubData))
+ {
+ Serial.println("Message failed to send.");
+ }
+
+ Serial.print("\nMQTT Message Send : " + topic + " => ");
+ Serial.println(data);
+ }
+
+ client->loop();
+
+ check_status();
+
+ #if (USE_DYNAMIC_PARAMETERS)
+ displayCredentialsOnce();
+ #endif
+ }
+}
diff --git a/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/defines.h b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/defines.h
new file mode 100644
index 00000000..a12b08e3
--- /dev/null
+++ b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/defines.h
@@ -0,0 +1,71 @@
+/****************************************************************************************************************************
+ defines.h
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+ *****************************************************************************************************************************/
+
+
+#ifndef defines_h
+#define defines_h
+
+#if ESP32
+ #if defined(ETHERNET_USE_WT32_ETH01)
+ #undef ETHERNET_USE_WT32_ETH01
+ #endif
+ #define ETHERNET_USE_WT32_ETH01 true
+ #define USE_DYNAMIC_PARAMETERS true
+
+ #warning Use ESP32 architecture for WT32_ETH01
+#else
+ #error This code is designed to run on WT32_ETH01 and ESP32 platform! Please check your Tools->Board setting.
+#endif
+
+/* Comment this out to disable prints and save space */
+#define DEBUG_ETHERNET_WEBSERVER_PORT Serial
+
+// Debug Level from 0 to 4
+#define _ETHERNET_WEBSERVER_LOGLEVEL_ 2
+#define _ETHERNET_MANAGER_LOGLEVEL_ 4
+
+/////////////////////////////////////////////
+
+#define DOUBLERESETDETECTOR_DEBUG true
+
+#define USE_LITTLEFS true
+#define USE_SPIFFS false
+
+/////////////////////////////////////////////
+
+// Add customs headers from v1.2.0
+#define USING_CUSTOMS_STYLE true
+#define USING_CUSTOMS_HEAD_ELEMENT true
+#define USING_CORS_FEATURE true
+
+/////////////////////////////////////////////
+
+// Config Timeout 120s (default 60s)
+#define CONFIG_TIMEOUT 120000L
+
+#define USE_DYNAMIC_PARAMETERS true
+
+//////////////////////////////////////////
+
+
+#include
+
+#ifndef SHIELD_TYPE
+#define SHIELD_TYPE "WT32_ETH01"
+#endif
+
+#define W5100_CS 10
+#define SDCARD_CS 4
+
+#define ETHERNET_HOST_NAME "WT32_ETH01"
+
+#endif //defines_h
diff --git a/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/dynamicParams.h b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/dynamicParams.h
new file mode 100644
index 00000000..f23150da
--- /dev/null
+++ b/examples/MQTT_ThingStream_Ethernet_WT32_ETH01/dynamicParams.h
@@ -0,0 +1,72 @@
+/****************************************************************************************************************************
+ dynamicParams.h
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+ *****************************************************************************************************************************/
+
+#ifndef dynamicParams_h
+#define dynamicParams_h
+
+#include "defines.h"
+
+// USE_DYNAMIC_PARAMETERS defined in defined.h
+
+/////////////// Start dynamic Credentials ///////////////
+
+/**************************************
+ #define MAX_ID_LEN 5
+ #define MAX_DISPLAY_NAME_LEN 16
+
+ typedef struct
+ {
+ char id [MAX_ID_LEN + 1];
+ char displayName [MAX_DISPLAY_NAME_LEN + 1];
+ char *pdata;
+ uint8_t maxlen;
+ } MenuItem;
+**************************************/
+
+#if USE_DYNAMIC_PARAMETERS
+
+ #define MAX_MQTT_SERVER_LEN 48
+ char MQTT_SERVER [MAX_MQTT_SERVER_LEN + 1] = "default-mqtt-server";
+
+ #define MAX_MQTT_PORT_LEN 6
+ char MQTT_PORT [MAX_MQTT_PORT_LEN + 1] = "1883";
+
+ #define MAX_MQTT_USERNAME_LEN 34
+ char MQTT_USER [MAX_MQTT_USERNAME_LEN + 1] = "default-mqtt-username";
+
+ #define MAX_MQTT_PW_LEN 48
+ char MQTT_PASS [MAX_MQTT_PW_LEN + 1] = "default-mqtt-password";
+
+ #define MAX_MQTT_CLIENT_ID 48
+ char MQTT_CLIENT_ID [MAX_MQTT_CLIENT_ID + 1] = "default-mqtt-clientID";
+
+ MenuItem myMenuItems [] =
+ {
+ { "mqtt", "MQTT Server", MQTT_SERVER, MAX_MQTT_SERVER_LEN },
+ { "mqpt", "Port", MQTT_PORT, MAX_MQTT_PORT_LEN },
+ { "user", "MQTT UserName", MQTT_USER, MAX_MQTT_USERNAME_LEN },
+ { "mqpw", "MQTT PWD", MQTT_PASS, MAX_MQTT_PW_LEN },
+ { "clid", "Client ID", MQTT_CLIENT_ID, MAX_MQTT_CLIENT_ID },
+ };
+
+ uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem); //MenuItemSize;
+
+#else
+
+ MenuItem myMenuItems [] = {};
+
+ uint16_t NUM_MENU_ITEMS = 0;
+#endif
+
+/////// // End dynamic Credentials ///////////
+
+#endif //dynamicParams_h
diff --git a/examples/MQTT_ThingStream_Ethernet_nRF52/Credentials.h b/examples/MQTT_ThingStream_Ethernet_nRF52/Credentials.h
index e750adc4..2378f224 100644
--- a/examples/MQTT_ThingStream_Ethernet_nRF52/Credentials.h
+++ b/examples/MQTT_ThingStream_Ethernet_nRF52/Credentials.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
Credentials.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_nRF52/MQTT_ThingStream_Ethernet_nRF52.ino b/examples/MQTT_ThingStream_Ethernet_nRF52/MQTT_ThingStream_Ethernet_nRF52.ino
index a5be652e..dcc1a14a 100644
--- a/examples/MQTT_ThingStream_Ethernet_nRF52/MQTT_ThingStream_Ethernet_nRF52.ino
+++ b/examples/MQTT_ThingStream_Ethernet_nRF52/MQTT_ThingStream_Ethernet_nRF52.ino
@@ -1,15 +1,15 @@
/****************************************************************************************************************************
MQTT_ThingStream_Ethernet_nRF52.ino
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -20,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#include "defines.h"
diff --git a/examples/MQTT_ThingStream_Ethernet_nRF52/defines.h b/examples/MQTT_ThingStream_Ethernet_nRF52/defines.h
index dfb77208..ab36963c 100644
--- a/examples/MQTT_ThingStream_Ethernet_nRF52/defines.h
+++ b/examples/MQTT_ThingStream_Ethernet_nRF52/defines.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
defines.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/examples/MQTT_ThingStream_Ethernet_nRF52/dynamicParams.h b/examples/MQTT_ThingStream_Ethernet_nRF52/dynamicParams.h
index 38d26c81..f23150da 100644
--- a/examples/MQTT_ThingStream_Ethernet_nRF52/dynamicParams.h
+++ b/examples/MQTT_ThingStream_Ethernet_nRF52/dynamicParams.h
@@ -1,8 +1,8 @@
/****************************************************************************************************************************
dynamicParams.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
diff --git a/library.json b/library.json
index 53ca2de3..3965b76f 100644
--- a/library.json
+++ b/library.json
@@ -1,8 +1,8 @@
{
"name": "Ethernet_Manager",
- "version": "1.4.0",
+ "version": "1.5.0",
"description": "Simple Ethernet Manager for Teensy, SAM DUE, SAMD, nRF52, ESP32 (including ESP32-S2/C3), ESP8266, RP2040-based Nano_RP2040_Connect, RASPBERRY_PI_PICO, etc. boards. Config data saved in ESP LittleFS, SPIFFS or EEPROM, nRF52 LittleFS, EEPROM, DueFlashStorage or SAMD FlashStorage. For configuring/auto(re)connecting Ethernet W5x00, ENC28J60 and NativeEthernet at runtime. Use much less memory compared to full-fledge WiFiManager. Config Portal (CP) will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into CP to use or change instead of manually input. Credentials are saved in LittleFS, (emulated-)EEPROM, FlashStorage_SAMD or DueFlashStorage. New powerful-yet-simple-to-use feature to enable adding dynamic parameters from sketch and input using the same CP. DoubleDetectDetector as well as Virtual Switches feature permits entering CP as requested. Configurable HTML Headers, including Customs Style, Head Elements, CORS Header",
- "keywords": "communication, ethernet, esp8266, esp32, esp32-s2, esp32-c3, rpi-pico, rp2040, nano-rp2040-connect, W5x00, ENC28J60, Teensy, SAM DUE, SAMD, STM32, nRF52, Credentials, config-portal, Double-Reset, MQTT, SAMD51, DynamicParameters, dynamic-params, customs-header, Manager",
+ "keywords": "communication, ethernet, esp8266, esp32, esp32-s2, esp32-c3, rpi-pico, rp2040, nano-rp2040-connect, W5x00, ENC28J60, lan8720, SAM DUE, SAMD, STM32, nRF52, Credentials, config-portal, WT32-ETH01, Double-Reset, MQTT, SAMD51, DynamicParameters, dynamic-params, customs-header, Manager",
"authors":
{
"name": "Khoi Hoang",
@@ -39,7 +39,7 @@
{
"owner": "khoih.prog",
"name": "DoubleResetDetector_Generic",
- "version": ">=1.3.0",
+ "version": ">=1.4.0",
"platforms": ["*"]
},
{
@@ -54,6 +54,12 @@
"version": "^1.1.0",
"platforms": ["*"]
},
+ {
+ "owner": "khoih.prog",
+ "name": "WebServer_WT32_ETH01",
+ "version": "^1.1.0",
+ "platforms": ["espressif32"]
+ },
{
"owner": "sebnil",
"name": "DueFlashStorage",
diff --git a/library.properties b/library.properties
index 83ff218d..7f852ede 100644
--- a/library.properties
+++ b/library.properties
@@ -1,12 +1,12 @@
name=Ethernet_Manager
-version=1.4.0
+version=1.5.0
author=Khoi Hoang
license=MIT
maintainer=Khoi Hoang
-sentence=Simple Ethernet Manager for Teensy, SAM DUE, SAMD21, SAMD51, nRF52, ESP32 (including ESP32-S2, ESP32-C3), ESP8266, RP2040-based Nano_RP2040_Connect, RASPBERRY_PI_PICO, etc. boards, with or without SSL, configuration data saved in ESP8266/ESP32 LittleFS, SPIFFS or EEPROM, nRF52/RP2040 LittleFS/InternalFS, EEPROM, DueFlashStorage or FlashStorage_SAMD.
+sentence=Simple Ethernet Manager for Teensy, SAM DUE, SAMD21, SAMD51, nRF52, ESP32 (including ESP32-S2, ESP32-C3, WT32-ETH01), ESP8266, RP2040-based Nano_RP2040_Connect, RASPBERRY_PI_PICO, etc. boards, with or without SSL, configuration data saved in ESP8266/ESP32 LittleFS, SPIFFS or EEPROM, nRF52/RP2040 LittleFS/InternalFS, EEPROM, DueFlashStorage or FlashStorage_SAMD.
paragraph=Library for configuring/auto(re)connecting Ethernet W5100/W5200/W5500, ENC28J60 and Teensy 4.1 NativeEthernet at runtime. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS/InternalFS, (emulated-)EEPROM, FlashStorage_SAMD or DueFlashStorage. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. DoubleDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.
category=Communication
url=https://github.com/khoih-prog/Ethernet_Manager
architectures=*
-depends=EthernetWebServer,DoubleResetDetector_Generic,ESP_DoubleResetDetector,Functional-Vlpp,FlashStorage_SAMD
+depends=EthernetWebServer,DoubleResetDetector_Generic,ESP_DoubleResetDetector,Functional-Vlpp,FlashStorage_SAMD,WebServer_WT32_ETH01
includes=Ethernet_Manager.h
diff --git a/platformio/platformio.ini b/platformio/platformio.ini
index 12f44f7c..05916480 100644
--- a/platformio/platformio.ini
+++ b/platformio/platformio.ini
@@ -33,15 +33,17 @@ lib_deps =
; PlatformIO 4.x
EthernetWebServer@>=1.5.0
ESP_DoubleResetDetector@>=1.1.1
- DoubleResetDetector_Generic@>=1.3.0
+ DoubleResetDetector_Generic@>=1.4.0
Functional-Vlpp@>=1.0.2
FlashStorage_SAMD@>=1.1.0
+ WebServer_WT32_ETH01@>=1.1.0
; PlatformIO 5.x
; khoih-prog/EthernetWebServer@>=1.5.0
; khoih.prog/ESP_DoubleResetDetector@>=1.1.1
-; khoih.prog/DoubleResetDetector_Generic@>=1.3.0
+; khoih.prog/DoubleResetDetector_Generic@>=1.4.0
; khoih-prog/Functional-Vlpp@>=1.0.2
; khoih.prog/FlashStorage_SAMD@>=1.1.0
+; khoih.prog/WebServer_WT32_ETH01@>=1.1.0
build_flags =
; set your debug output (default=Serial)
diff --git a/src/Adapters/Ethernet_DUE_Manager.h b/src/Adapters/Ethernet_DUE_Manager.h
index 24f0eb02..ce0418fc 100644
--- a/src/Adapters/Ethernet_DUE_Manager.h
+++ b/src/Adapters/Ethernet_DUE_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_DUE_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_ESP32_Manager.h b/src/Adapters/Ethernet_ESP32_Manager.h
index 529970cf..6459b9d9 100644
--- a/src/Adapters/Ethernet_ESP32_Manager.h
+++ b/src/Adapters/Ethernet_ESP32_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_ESP32_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_ESP8266_Manager.h b/src/Adapters/Ethernet_ESP8266_Manager.h
index 26cdc3bf..9433ea49 100644
--- a/src/Adapters/Ethernet_ESP8266_Manager.h
+++ b/src/Adapters/Ethernet_ESP8266_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_ESP8266_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_MBED_RP2040_Manager.h b/src/Adapters/Ethernet_MBED_RP2040_Manager.h
index 2b659cb7..362774a9 100644
--- a/src/Adapters/Ethernet_MBED_RP2040_Manager.h
+++ b/src/Adapters/Ethernet_MBED_RP2040_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_MBED_RP2040_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE, SAMD and RP2040 boards, with Ethernet W5x00 or
- ENC28J60 shields, to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_NRF52_Manager.h b/src/Adapters/Ethernet_NRF52_Manager.h
index 4b9c8bdd..5f38e6e9 100644
--- a/src/Adapters/Ethernet_NRF52_Manager.h
+++ b/src/Adapters/Ethernet_NRF52_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_NRF52_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_RP2040_Manager.h b/src/Adapters/Ethernet_RP2040_Manager.h
index a093fe05..45391458 100644
--- a/src/Adapters/Ethernet_RP2040_Manager.h
+++ b/src/Adapters/Ethernet_RP2040_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_RP2040_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE, SAMD and RP2040 boards, with Ethernet W5x00 or
- ENC28J60 shields, to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_SAMD_Manager.h b/src/Adapters/Ethernet_SAMD_Manager.h
index c4c22dab..3f533312 100644
--- a/src/Adapters/Ethernet_SAMD_Manager.h
+++ b/src/Adapters/Ethernet_SAMD_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_SAMD_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_Teensy_Manager.h b/src/Adapters/Ethernet_Teensy_Manager.h
index f99eec4c..58dc02b4 100644
--- a/src/Adapters/Ethernet_Teensy_Manager.h
+++ b/src/Adapters/Ethernet_Teensy_Manager.h
@@ -1,14 +1,15 @@
/****************************************************************************************************************************
Ethernet_Teensy_Manager.h
- For W5x00 and ENC28J60 Ethernet shields.
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
- Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00 or ENC28J60 shields,
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
AVR Mega is not supported.
Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
Licensed under MIT license
- Version: 1.4.0
+
+ Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
@@ -19,6 +20,7 @@
Add customs HTML header feature. Fix bug.
1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
*****************************************************************************************************************************/
#pragma once
diff --git a/src/Adapters/Ethernet_WT32_ETH01_Manager.h b/src/Adapters/Ethernet_WT32_ETH01_Manager.h
new file mode 100644
index 00000000..23f925de
--- /dev/null
+++ b/src/Adapters/Ethernet_WT32_ETH01_Manager.h
@@ -0,0 +1,1959 @@
+/****************************************************************************************************************************
+ Ethernet_WT32_ETH01_Manager.h
+ For W5x00, LAN8720 and ENC28J60 Ethernet shields.
+
+ Ethernet_Manager is a library for nRF52, Teensy, STM32, SAM DUE and SAMD boards, with Ethernet W5x00, LAN8720 or ENC28J60 shields,
+ to enable easy configuration/reconfiguration of Credentials and autoconnect/autoreconnect of Ethernet.
+ AVR Mega is not supported.
+
+ Built by Khoi Hoang https://github.com/khoih-prog/Ethernet_Manager
+ Licensed under MIT license
+
+ Version: 1.5.0
+
+ Version Modified By Date Comments
+ ------- ----------- ---------- -----------
+ 1.0.0 K Hoang 14/12/2020 Initial coding.
+ 1.1.0 K Hoang 17/12/2020 Add support to ESP32/ESP8266. Add MQTT related examples to demo dynamic parameter usage
+ 1.1.1 K Hoang 28/12/2020 Suppress all possible compiler warnings
+ 1.2.0 K Hoang 22/02/2021 Optimize code and use better FlashStorage_SAMD and FlashStorage_STM32.
+ Add customs HTML header feature. Fix bug.
+ 1.3.0 K Hoang 16/05/2021 Add support to RP2040-based boards such as RASPBERRY_PI_PICO
+ 1.4.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
+ 1.5.0 K Hoang 06/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720) boards
+*****************************************************************************************************************************/
+
+#pragma once
+
+#ifndef Ethernet_WT32_ETH01_Manager_h
+#define Ethernet_WT32_ETH01_Manager_h
+
+#if defined(ESP32)
+ #if defined(ETHERNET_USE_WT32_ETH01)
+ #undef ETHERNET_USE_WT32_ETH01
+ #endif
+ #warning ETHERNET_USE_WT32_ETH01 from Ethernet_WT32_ETH01_Manager.h
+ #define ETHERNET_USE_WT32_ETH01 true
+#else
+ #error This code is designed to run on WT32_ETH01 and ESP32 platform! Please check your Tools->Board setting.
+#endif
+
+// Increase HTTP_UPLOAD_BUFLEN to 4K, instead of default 2K in
+#ifndef HTTP_UPLOAD_BUFLEN
+ #define HTTP_UPLOAD_BUFLEN 4096
+#endif
+
+#if USE_LITTLEFS
+ // Use LittleFS
+ #include "FS.h"
+
+ // The library will be depreciated after being merged to future major Arduino esp32 core release 2.x
+ // At that time, just remove this library inclusion
+ #include // https://github.com/lorol/LITTLEFS
+
+ FS* filesystem = &LITTLEFS;
+ #define FileFS LITTLEFS
+#elif USE_SPIFFS
+ #include "FS.h"
+ #include
+ FS* filesystem = &SPIFFS;
+ #define FileFS SPIFFS
+#else
+ #include
+#endif
+
+//////////////////////////////////////////
+
+#ifndef USING_CUSTOMS_STYLE
+ #define USING_CUSTOMS_STYLE false
+#endif
+
+#ifndef USING_CUSTOMS_HEAD_ELEMENT
+ #define USING_CUSTOMS_HEAD_ELEMENT false
+#endif
+
+#ifndef USING_CORS_FEATURE
+ #define USING_CORS_FEATURE false
+#endif
+
+///////// NEW for DRD /////////////
+// These defines must be put before #include
+// to select where to store DoubleResetDetector's variable.
+// For ESP32, You must select one to be true (EEPROM or SPIFFS)
+// For ESP8266, You must select one to be true (RTC, EEPROM or SPIFFS)
+// Otherwise, library will use default EEPROM storage
+
+#if USE_LITTLEFS
+ #define ESP_DRD_USE_LITTLEFS true
+ #define ESP_DRD_USE_SPIFFS false
+ #define ESP_DRD_USE_EEPROM false
+#elif USE_SPIFFS
+ #define ESP_DRD_USE_LITTLEFS false
+ #define ESP_DRD_USE_SPIFFS true
+ #define ESP_DRD_USE_EEPROM false
+#else
+ #define ESP_DRD_USE_LITTLEFS false
+ #define ESP_DRD_USE_SPIFFS false
+ #define ESP_DRD_USE_EEPROM true
+#endif
+
+#ifndef DOUBLERESETDETECTOR_DEBUG
+ #define DOUBLERESETDETECTOR_DEBUG false
+#endif
+
+#include //https://github.com/khoih-prog/ESP_DoubleResetDetector
+
+// Number of seconds after reset during which a
+// subseqent reset will be considered a double reset.
+#define DRD_TIMEOUT 10
+
+// RTC Memory Address for the DoubleResetDetector to use
+#define DRD_ADDRESS 0
+
+//DoubleResetDetector drd(DRD_TIMEOUT, DRD_ADDRESS);
+DoubleResetDetector* drd;
+
+///////// NEW for DRD /////////////
+
+#include
+#define ESP_getChipId() ((uint32_t)ESP.getEfuseMac())
+
+
+//NEW
+#define MAX_ID_LEN 5
+#define MAX_DISPLAY_NAME_LEN 16
+
+typedef struct
+{
+ char id [MAX_ID_LEN + 1];
+ char displayName [MAX_DISPLAY_NAME_LEN + 1];
+ char *pdata;
+ uint8_t maxlen;
+} MenuItem;
+//
+
+#if USE_DYNAMIC_PARAMETERS
+ #warning Using Dynamic Parameters
+ ///NEW
+ extern uint16_t NUM_MENU_ITEMS;
+ extern MenuItem myMenuItems [];
+ bool *menuItemUpdated = NULL;
+#else
+ #warning Not using Dynamic Parameters
+#endif
+
+// Configurable items besides fixed Header
+#define NUM_CONFIGURABLE_ITEMS ( 2 )
+
+#define HEADER_MAX_LEN 16
+#define STATIC_IP_MAX_LEN 16
+#define BOARD_NAME_MAX_LEN 24
+
+typedef struct Configuration
+{
+ char header [HEADER_MAX_LEN];
+ char static_IP [STATIC_IP_MAX_LEN];
+ char board_name [BOARD_NAME_MAX_LEN];
+ int checkSum;
+} Ethernet_Configuration;
+
+// Currently CONFIG_DATA_SIZE = ( 60 )
+uint16_t CONFIG_DATA_SIZE = sizeof(Ethernet_Configuration);
+
+extern bool LOAD_DEFAULT_CONFIG_DATA;
+extern Ethernet_Configuration defaultConfig;
+
+// -- HTML page fragments
+
+const char ETM_HTML_HEAD_START[] /*PROGMEM*/ = "WT32_ETH01_Manager";
+
+const char ETM_HTML_HEAD_STYLE[] /*PROGMEM*/ = "";
+
+const char ETM_HTML_HEAD_END[] /*PROGMEM*/ = "