Using the ESP with a Ethernet Port through SPI

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Pablo Oyarzo
Posts: 16
Joined: Tue Mar 14, 2017 12:55 am

Using the ESP with a Ethernet Port through SPI

Post by Pablo Oyarzo » Wed Sep 13, 2017 4:30 pm

I know there is http://www.ebay.com/itm/1xENC28J60-Ethe ... SwyXFUYaeZ this kind of module out there and it works through SPI. Based on my ignorance, I'm worried about how am I gonna tell the ESP to send the internet packets through the Ethernet port and not the wifi connection.

1) Is it possible?
2) Will I need a library for that?
3) Is said library implemented on Micropython?

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: Using the ESP with a Ethernet Port through SPI

Post by mcauser » Thu Oct 19, 2017 4:53 am

1) Yes. Ethernet and Wifi would use separate libraries.
2) Yes. The existing network module is very specific to ESP8266s Wifi firmware. You'll need something separate for Eth.
3) I am not sure about the ENC28J60 but there is a driver for the Wiznet 5x00 ethernet boards. eg. W5100, W5500

See:
viewtopic.php?t=2443
https://github.com/micropython/micropyt ... /README.md

Around $4 for a W5500
https://www.aliexpress.com/item/W5500-E ... 20397.html

Anyone that has used the MicroPython wiznet5k driver care to chime in?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Using the ESP with a Ethernet Port through SPI

Post by Roberthh » Thu Oct 19, 2017 6:35 am

The WIznet5k driver is for PyBoard, so porting it to the ES8266 could be some work. It was originally made for the W5200 device, and now extended for the W5500 device. It is pretty basic yet.

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Using the ESP with a Ethernet Port through SPI

Post by devnull » Thu Oct 19, 2017 9:24 am

Robert: This page https://github.com/micropython/micropyt ... er/drivers

Does state that they are available across all ports ???
This directory contains drivers for specific hardware. The drivers are intended to work across multiple ports.
I have ordered 10 of these (https://www.aliexpress.com/item/W5500-E ... 20397.html) based on that statement ?!

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Using the ESP with a Ethernet Port through SPI

Post by Roberthh » Thu Oct 19, 2017 10:48 am

I tested such a unit yesterday with a Pyboard, and it works well. I have serious doubts that this driver is intended to work with the ESP8266 port. The Makefile has no notice of it, and neither the network module. It may possible to fit it in, but I would be very suprised if just pulling in the files and adding a few code lines in modnetwork.c and Makefile is all you have to do.

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Using the ESP with a Ethernet Port through SPI

Post by Damien » Fri Oct 20, 2017 10:54 pm

It may actually be possible to use the Wiznet in raw Ethernet mode with the esp8266. It would at least be interesting to try and get it working. The main thing it depends on is being able to call netif_add in lwip. It depends how much the esp8266 lwip is modified from the stock version.

Sent from my GT-I9105P using Tapatalk


User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Using the ESP with a Ethernet Port through SPI

Post by devnull » Sat Oct 21, 2017 6:28 am

I ordered 10 of them from aliexpress, they were shipped yesterday, I am really hoping that this will work on the 8266 and ESP32 as I have a couple of things that need ethernet connectivity rather than wifi ?!

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Using the ESP with a Ethernet Port through SPI

Post by devnull » Tue Oct 24, 2017 9:31 am

I have received these ethernet boards, what would it take to make it work on an ESP32, would that be easier ?

gpson
Posts: 21
Joined: Sun Jul 31, 2016 6:55 am

Re: Using the ESP with a Ethernet Port through SPI

Post by gpson » Sun Jan 20, 2019 10:45 am

does anyone succeeded to run esp8266 with any ethernet module?

User avatar
ta1db
Posts: 53
Joined: Mon Sep 02, 2019 12:05 pm
Contact:

Re: Using the ESP with a Ethernet Port through SPI

Post by ta1db » Sat Dec 07, 2019 7:30 am

Hi @devnull

What did you do with the 10 W5500 ethernet boards you've got.. Could you use them with ESP8266 or ESP32? If not did you try them with PyBoard?

Post Reply