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

Commit

Permalink
v1.5.3 using built-in ESP32 MAC Address
Browse files Browse the repository at this point in the history
#### Releases v1.5.3

1. Using `built-in ESP32 MAC Address`
2. Increase default `SPI_CLOCK_MHZ` clock to 20MHz from 8MHz
  • Loading branch information
khoih-prog authored Jan 11, 2023
1 parent 14ed082 commit 7b3055e
Show file tree
Hide file tree
Showing 32 changed files with 288 additions and 131 deletions.
7 changes: 7 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = ,
check-filenames =
check-hidden =
skip = ./.git,./src,./examples,./Packages_Patches,./LibraryPatches
15 changes: 11 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,34 @@ However, before reporting a bug please check through the following:

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

---

### How to submit a bug report

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.19) or Platform.io version
* Board Core Version (e.g. ESP32 core v2.0.5)
* Board type (e.g. ESP32_DEV)
* Board Core Version (e.g. ESP32 core v2.0.6)
* 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:
* Operating system (Windows, Ubuntu, etc.) and the output of `uname -a`
* Network configuration


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.

---

### Example

```
Arduino IDE version: 1.8.19
WT32_ETH01 board
ESP32 core v2.0.5
ESP32_DEV board
ESP32 core v2.0.6
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.15.0-57-generic #63~20.04.1-Ubuntu SMP Wed Nov 30 13:40:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered a crash while using this library
Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,27 @@
<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


* [Changelog](#changelog)
* [Releases v1.5.3](#releases-v153)
* [Releases v1.5.1](#releases-v151)

---
---

## Changelog

#### Releases v1.5.3

1. Using `built-in ESP32 MAC Address`
2. Increase default `SPI_CLOCK_MHZ` clock to 20MHz from 8MHz

#### Releases v1.5.1

1. Initial coding to support ESP32 boards using ENC28J60 LwIP Ethernet. Sync with [WebServer_WT32_ETH01 v1.5.1](https://github.com/khoih-prog/WebServer_WT32_ETH01)
Expand Down
14 changes: 6 additions & 8 deletions examples/AdvancedWebServer/AdvancedWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -208,16 +208,14 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
ETH.config(myIP, myGW, mySN, myDNS);
//ETH.config(myIP, myGW, mySN, myDNS);

ESP32_ENC_waitForConnect();

Expand Down
12 changes: 5 additions & 7 deletions examples/HelloServer/HelloServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -131,12 +131,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
12 changes: 5 additions & 7 deletions examples/HelloServer2/HelloServer2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -131,12 +131,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
12 changes: 5 additions & 7 deletions examples/HttpBasicAuth/HttpBasicAuth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -105,12 +105,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
12 changes: 5 additions & 7 deletions examples/MQTTClient_Auth/MQTTClient_Auth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -188,12 +188,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
11 changes: 5 additions & 6 deletions examples/MQTTClient_Basic/MQTTClient_Basic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -189,11 +189,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );

// Static IP, leave without this line to get IP via DHCP
Expand Down
12 changes: 5 additions & 7 deletions examples/MQTT_ThingStream/MQTT_ThingStream.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -234,12 +234,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
12 changes: 5 additions & 7 deletions examples/PostServer/PostServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -180,12 +180,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
12 changes: 5 additions & 7 deletions examples/SimpleAuthentication/SimpleAuthentication.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -224,12 +224,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
12 changes: 5 additions & 7 deletions examples/UdpNTPClient/UdpNTPClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -142,12 +142,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

// Static IP, leave without this line to get IP via DHCP
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
Expand Down
12 changes: 5 additions & 7 deletions examples/UdpSendReceive/UdpSendReceive.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//////////////////////////////////////////////////////////

// Optional values to override default settings
//#define SPI_HOST 1
//#define SPI_CLOCK_MHZ 8
//#define ETH_SPI_HOST SPI3_HOST
//#define SPI_CLOCK_MHZ 20

// Must connect INT to GPIOxx or not working
//#define INT_GPIO 4
Expand Down Expand Up @@ -138,12 +138,10 @@ void setup()

// start the ethernet connection and the server:
// Use DHCP dynamic IP and random mac
uint16_t index = millis() % NUMBER_OF_MAC;

//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
// int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac);
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] );

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

0 comments on commit 7b3055e

Please sign in to comment.