Page 1 of 1

ESP32 with ENC28J60 Ethernet Module

Posted: Wed Dec 20, 2017 9:53 am
by Rajkumar181
Is it possible to interface with enc28j60 module through spi.

Re: ESP32 with ENC28J60 Ethernet Module

Posted: Wed Dec 20, 2017 12:23 pm
by ESP_Sprite
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?

Re: ESP32 with ENC28J60 Ethernet Module

Posted: Mon Feb 04, 2019 6:23 pm
by angelusinferni
ESP_Sprite wrote:
Wed Dec 20, 2017 12:23 pm
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?
How would one go about setting up an internal Ethernet MAC?

Re: ESP32 with ENC28J60 Ethernet Module

Posted: Sat Feb 09, 2019 11:16 am
by ESP_Sprite
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

Posted: Sat Mar 02, 2019 11:50 am
by ironoman
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 :

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:

}

Re: ESP32 with ENC28J60 Ethernet Module

Posted: Sun Mar 03, 2019 11:24 am
by angelusinferni
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.

Re: ESP32 with ENC28J60 Ethernet Module

Posted: Thu Mar 14, 2019 5:05 pm
by khairnardm
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

Posted: Tue Apr 09, 2019 7:59 pm
by IOTrav
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 :D
Thank you.