## WebServer_WT32_ETH01
[![arduino-library-badge](https://www.ardu-badge.com/badge/WebServer_WT32_ETH01.svg?)](https://www.ardu-badge.com/WebServer_WT32_ETH01)
[![GitHub release](https://img.shields.io/github/release/khoih-prog/WebServer_WT32_ETH01.svg)](https://github.com/khoih-prog/WebServer_WT32_ETH01/releases)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/WebServer_WT32_ETH01.svg)](http://github.com/khoih-prog/WebServer_WT32_ETH01/issues)
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
---
---
## Table of Contents
* [Important Change from v1.5.0](#Important-Change-from-v150)
* [Why do we need this WebServer_WT32_ETH01 library](#why-do-we-need-this-webserver_wt32_eth01-library)
* [Important notes](#Important-notes)
* [Features](#features)
* [Currently supported Boards](#currently-supported-boards)
* [Changelog](changelog.md)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Use Arduino Library Manager](#use-arduino-library-manager)
* [Manual Install](#manual-install)
* [VS Code & PlatformIO](#vs-code--platformio)
* [Libraries' Patches](#libraries-patches)
* [1. For fixing ESP32 compile error](#1-for-fixing-esp32-compile-error)
* [HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)](#howto-use-analogread-with-esp32-running-wifi-andor-bluetooth-btble)
* [1. ESP32 has 2 ADCs, named ADC1 and ADC2](#1--esp32-has-2-adcs-named-adc1-and-adc2)
* [2. ESP32 ADCs functions](#2-esp32-adcs-functions)
* [3. ESP32 WiFi uses ADC2 for WiFi functions](#3-esp32-wifi-uses-adc2-for-wifi-functions)
* [Usage](#usage)
* [Class Constructor](#class-constructor)
* [Basic Operation](#basic-operations)
* [Advanced Options](#advanced-options)
* [Other Function Calls](#other-function-calls)
* [Examples](#examples)
* [Original Examples](#original-examples)
* [ 1. AdvancedWebServer](examples/AdvancedWebServer)
* [ 2. HelloServer](examples/HelloServer)
* [ 3. HelloServer2](examples/HelloServer2)
* [ 4. HttpBasicAuth](examples/HttpBasicAuth)
* [ 5. **MQTTClient_Auth**](examples/MQTTClient_Auth)
* [ 6. **MQTTClient_Basic**](examples/MQTTClient_Basic)
* [ 7. **MQTT_ThingStream**](examples/MQTT_ThingStream)
* [ 8. PostServer](examples/PostServer)
* [ 9. SimpleAuthentication](examples/SimpleAuthentication)
* [10. UdpNTPClient](examples/UdpNTPClient)
* [11. UdpSendReceive](examples/UdpSendReceive)
* [12. WebClient](examples/WebClient)
* [13. WebClientRepeating](examples/WebClientRepeating)
* [14. WebServer](examples/WebServer)
* [15. **ESP32_FS_EthernetWebServer**](examples/ESP32_FS_EthernetWebServer)
* [16. **serveStatic**](examples/serveStatic)
* [17. **serveStaticLoadFile**](examples/serveStaticLoadFile)
* [18. **multiFileProject**](examples/multiFileProject) **New**
* [HTTPClient Examples](#httpclient-examples)
* [ 1. Authorization](examples/HTTPClient/Authorization)
* [ 2. BasicHttpClient](examples/HTTPClient/BasicHttpClient)
* [ 3. BasicHttpsClient](examples/HTTPClient/BasicHttpsClient)
* [ 4. StreamHttpClient](examples/HTTPClient/StreamHttpClient)
* [ 5. node_test_server](examples/HTTPClient/node_test_server)
* [HTTPS and MQTTS Examples](#https-and-mqtts-examples)
* [ 1. MQTTClient_SSL](examples/SSL/MQTTClient_SSL)
* [ 2. MQTTClient_SSL_Auth](examples/SSL/MQTTClient_SSL_Auth)
* [ 3. MQTTClient_SSL_Complex](examples/SSL/MQTTClient_SSL_Complex)
* [ 4. MQTTS_ThingStream](examples/SSL/MQTTS_ThingStream)
* [ 5. WebClientMulti_SSL](examples/SSL/WebClientMulti_SSL)
* [ 6. WebClient_SSL](examples/SSL/WebClient_SSL)
* [OTA Example](#OTA-example)
* [ 1. MQTT_And_OTA_Ethernet](examples/MQTT_And_OTA_Ethernet) **New**
* [Example AdvancedWebServer](#example-advancedwebserver)
* [File AdvancedWebServer.ino](#file-advancedwebserverino)
* [Debug Terminal Output Samples](#debug-terminal-output-samples)
* [ 1. AdvancedWebServer on ESP32_DEV with ETH_PHY_LAN8720](#1-advancedwebserver-on-esp32_dev-with-eth_phy_lan8720)
* [ 2. ESP32_FS_EthernetWebServer on ESP32_DEV with ETH_PHY_LAN8720](#2-esp32_fs_ethernetwebserver-on-esp32_dev-with-eth_phy_lan8720)
* [ 3. MQTT_ThingStream on ESP32_DEV with ETH_PHY_LAN8720](#3-mqtt_thingstream-on-esp32_dev-with-eth_phy_lan8720)
* [ 4. MQTTClient_Auth on ESP32_DEV with ETH_PHY_LAN8720](#4-mqttclient_auth-on-esp32_dev-with-eth_phy_lan8720)
* [ 5. MQTTClient_Basic on ESP32_DEV with ETH_PHY_LAN8720](#5-mqttclient_basic-on-esp32_dev-with-eth_phy_lan8720)
* [ 6. WebClient on ESP32_DEV with ETH_PHY_LAN8720](#6-webclient-on-esp32_dev-with-eth_phy_lan8720)
* [ 7. UdpNTPClient on ESP32_DEV with ETH_PHY_LAN8720](#7-udpntpclient-on-esp32_dev-with-eth_phy_lan8720)
* [ 8. BasicHttpClient on ESP32_DEV with ETH_PHY_LAN8720](#8-basichttpclient-on-esp32_dev-with-eth_phy_lan8720)
* [ 9. BasicHttpsClient on ESP32_DEV with ETH_PHY_LAN8720](#9-basichttpsclient-on-esp32_dev-with-eth_phy_lan8720)
* [10. WebClientMulti_SSL on ESP32_DEV with ETH_PHY_LAN8720](#10-webclientmulti_ssl-on-esp32_dev-with-eth_phy_lan8720)
* [11. MQTTClient_SSL_Complex on ESP32_DEV with ETH_PHY_LAN8720](#11-mqttclient_ssl_complex-on-esp32_dev-with-eth_phy_lan8720)
* [12. MQTTS_ThingStream on ESP32_DEV with ETH_PHY_LAN8720](#12-mqtts_thingstream-on-esp32_dev-with-eth_phy_lan8720)
* [13. MQTTClient_SSL on ESP32_DEV with ETH_PHY_LAN8720](#13-mqttclient_ssl-on-esp32_dev-with-eth_phy_lan8720)
* [14. MQTTClient_SSL_Auth on ESP32_DEV with ETH_PHY_LAN8720](#14-mqttclient_ssl_auth-on-esp32_dev-with-eth_phy_lan8720)
* [Debug](#debug)
* [Troubleshooting](#troubleshooting)
* [Releases](#releases)
* [Issues](#issues)
* [TO DO](#to-do)
* [DONE](#done)
* [Contributions and Thanks](#contributions-and-thanks)
* [Contributing](#contributing)
* [License](#license)
* [Copyright](#copyright)
---
---
### Important Change from v1.5.0
Please have a look at [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error)
---
---
### Why do we need this [WebServer_WT32_ETH01 library](https://github.com/khoih-prog/WebServer_WT32_ETH01)
#### Important notes
ESP32 Core v2.0.0+ introduces new enum breaking almost all `WT32_ETH01` codes written for core v1.0.6-.
It's really strange to define a breaking enum `arduino_event_id_t` in [**WiFiGeneric.h**#L36-L78](https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/src/WiFiGeneric.h#L36-L78), compared to the old `system_event_id_t`, now placed in [**esp_event_legacy.h**#L29-L63](https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/esp32/include/esp_event/include/esp_event_legacy.h#L29-L63)
It's better to preserve the old enum order and just adding new items **to do no harm to pre-2.0.0 codes**
- Releases v1.2.0- to be used for ESP32 core v1.0.6- only
- Releases v1.3.0 can be used for either ESP32 core v2.0.0+ or v1.0.6-. **Default is using core v2.0.0+**
To use with core v1.0.6-, just define in your sketch
```
#define USING_CORE_ESP32_CORE_V200_PLUS false
```
- Releases v1.4.0+ can be used for either ESP32 core v2.0.0+ or v1.0.6-. **Autodetect core**
#### Features
This [**WebServer_WT32_ETH01 library**](https://github.com/khoih-prog/WebServer_WT32_ETH01) is a simple yet complete WebServer wrapper library for **ESP32-based WT32_ETH01** boards using LAN8