ESP32 with ENC28J60 Ethernet Module
-
- Posts: 9
- Joined: Fri Dec 08, 2017 3:44 pm
ESP32 with ENC28J60 Ethernet Module
Is it possible to interface with enc28j60 module through spi.
-
- Posts: 9723
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 with ENC28J60 Ethernet Module
That should not be an issue; we have quite flexible spi_master drivers. If your question is if there's a driver for that; no sorry. Is using the internal Ethernet MAC maybe an option for you?
-
- Posts: 2
- Joined: Mon Feb 04, 2019 6:21 pm
Re: ESP32 with ENC28J60 Ethernet Module
How would one go about setting up an internal Ethernet MAC?ESP_Sprite wrote: ↑Wed Dec 20, 2017 12:23 pmThat should not be an issue; we have quite flexible spi_master drivers. If your question is if there's a driver for that; no sorry. Is using the internal Ethernet MAC maybe an option for you?
-
- Posts: 9723
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 with ENC28J60 Ethernet Module
Basically, add an external PHY (or buy a devboard with one) and look at the Ethernet section of the ESP-IDF documentation.
Re: ESP32 with ENC28J60 Ethernet Module
For Anyone looking for a way to use ENC28J60 with ESP32 , Here is How you can do it.
First get this library : https://github.com/UIPEthernet/UIPEthernet
Interface the ESP32 with ENC28J60 (connect to the default SPI pins of esp32).
and Here is the Basic code for Arduino IDE :
First get this library : https://github.com/UIPEthernet/UIPEthernet
Interface the ESP32 with ENC28J60 (connect to the default SPI pins of esp32).
and Here is the Basic code for Arduino IDE :
Code: Select all
#include <UIPEthernet.h>
#include <utility/logging.h>
EthernetClient ethClient;
uint8_t macaddress[6] = {0x1,0x2,0x3,0x4,0x5,0x6};
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Ethernet.begin(macaddress); // Dynamic IP setup
delay(5000);
Serial.print("Local IP : ");
Serial.println(Ethernet.localIP());
Serial.print("Subnet Mask : ");
Serial.println(Ethernet.subnetMask());
Serial.print("Gateway IP : ");
Serial.println(Ethernet.gatewayIP());
Serial.print("DNS Server : ");
Serial.println(Ethernet.dnsServerIP());
Serial.println("Ethernet Successfully Initialized");
}
void loop() {
// put your main code here, to run repeatedly:
}
-
- Posts: 2
- Joined: Mon Feb 04, 2019 6:21 pm
Re: ESP32 with ENC28J60 Ethernet Module
Additionally, look at the hardware configuration for the NodeMCU with ENC28J60. Exact same config for the ESP32. Configure with SPI pins as per your choice. All hardware connections are present in UIPEthernet repo itself.
-
- Posts: 4
- Joined: Fri Feb 16, 2018 5:45 am
Re: ESP32 with ENC28J60 Ethernet Module
I have ported Arduino ENC28j60 EtherCard library to work with ESP32 you can check here https://github.com/8-DK/EtherCard.
Re: ESP32 with ENC28J60 Ethernet Module
Hi all,
I am interested in using the ENC28J60 with the ESP32. I however will require lwip compatibility so I can use it with the Arduino WiFiClientSecure library. Is this possible over SPI? Could it be ported to work in the ETHClass? I cannot use the LAN8720 or TLK110 as both of those consume too many GPIOs which are already in use for our application. A nudge in the right direction here would be great
Thank you.
I am interested in using the ENC28J60 with the ESP32. I however will require lwip compatibility so I can use it with the Arduino WiFiClientSecure library. Is this possible over SPI? Could it be ported to work in the ETHClass? I cannot use the LAN8720 or TLK110 as both of those consume too many GPIOs which are already in use for our application. A nudge in the right direction here would be great
Thank you.
Who is online
Users browsing this forum: No registered users and 125 guests