Page 1 of 1

Lilygo W5500 lite Ethernet not working

Posted: Wed May 05, 2021 9:57 am
by aardbei
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.

Re: Lilygo W5500 lite Ethernet not working

Posted: Thu May 06, 2021 7:31 am
by karfas
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.