|
1 | 1 | /****************************************************************************************************************************
|
2 | 2 | AsyncCaptivePortalAdvanced_ESP32_ENC.ino
|
3 | 3 |
|
4 |
| - For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60) |
| 4 | + For ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60) |
5 | 5 |
|
6 |
| - AsyncDNSServer_ESP32_Ethernet is a Async DNS Server library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W5500 / ENC28J60) |
| 6 | + AsyncDNSServer_ESP32_Ethernet is a library for the ESP32_Ethernet (ESP32/S2/S3/C3 + LwIP W6100 / W6100 / ENC28J60) |
7 | 7 |
|
8 | 8 | Based on and modified from ESPAsyncDNSServer Library (https://github.com/devyte/ESPAsyncDNSServer)
|
9 | 9 | Built by Khoi Hoang https://github.com/khoih-prog/AsyncDNSServer_ESP32_Ethernet
|
|
22 | 22 | #error This code is designed for (ESP32 + LwIP ENC28J60) to run on ESP32 platform! Please check your Tools->Board setting.
|
23 | 23 | #endif
|
24 | 24 |
|
| 25 | +#define USING_W5500 false |
| 26 | +#define USING_W6100 false |
25 | 27 | #define USING_ENC28J60 true
|
26 | 28 |
|
27 | 29 | #define ASYNC_DNS_ESP32_ETHERNET_DEBUG_PORT Serial
|
@@ -256,12 +258,10 @@ void setup()
|
256 | 258 |
|
257 | 259 | // start the ethernet connection and the server:
|
258 | 260 | // Use DHCP dynamic IP and random mac
|
259 |
| - uint16_t index = millis() % NUMBER_OF_MAC; |
260 |
| - |
261 | 261 | //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
|
262 |
| - // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); |
263 |
| - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); |
264 |
| - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); |
| 262 | + // int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac); |
| 263 | + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); |
| 264 | + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] ); |
265 | 265 |
|
266 | 266 | // Static IP, leave without this line to get IP via DHCP
|
267 | 267 | //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
|
|
0 commit comments