ESP32 with ENC28J60 Ethernet Module

Rajkumar181
Posts: 9
Joined: Fri Dec 08, 2017 3:44 pm

ESP32 with ENC28J60 Ethernet Module

Postby Rajkumar181 » Wed Dec 20, 2017 9:53 am

Is it possible to interface with enc28j60 module through spi.

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 with ENC28J60 Ethernet Module

Postby ESP_Sprite » 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?

angelusinferni
Posts: 2
Joined: Mon Feb 04, 2019 6:21 pm

Re: ESP32 with ENC28J60 Ethernet Module

Postby angelusinferni » Mon Feb 04, 2019 6:23 pm

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?

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 with ENC28J60 Ethernet Module

Postby ESP_Sprite » Sat Feb 09, 2019 11:16 am

Basically, add an external PHY (or buy a devboard with one) and look at the Ethernet section of the ESP-IDF documentation.

ironoman
Posts: 3
Joined: Sat Dec 01, 2018 12:06 pm

Re: ESP32 with ENC28J60 Ethernet Module

Postby ironoman » Sat Mar 02, 2019 11:50 am

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:

}

angelusinferni
Posts: 2
Joined: Mon Feb 04, 2019 6:21 pm

Re: ESP32 with ENC28J60 Ethernet Module

Postby angelusinferni » Sun Mar 03, 2019 11:24 am

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.

khairnardm
Posts: 4
Joined: Fri Feb 16, 2018 5:45 am

Re: ESP32 with ENC28J60 Ethernet Module

Postby khairnardm » Thu Mar 14, 2019 5:05 pm

I have ported Arduino ENC28j60 EtherCard library to work with ESP32 you can check here https://github.com/8-DK/EtherCard.

IOTrav
Posts: 2
Joined: Tue Apr 09, 2019 7:55 pm

Re: ESP32 with ENC28J60 Ethernet Module

Postby IOTrav » Tue Apr 09, 2019 7:59 pm

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.

Who is online

Users browsing this forum: Google [Bot] and 125 guests