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

Commit c8bccad

Browse files
authored
v1.5.3 to use built-in ESP32 MAC
#### Releases v1.5.3 1. Using `SPI_DMA_CH_AUTO` and built-in ESP32 MAC 2. Improve library and examples code
1 parent d55c8a0 commit c8bccad

31 files changed

+172
-97
lines changed

.codespellrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4+
ignore-words-list = ,
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git,./src,./examples,./Packages_Patches,./LibraryPatches

CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ However, before reporting a bug please check through the following:
1010

1111
If you don't find anything, please [open a new issue](https://github.com/khoih-prog/WebServer_ESP32_W5500/issues/new).
1212

13+
---
14+
1315
### How to submit a bug report
1416

1517
Please ensure to specify the following:
@@ -26,6 +28,8 @@ Please ensure to specify the following:
2628

2729
Please be educated, civilized and constructive as you've always been. Disrespective posts against [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-event-code-of-conduct) will be ignored and deleted.
2830

31+
---
32+
2933
### Example
3034

3135
```

changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717

1818
* [Changelog](#changelog)
19+
* [Releases v1.5.3](#releases-v153)
1920
* [Releases v1.5.2](#releases-v152)
2021
* [Releases v1.5.1](#releases-v151)
2122

@@ -24,6 +25,11 @@
2425

2526
## Changelog
2627

28+
#### Releases v1.5.3
29+
30+
1. Using `SPI_DMA_CH_AUTO` and built-in ESP32 MAC
31+
2. Improve library and examples code
32+
2733
#### Releases v1.5.2
2834

2935
1. Suppress compile error when using aggressive compile settings

examples/AdvancedWebServer/AdvancedWebServer.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,10 @@ void setup()
210210

211211
// start the ethernet connection and the server:
212212
// Use DHCP dynamic IP and random mac
213-
uint16_t index = millis() % NUMBER_OF_MAC;
214-
215213
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
216-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
217-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
218-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
214+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
215+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
216+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
219217

220218
// Static IP, leave without this line to get IP via DHCP
221219
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/HelloServer/HelloServer.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,10 @@ void setup()
133133

134134
// start the ethernet connection and the server:
135135
// Use DHCP dynamic IP and random mac
136-
uint16_t index = millis() % NUMBER_OF_MAC;
137-
138136
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
139-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
140-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
141-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
137+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
138+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
139+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
142140

143141
// Static IP, leave without this line to get IP via DHCP
144142
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/HelloServer2/HelloServer2.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,10 @@ void setup()
133133

134134
// start the ethernet connection and the server:
135135
// Use DHCP dynamic IP and random mac
136-
uint16_t index = millis() % NUMBER_OF_MAC;
137-
138136
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
139-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
140-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
141-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
137+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
138+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
139+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
142140

143141
// Static IP, leave without this line to get IP via DHCP
144142
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/HttpBasicAuth/HttpBasicAuth.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,10 @@ void setup()
107107

108108
// start the ethernet connection and the server:
109109
// Use DHCP dynamic IP and random mac
110-
uint16_t index = millis() % NUMBER_OF_MAC;
111-
112110
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
113-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
114-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
115-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
111+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
112+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
113+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
116114

117115
// Static IP, leave without this line to get IP via DHCP
118116
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/MQTTClient_Auth/MQTTClient_Auth.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,10 @@ void setup()
190190

191191
// start the ethernet connection and the server:
192192
// Use DHCP dynamic IP and random mac
193-
uint16_t index = millis() % NUMBER_OF_MAC;
194-
195193
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
196-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
197-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
198-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
194+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
195+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
196+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
199197

200198
// Static IP, leave without this line to get IP via DHCP
201199
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/MQTTClient_Basic/MQTTClient_Basic.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,10 @@ void setup()
191191

192192
// start the ethernet connection and the server:
193193
// Use DHCP dynamic IP and random mac
194-
uint16_t index = millis() % NUMBER_OF_MAC;
195-
196194
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
197-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
198-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
199-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
195+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
196+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
197+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
200198

201199
// Static IP, leave without this line to get IP via DHCP
202200
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/MQTT_ThingStream/MQTT_ThingStream.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,10 @@ void setup()
236236

237237
// start the ethernet connection and the server:
238238
// Use DHCP dynamic IP and random mac
239-
uint16_t index = millis() % NUMBER_OF_MAC;
240-
241239
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
242-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
243-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
244-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
240+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
241+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
242+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
245243

246244
// Static IP, leave without this line to get IP via DHCP
247245
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/PostServer/PostServer.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,10 @@ void setup()
182182

183183
// start the ethernet connection and the server:
184184
// Use DHCP dynamic IP and random mac
185-
uint16_t index = millis() % NUMBER_OF_MAC;
186-
187185
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
188-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
189-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
190-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
186+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
187+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
188+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
191189

192190
// Static IP, leave without this line to get IP via DHCP
193191
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/SimpleAuthentication/SimpleAuthentication.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,10 @@ void setup()
226226

227227
// start the ethernet connection and the server:
228228
// Use DHCP dynamic IP and random mac
229-
uint16_t index = millis() % NUMBER_OF_MAC;
230-
231229
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
232-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
233-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
234-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
230+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
231+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
232+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
235233

236234
// Static IP, leave without this line to get IP via DHCP
237235
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/UdpNTPClient/UdpNTPClient.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,10 @@ void setup()
145145

146146
// start the ethernet connection and the server:
147147
// Use DHCP dynamic IP and random mac
148-
uint16_t index = millis() % NUMBER_OF_MAC;
149-
150148
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
151-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
152-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
153-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
149+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
150+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
151+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
154152

155153
// Static IP, leave without this line to get IP via DHCP
156154
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/UdpSendReceive/UdpSendReceive.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,10 @@ void setup()
141141

142142
// start the ethernet connection and the server:
143143
// Use DHCP dynamic IP and random mac
144-
uint16_t index = millis() % NUMBER_OF_MAC;
145-
146144
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
147-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
148-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
149-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
145+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
146+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
147+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
150148

151149
// Static IP, leave without this line to get IP via DHCP
152150
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/WebClient/WebClient.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,10 @@ void setup()
107107

108108
// start the ethernet connection and the server:
109109
// Use DHCP dynamic IP and random mac
110-
uint16_t index = millis() % NUMBER_OF_MAC;
111-
112110
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
113-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
114-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
115-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
111+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
112+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
113+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
116114

117115
// Static IP, leave without this line to get IP via DHCP
118116
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/WebClientRepeating/WebClientRepeating.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,10 @@ void setup()
145145

146146
// start the ethernet connection and the server:
147147
// Use DHCP dynamic IP and random mac
148-
uint16_t index = millis() % NUMBER_OF_MAC;
149-
150148
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
151-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
152-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
153-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
149+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
150+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
151+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
154152

155153
// Static IP, leave without this line to get IP via DHCP
156154
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/WebServer/WebServer.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,10 @@ void setup()
106106

107107
// start the ethernet connection and the server:
108108
// Use DHCP dynamic IP and random mac
109-
uint16_t index = millis() % NUMBER_OF_MAC;
110-
111109
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
112-
// int SPI_HOST, uint8_t *W5500_Mac = W5500_Default_Mac);
113-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
114-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
110+
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
111+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
112+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
115113

116114
// Static IP, leave without this line to get IP via DHCP
117115
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "WebServer_ESP32_W5500",
3-
"version": "1.5.2",
3+
"version": "1.5.3",
44
"keywords": "WebServer, Ethernet, MQTT, MQTTS, HTTP, HTTPS, SSL, Arduino, ESP32, W5500, HTTP-Client, WebSocket-Client, MQTT-Client, server, client, websocket, LittleFS, SPIFFS, ThingStream",
55
"description": "Simple Ethernet WebServer, HTTP/HTTPS Client wrapper library for ESP32 boards using W5500 with LwIP Ethernet library. The WebServer supports HTTP(S) GET and POST requests, provides argument parsing, handles one client at a time. It provides HTTP(S), MQTT(S) Client and supports WebServer serving from LittleFS/SPIFFS",
66
"authors":

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=WebServer_ESP32_W5500
2-
version=1.5.2
2+
version=1.5.3
33
author=Khoi Hoang
44
license=GPLv3
55
maintainer=Khoi Hoang <[email protected]>

platformio/platformio.ini

+14-2
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,24 @@ upload_speed = 921600
2929
;monitor_speed = 9600
3030
;monitor_port = COM11
3131

32+
; ============================================================
3233
; Checks for the compatibility with frameworks and dev/platforms
3334
lib_compat_mode = strict
3435
lib_ldf_mode = chain+
3536
;lib_ldf_mode = deep+
3637

38+
; ============================================================
3739
lib_deps =
3840

41+
; ============================================================
3942
build_flags =
4043
; set your debug output (default=Serial)
4144
-D DEBUG_ESP_PORT=Serial
4245
; comment the following line to enable WiFi debugging
4346
-D NDEBUG
4447

48+
; ============================================================
49+
; ============================================================
4550
[env:ESP32]
4651
platform = espressif32
4752
framework = arduino
@@ -84,6 +89,8 @@ board = esp32doit-devkit-v1
8489
;board = iotbusproteus
8590
;board = nina_w10
8691

92+
; ============================================================
93+
; ============================================================
8794
[env:esp32s2]
8895
platform = espressif32
8996
framework = arduino
@@ -112,7 +119,8 @@ build_flags =
112119
-DARDUINO_ESP32S2_DEV
113120
-DARDUINO_VARIANT="esp32s2"
114121

115-
122+
; ============================================================
123+
; ============================================================
116124
[env:esp32s3]
117125
platform = espressif32
118126
framework = arduino
@@ -131,7 +139,8 @@ build_flags =
131139
-DARDUINO_ESP32S3_DEV
132140
-DARDUINO_VARIANT="esp32s3"
133141

134-
142+
; ============================================================
143+
; ============================================================
135144
[env:esp32sc3]
136145
platform = espressif32
137146
framework = arduino
@@ -149,3 +158,6 @@ build_unflags =
149158
build_flags =
150159
-DARDUINO_ESP32S3_DEV
151160
-DARDUINO_VARIANT="esp32c3"
161+
162+
; ============================================================
163+
; ============================================================

0 commit comments

Comments
 (0)