- Why do we need this WebServer_ESP32_SC_ENC library
- Changelog
- Prerequisites
- Installation
- Libraries' Patches
- HOWTO Fix
Multiple Definitions
Linker Error - HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)
- Usage
- How to connect ENC28J60 to ESP32_S2/S3/C3
- Examples
- Example AdvancedWebServer
- Debug Terminal Output Samples
- 1. AdvancedWebServer on ESP32S3_DEV with ESP32_S3_ENC28J60
- 2. MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
- 3. MQTTClient_Auth on ESP32S3_DEV with ESP32_S3_ENC28J60
- 4. MQTTClient_Basic on ESP32S3_DEV with ESP32_S3_ENC28J60
- 5. WebClient on ESP32S3_DEV with ESP32_S3_ENC28J60
- 6. UDPSendReceive on ESP32S3_DEV with ESP32_S3_ENC28J60
- 7. UdpNTPClient on ESP32S2_DEV with ESP32_S2_ENC28J60
- 8. UdpNTPClient on ESP32C3_DEV with ESP32_C3_ENC28J60
- Debug
- Troubleshooting
- Releases
- Issues
- TO DO
- DONE
- Contributions and Thanks
- Contributing
- License
- Copyright
Why do we need this WebServer_ESP32_SC_ENC library
This WebServer_ESP32_SC_ENC library is a simple yet complete WebServer wrapper library for ESP32_S2/S3/C3-based boards using LwIP ENC28J60 Ethernet
. The functions are similar and compatible to those of ESP32 WebServer
and ESP8266WebServer
libraries to make life much easier to port sketches from ESP8266/ESP32.
This WebServer_ESP32_SC_ENC library also provides high-level HTTP(S), MQTT(S) and WebSockets Client by using the functions from ESP32's HTTPClient Library
The library provides these features:
- TCP Server and Client
- UDP Server and Client
- HTTP(S) Server and Client
- HTTP(S) GET and POST requests, provides argument parsing, handles one client at a time.
- High-level HTTP(S) (GET, POST, PUT, PATCH, DELETE), MQTT(S) and WebSocket Client.
Library is providing similar functions to:
Please also check these sibling libraries
- WebServer_WT32_ETH01 for ESP32-based
WT32_ETH01
usingLwIP LAN8720
- WebServer_ESP32_ENC for ESP32-boards using
LwIP ENC28J60
- WebServer_ESP32_W5500 for ESP32-boards using
LwIP W5500
- WebServer_ESP32_W6100 for ESP32-boards using
LwIP W6100
- WebServer_ESP32_SC_ENC for ESP32_S3-boards using
LwIP ENC28J60
- WebServer_ESP32_SC_W5500 for ESP32_S3-boards using
LwIP W5500
- WebServer_ESP32_SC_W6100 for ESP32_S3-boards using
LwIP W6100
and more complex libraries for ESP32-based using LwIP Ethernet
- AsyncHTTPRequest_ESP32_Ethernet
- AsyncHTTPSRequest_ESP32_Ethernet
- AsyncMQTT_ESP32
- HTTPS_Server_Generic
- ESP32_ENC_Manager
- ESP32_W5500_Manager
- ESP32_Ethernet_Manager
- ESP32_SC_ENC_Manager
- ESP32_SC_W5500_Manager
- ESP32_SC_Ethernet_Manager
- AsyncESP32_ENC_Manager
- AsyncESP32_W5500_Manager
- AsyncESP32_Ethernet_Manager
- AsyncESP32_SC_ENC_Manager
- AsyncESP32_SC_W5500_Manager
- AsyncESP32_SC_Ethernet_Manager
- AsyncUDP_ESP32_ENC
- AsyncUDP_ESP32_W5500
- AsyncUDP_ESP32_W6100
- AsyncUDP_ESP32_Ethernet
- AsyncUDP_ESP32_SC_ENC
- AsyncUDP_ESP32_SC_W5500
- AsyncUDP_ESP32_SC_W6100
- AsyncUDP_ESP32_SC_Ethernet
- AsyncDNSServer_ESP32_ENC
- AsyncDNSServer_ESP32_W5500
- AsyncDNSServer_ESP32_W6100
- AsyncDNSServer_ESP32_Ethernet
This WebServer_ESP32_SC_ENC library currently supports these following boards:
- ESP32_S3 boards using
LwIP ENC28J60 Ethernet
- ESP32_S2 boards using
LwIP ENC28J60 Ethernet
- ESP32_C3 boards using
LwIP ENC28J60 Ethernet
FULL_DUPLEX, 10Mbps
Arduino IDE 1.8.19+
for Arduino.ESP32 Core 2.0.6+
for ESP32-based ESP32S2/S3/C3_DEV with ENC28J60 boards.
The best and easiest way is to use Arduino Library Manager
. Search for WebServer_ESP32_SC_ENC
, then select / install the latest version.
You can also use this link for more detailed instructions.
- Navigate to WebServer_ESP32_SC_ENC page.
- Download the latest release
WebServer_ESP32_SC_ENC-main.zip
. - Extract the zip file to
WebServer_ESP32_SC_ENC-main
directory - Copy the whole
WebServer_ESP32_SC_ENC-main
folder to Arduino libraries' directory such as~/Arduino/libraries/
.
- Install VS Code
- Install PlatformIO
- Install WebServer_ESP32_SC_ENC library by using Library Manager. Search for WebServer_ESP32_SC_ENC in Platform.io Author's Libraries
- Use included platformio.ini file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at Project Configuration File
To fix ESP32 compile error
, just copy the following file into the ESP32
cores/esp32 directory (e.g. ./arduino-1.8.19/hardware/espressif/cores/esp32) to overwrite the old file:
The current library implementation, using xyz-Impl.h
instead of standard xyz.cpp
, possibly creates certain Multiple Definitions
Linker error in certain use cases.
You can include this .hpp
file
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
#include "WebServer_ESP32_SC_ENC.hpp" //https://github.com/khoih-prog/WebServer_ESP32_SC_ENC
in many files. But be sure to use the following .h
file in just 1 .h
, .cpp
or .ino
file, which must not be included in any other file, to avoid Multiple Definitions
Linker Error
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include "WebServer_ESP32_SC_ENC.h" //https://github.com/khoih-prog/WebServer_ESP32_SC_ENC
Check the new multiFileProject example for a HOWTO
demo.
Please have a look at ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to have more detailed description and solution of the issue.
ADC1
controls ADC function for pins GPIO32-GPIO39ADC2
controls ADC function for pins GPIO0, 2, 4, 12-15, 25-27
Look in file adc_common.c
In ADC2, there're two locks used for different cases:
lock shared with app and Wi-Fi: ESP32: When Wi-Fi using the ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed. ESP32S2: The controller's control over the ADC is determined by the arbiter. There is no need to control by lock.
lock shared between tasks: when several tasks sharing the ADC2, we want to guarantee all the requests will be handled. Since conversions are short (about 31us), app returns the lock very soon, we use a spinlock to stand there waiting to do conversions one by one.
adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock.
- In order to use
ADC2
for other functions, we have to acquire complicated firmware locks and very difficult to do - So, it's not advisable to use
ADC2
with WiFi/BlueTooth (BT/BLE). - Use
ADC1
, and pins GPIO32-GPIO39 - If somehow it's a must to use those pins serviced by
ADC2
(GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27), use the fix mentioned at the end of ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to work with ESP32 WiFi/BlueTooth (BT/BLE).
WebServer server(80);
Creates the WebServer_ESP32_SC_ENC
class object.
Parameters:
host port number: int port
(default is the standard HTTP port 80)
void begin();
void handleClient();
void close();
void stop();
Both methods function the same
void on();
void addHandler();
void onNotFound();
void onFileUpload();
Example:
server.on("/", handlerFunction);
server.onNotFound(handlerFunction); // called when handler is not assigned
server.onFileUpload(handlerFunction); // handle file uploads
void send();
void send_P();
Parameters:
code
- HTTP response code, can be 200
or 404
, etc.
content_type
- HTTP content type, like "text/plain"
or "image/png"
, etc.
content
- actual content body
const String & arg();
const String & argName();
int args();
bool hasArg();
Function usage:
arg
- get request argument value, use arg("plain")
to get POST body
argName
- get request argument name
args
- get arguments count
hasArg
- check if argument exist
const String & header();
const String & headerName();
const String & hostHeader();
int headers();
bool hasHeader();
Function usage:
header
- get request header value
headerName
- get request header name
hostHeader
- get request host header if available, else empty string
headers
- get header count
hasHeader
- check if header exist
bool authenticate();
void requestAuthentication();
Function usage:
authenticate
- server authentication, returns true if client is authenticated else false
requestAuthentication
- sends authentication failure response to the client
Example Usage:
if(!server.authenticate(username, password))
{
server.requestAuthentication();
}
const String & uri(); // get the current uri
HTTPMethod method(); // get the current method
WiFiClient client(); // get the current client
HTTPUpload & upload(); // get the current upload
void setContentLength(); // set content length
void sendHeader(); // send HTTP header
void sendContent(); // send content
void sendContent_P();
void collectHeaders(); // set the request headers to collect
void serveStatic();
size_t streamFile();
You can change the INT
pin to another one. Default is GPIO4
// Must connect INT to GPIOxx or not working
#define INT_GPIO 4
FULL_DUPLEX, 10Mbps
ENC28J60 | <---> | ESP32_S3 |
---|---|---|
MOSI | <---> | GPIO11 |
MISO | <---> | GPIO13 |
SCK | <---> | GPIO12 |
CS/SS | <---> | GPIO10 |
INT | <---> | GPIO4 |
GND | <---> | GND |
3.3V | <---> | 3.3V |
ENC28J60 | <---> | ESP32_S2 |
---|---|---|
MOSI | <---> | GPIO35 |
MISO | <---> | GPIO37 |
SCK | <---> | GPIO36 |
CS/SS | <---> | GPIO34 |
INT | <---> | GPIO4 |
RST | <---> | RST |
GND | <---> | GND |
3.3V | <---> | 3.3V |
ENC28J60 | <---> | ESP32_C3 |
---|---|---|
MOSI | <---> | GPIO6 |
MISO | <---> | GPIO5 |
SCK | <---> | GPIO4 |
CS/SS | <---> | GPIO7 |
INT | <---> | GPIO10 |
RST | <---> | RST |
GND | <---> | GND |
3.3V | <---> | 3.3V |
- AdvancedWebServer
- HelloServer
- HelloServer2
- HttpBasicAuth
- MQTTClient_Auth
- MQTTClient_Basic
- MQTT_ThingStream
- PostServer
- SimpleAuthentication
- UdpNTPClient
- UdpSendReceive
- WebClient
- WebClientRepeating
- WebServer
- multiFileProject
Example AdvancedWebServer
WebServer_ESP32_SC_ENC/examples/AdvancedWebServer/AdvancedWebServer.ino
Lines 41 to 290 in 4e82f38
The following are debug terminal output and screen shot when running example AdvancedWebServer on ESP32S3_DEV
with ESP32_S3_ENC28J60
. The user-defined MAC address
is automatically used now because there is no built-in MAC address
in ESP32_S3
Start AdvancedWebServer on ESP32S3_DEV with ESP32_S3_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 11
[EWS] MISO: 13
[EWS] SCK: 12
[EWS] CS: 10
[EWS] INT: 4
[EWS] SPI Clock (MHz): 20
[EWS] =========================
ETH Started
ETH Connected
ETH MAC: DE:AD:BE:EF:FE:11, IPv4: 192.168.2.101
FULL_DUPLEX, 10Mbps
HTTP EthernetWebServer is @ IP : 192.168.2.101
The terminal output of ESP32S3_DEV with ENC28J60 running MQTT_ThingStream example. The user-defined MAC address
is automatically used now because there is no built-in MAC address
in ESP32_S3
Start MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 11
[EWS] MISO: 13
[EWS] SCK: 12
[EWS] CS: 10
[EWS] INT: 4
[EWS] SPI Clock (MHz): 20
[EWS] =========================
ETH Started
ETH Connected
ETH MAC: DE:AD:BE:EF:FE:11, IPv4: 192.168.2.101
FULL_DUPLEX, 10Mbps
***************************************
ESP32_Pub
***************************************
Attempting MQTT connection to broker.emqx.io
...connected
Published connection message successfully!
Subscribed to: ESP32_Sub
MQTT Message Send : ESP32_Pub => Hello from MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
MQTT Message receive [ESP32_Pub] Hello from MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
MQTT Message Send : ESP32_Pub => Hello from MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
MQTT Message receive [ESP32_Pub] Hello from MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
MQTT Message Send : ESP32_Pub => Hello from MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
MQTT Message receive [ESP32_Pub] Hello from MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_ENC28J60
The terminal output of ESP32S3_DEV with ENC28J60 running MQTTClient_Auth example. The user-defined MAC address
is automatically used now because there is no built-in MAC address
in ESP32_S3
Start MQTTClient_Auth on ESP32S3_DEV with ESP32_S3_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 11
[EWS] MISO: 13
[EWS] SCK: 12
[EWS] CS: 10
[EWS] INT: 4
[EWS] SPI Clock (MHz): 20
[EWS] =========================
ETH Started
ETH Connected
ETH MAC: DE:AD:BE:EF:BE:0E, IPv4: 192.168.2.106
FULL_DUPLEX, 10Mbps
Message Send : MQTT_Pub => Hello from MQTTClient_Auth on ESP32S3_DEV with ESP32_S3_ENC28J60
Message arrived [MQTT_Pub] Hello from MQTTClient_Auth on ESP32S3_DEV with ESP32_S3_ENC28J60
Message Send : MQTT_Pub => Hello from MQTTClient_Auth on ESP32S3_DEV with ESP32_S3_ENC28J60
Message arrived [MQTT_Pub] Hello from MQTTClient_Auth on ESP32S3_DEV with ESP32_S3_ENC28J60
The terminal output of ESP32S3_DEV with ENC28J60 running MQTTClient_Basic example. The user-defined MAC address
is automatically used now because there is no built-in MAC address
in ESP32_S3
Start MQTTClient_Basic on ESP32S3_DEV with ESP32_S3_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 11
[EWS] MISO: 13
[EWS] SCK: 12
[EWS] CS: 10
[EWS] INT: 4
[EWS] SPI Clock (MHz): 20
[EWS] =========================
ETH Started
ETH Connected
ETH MAC: DE:AD:BE:EF:BE:0E, IPv4: 192.168.2.106
FULL_DUPLEX, 10Mbps
Message Send : MQTT_Pub => Hello from MQTTClient_Basic on ESP32S3_DEV with ESP32_S3_ENC28J60
Message arrived [MQTT_Pub] Hello from MQTTClient_Basic on ESP32S3_DEV with ESP32_S3_ENC28J60
Message Send : MQTT_Pub => Hello from MQTTClient_Basic on ESP32S3_DEV with ESP32_S3_ENC28J60
Message arrived [MQTT_Pub] Hello from MQTTClient_Basic on ESP32S3_DEV with ESP32_S3_ENC28J60
The terminal output of ESP32S3_DEV with ENC28J60 running WebClient example. The user-defined MAC address
is automatically used now because there is no built-in MAC address
in ESP32_S3
Start WebClient on ESP32S3_DEV with ESP32_S3_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 11
[EWS] MISO: 13
[EWS] SCK: 12
[EWS] CS: 10
[EWS] INT: 4
[EWS] SPI Clock (MHz): 20
[EWS] =========================
ETH Started
ETH Connected
ETH MAC: DE:AD:BE:EF:BE:0A, IPv4: 192.168.2.98
FULL_DUPLEX, 10Mbps
Starting connection to server...
Connected to server
HTTP/1.1 200 OK
Date: Wed, 11 Jan 2023 23:19:00 GMT
Content-Type: text/plain
Content-Length: 2263
Connection: close
x-amz-id-2: I1XSxb8SrBbQvFZiDm6s+3yCJDQ/kr8viynhpV/gMhEc444Vesm23XUdidJIuVKxLKvyEevxZ40=
x-amz-request-id: 8TV8DXN77NW79TND
Last-Modified: Wed, 23 Feb 2022 14:56:42 GMT
ETag: "667cf48afcc12c38c8c1637947a04224"
CF-Cache-Status: DYNAMIC
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=E5WKZrRe9b85co%2BkMLkh7ffnNJ3p4%2BWsN%2BwjN6GQFwshsImPjF1CUUDDDB7aDvMmWXpdWdPqNcz104aCGcSpcSgZIRkOwJuGE5hGN3ZLxa3JtJecrpo%2FUGwZPebWKB8%3D"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 77947b6a7a8954a9-YYZ
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
`:;;;,` .:;;:.
.;;;;;;;;;;;` :;;;;;;;;;;: TM
`;;;;;;;;;;;;;;;` :;;;;;;;;;;;;;;;
:;;;;;;;;;;;;;;;;;; `;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;; .;;;;;;;;;;;;;;;;;;;;
;;;;;;;;:` `;;;;;;;;; ,;;;;;;;;.` .;;;;;;;;
.;;;;;;, :;;;;;;; .;;;;;;; ;;;;;;;
;;;;;; ;;;;;;; ;;;;;;, ;;;;;;.
,;;;;; ;;;;;;.;;;;;;` ;;;;;;
;;;;;. ;;;;;;;;;;;` ``` ;;;;;`
;;;;; ;;;;;;;;;, ;;; .;;;;;
`;;;;: `;;;;;;;; ;;; ;;;;;
,;;;;` `,,,,,,,, ;;;;;;; .,,;;;,,, ;;;;;
:;;;;` .;;;;;;;; ;;;;;, :;;;;;;;; ;;;;;
:;;;;` .;;;;;;;; `;;;;;; :;;;;;;;; ;;;;;
.;;;;. ;;;;;;;. ;;; ;;;;;
;;;;; ;;;;;;;;; ;;; ;;;;;
;;;;; .;;;;;;;;;; ;;; ;;;;;,
;;;;;; `;;;;;;;;;;;; ;;;;;
`;;;;;, .;;;;;; ;;;;;;; ;;;;;;
;;;;;;: :;;;;;;. ;;;;;;; ;;;;;;
;;;;;;;` .;;;;;;;, ;;;;;;;; ;;;;;;;:
;;;;;;;;;:,:;;;;;;;;;: ;;;;;;;;;;:,;;;;;;;;;;
`;;;;;;;;;;;;;;;;;;;. ;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;; :;;;;;;;;;;;;;;;;:
,;;;;;;;;;;;;;, ;;;;;;;;;;;;;;
.;;;;;;;;;` ,;;;;;;;;:
;;; ;;;;;` ;;;;: .;; ;; ,;;;;;, ;;. `;, ;;;;
;;; ;;:;;; ;;;;;; .;; ;; ,;;;;;: ;;; `;, ;;;:;;
,;:; ;; ;; ;; ;; .;; ;; ,;, ;;;,`;, ;; ;;
;; ;: ;; ;; ;; ;; .;; ;; ,;, ;;;;`;, ;; ;;.
;: ;; ;;;;;: ;; ;; .;; ;; ,;, ;;`;;;, ;; ;;`
,;;;;; ;;`;; ;; ;; .;; ;; ,;, ;; ;;;, ;; ;;
;; ,;, ;; .;; ;;;;;: ;;;;;: ,;;;;;: ;; ;;, ;;;;;;
;; ;; ;; ;;` ;;;;. `;;;: ,;;;;;, ;; ;;, ;;;;
Disconnecting from server...
The terminal output of ESP32S3_DEV with ENC28J60 running UdpSendReceive example. The user-defined MAC address
is automatically used now because there is no built-in MAC address
in ESP32_S3
Start UDPSendReceive on ESP32S3_DEV with ESP32_S3_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 11
[EWS] MISO: 13
[EWS] SCK: 12
[EWS] CS: 10
[EWS] INT: 4
[EWS] SPI Clock (MHz): 20
[EWS] =========================
ETH Started
ETH Connected
ETH MAC: DE:AD:BE:EF:BE:0C, IPv4: 192.168.2.112
FULL_DUPLEX, 10Mbps
Starting connection to server...
Listening on port 2390
UDP Packet received, size 48
From 132.163.97.6, port 123
Seconds since Jan 1 1900 = 3880554037
Unix time = 1671565237
The UTC time is 19:40:37
UDP Packet received, size 48
From 132.163.97.6, port 123
Seconds since Jan 1 1900 = 3880554062
Unix time = 1671565262
The UTC time is 19:41:02
The terminal output of ESP32S2_DEV with ENC28J60 running UdpNTPClient example. The built-in MAC address
is used now instead of user-defined one.
Start UdpNTPClient on ESP32S2_DEV with ESP32_S2_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 35
[EWS] MISO: 37
[EWS] SCK: 36
[EWS] CS: 34
[EWS] INT: 4
[EWS] SPI Clock (MHz): 20
[EWS] =========================
Using built-in mac_eth = 7E:DF:A1:08:64:27
ETH Started
ETH Connected
ETH MAC: 7E:DF:A1:08:64:27, IPv4: 192.168.2.85
FULL_DUPLEX, 10Mbps
UDP Packet received, size 48
From 132.163.97.2, port 123
Seconds since Jan 1 1900 = 3880554146
Unix time = 1671565346
The UTC time is 19:42:26
UDP Packet received, size 48
From 132.163.97.2, port 123
Seconds since Jan 1 1900 = 3880554170
Unix time = 1671565370
The UTC time is 19:42:50
The terminal output of ESP32C3_DEV with ENC28J60 running UdpNTPClient example. The built-in MAC address
is used now instead of user-defined one.
Start UdpNTPClient on ESP32C3_DEV with ESP32_C3_ENC28J60
WebServer_ESP32_SC_ENC v1.2.1 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 1
[EWS] MOSI: 6
[EWS] MISO: 5
[EWS] SCK: 4
[EWS] CS: 7
[EWS] INT: 10
[EWS] SPI Clock (MHz): 20
[EWS] =========================
Using built-in mac_eth = 7C:DF:A1:DA:68:BF
ETH Started
ETH Connected
ETH MAC: 7C:DF:A1:DA:68:BF, IPv4: 192.168.2.82
FULL_DUPLEX, 10Mbps
UDP Packet received, size 48
From 132.163.96.3, port 123
Seconds since Jan 1 1900 = 3882472048
Unix time = 1673483248
The UTC time is 0:27:28
Debug is enabled by default on Serial. Debug Level from 0 to 4. To disable, change the ETHERNET_WEBSERVER_LOGLEVEL to 0
// Use this to output debug msgs to Serial
#define DEBUG_ETHERNET_WEBSERVER_PORT Serial
// Use this to disable all output debug msgs
// Debug Level from 0 to 4
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 0
If you get compilation errors, more often than not, you may need to install a newer version of the board's core, applying Libraries' Patches, Packages' Patches or this library latest version.
Submit issues to: WebServer_ESP32_SC_ENC issues
- Bug Searching and Killing
- Add support to ESP32S3-based boards using
LwIP ENC28J60 Ethernet
- Add support to ESP32S2-based boards using
LwIP ENC28J60 Ethernet
- Add support to ESP32C3-based boards using
LwIP ENC28J60 Ethernet
- Increase default
SPI_CLOCK_MHZ
clock to 20MHz from 8MHz - Update examples to use
DHCP
withbuilt-in ESP32 Ethernet MAC Address
Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.
- Based on the Ivan Grokhotkov's ESP32 WebServer and HTTPClient Library libraries
- Thanks to avanderhoest for reporting Supporting ESP32_S3 using W5500 Ethernet #72 leading to the creation of this library
⭐️ Ivan Grokhotkov |
avanderhoest |
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell other people about this library
- The library is licensed under GPLv3
-
Copyright (c) 2016- Ivan Grokhotkov
-
Copyright (c) 2022- Khoi Hoang