Lilygo W5500 lite Ethernet not working

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
aardbei
Posts: 3
Joined: Sun Dec 29, 2019 5:07 pm

Lilygo W5500 lite Ethernet not working

Post by aardbei » Wed May 05, 2021 9:57 am

Hi,

i bought a LilyGo W5500 lite dev. board. This is a small ESP32 board with a tiny OLED display (SSD1306)
Additional it has the option to connect a W5500 Ethernet module.

Link: https://github.com/Xinyuan-LilyGO/LilyGo-W5500-Lite.

The problem i have is that i cannot get Ethernet working. According the website i should use the following pin layout:

ETH_RST 4
ETH_CS 5
ETH_SCLK 18
ETH_MISO 23
ETH_MOSI 19
OLED_SCL 22
OLED_SDA 21

I flashed the esp32-idf3-20210202-v1.14.bin firmware to the ESP32 and tried activating the LAN with:
lan = network.LAN(mdc = machine.Pin(23), mdio = machine.Pin(19), phy_type = network.PHY_LAN8720, phy_addr=0)
lan.active(1)

Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: ethernet enable failed


Any ideas how to get this Ethernet module working?

Regards,
Hannes.

karfas
Posts: 31
Joined: Sat Jan 16, 2021 12:53 pm

Re: Lilygo W5500 lite Ethernet not working

Post by karfas » Thu May 06, 2021 7:31 am

I have no idea about the module or the network driver you use, but I think you need to do something with the ETH_RST, ETH_CS and ETH_SCLK pins.
At least the SPI connection will need a clock besides MISO and MOSI.

In the examples found in the repository you linked to, they also do

Code: Select all

    SPI.begin(ETH_SCLK, ETH_MISO, ETH_MOSI);

    ethernetReset(ETH_RST);
    Ethernet.init(ETH_CS);
I don't know whether the LAN7820 driver does something in this regard (you can look this up in the source, even if it's not documented somewhere), but if it does, you will need to supply the correct pins.
My repositories: https://github.com/karfas

Post Reply