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

Commit

Permalink
v1.2.0 for LwIP W6100 Ethernet
Browse files Browse the repository at this point in the history
### Releases v1.2.0

1. Add support to `ESP32/S2/S3/C3` using `LwIP W6100 Ethernet`
khoih-prog authored Jan 11, 2023
1 parent 0dc963e commit 47558b2
Showing 33 changed files with 2,010 additions and 235 deletions.
12 changes: 7 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -10,31 +10,33 @@ 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/AsyncDNSServer_ESP32_Ethernet/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 Type (e.g. ESP32S3_DEV, ESP32S2_DEV, ESP32C3_DEV)
* Board Core Version (e.g. ESP32 core v2.0.5)
* Board Type (e.g. ESP32_DEV, ESP32S3_DEV, ESP32S2_DEV, ESP32C3_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. 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.
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
ESP32S3_DEV board
ESP32 core v2.0.5
ESP32 core v2.0.6
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 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
Binary file added Images/W6100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.2.0](#releases-v120)
* [Releases v1.1.0](#releases-v110)
* [Initial Releases v1.0.0](#initial-releases-v100)

@@ -24,6 +25,10 @@

## Changelog

### Releases v1.2.0

1. Add support to `ESP32/S2/S3/C3` using `LwIP W6100 Ethernet`

### Releases v1.1.0

1. Add support to `ESP32S2/C3` boards using `LwIP W5500 or ENC28J60 Ethernet`
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncCaptivePortalAdvanced_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -23,6 +23,7 @@
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -242,12 +243,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, SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, 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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncCaptivePortal_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -15,6 +15,7 @@
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -132,12 +133,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, SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, 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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncDNSServer_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -15,6 +15,7 @@
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -131,12 +132,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, SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, 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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncDNSServerFull_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -15,6 +15,7 @@
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -130,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, SPI_HOST );
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, 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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncCaptivePortalAdvanced_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -22,6 +22,8 @@
#error This code is designed for (ESP32 + LwIP ENC28J60) to run on ESP32 platform! Please check your Tools->Board setting.
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -256,12 +258,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, ETH_SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncCaptivePortal_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -14,6 +14,8 @@
#error This code is designed for (ESP32 + LwIP ENC28J60) to run on ESP32 platform! Please check your Tools->Board setting.
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -146,12 +148,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, ETH_SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncDNSServer_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -14,6 +14,8 @@
#error This code is designed for (ESP32 + LwIP ENC28J60) to run on ESP32 platform! Please check your Tools->Board setting.
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -145,12 +147,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, ETH_SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/****************************************************************************************************************************
AsyncDNSServerFull_ESP32_ENC.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -14,6 +14,8 @@
#error This code is designed for (ESP32 + LwIP ENC28J60) to run on ESP32 platform! Please check your Tools->Board setting.
#endif

#define USING_W5500 false
#define USING_W6100 false
#define USING_ENC28J60 true

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -144,12 +146,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, ETH_SPI_HOST );
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_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);
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/****************************************************************************************************************************
AsyncCaptivePortalAdvanced_ESP32_SC_W5500.ino
For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60)
AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / W6100 / ENC28J60)
Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
@@ -23,6 +21,7 @@
#endif

#define USING_W5500 true
#define USING_W6100 false
#define USING_ENC28J60 false

#define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
@@ -257,12 +256,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 *W5500_Mac = W5500_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[index] );
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);
Loading

0 comments on commit 47558b2

Please sign in to comment.