-
Hi, I installed EMS-ESP on a Lilygo T-Internet-COM but I cannot manage to get the LAN8720 Ethernet interface up and running. The device works fine through Wifi. As far as I understand, the only "custom" pins with the ESP32+LAN8720 are ETH Power, MDC and MDIO. Additionally the clock mode can be setup differently. On this board MDC is on GPIO23, and MDIO on GPIO18, which seems to be the standard when comparing with other boards. I configured EMS-ESP to use power on pin 4, and clock mode GPIO0_OUT. With this mode, both LED:s on the Ethernet connector turns on sometimes, at other times only the orange (but the green blinks during startup). The LEDs do not turn on at all with other clock modes configured. If I choose a different clock mode, I get some error on the serial console during boot, but there is no error with the above config. I use address 0, which is the only of 0/1 that doesn't give an error on the serial console at boot. I have tried to power the unit both from my laptop, as well as from an iPad charger to the USB-C connector on the board. Both Ethernet LEDS turn on with a cable connected at some times, at other times only the orange, however my Unifi switches do not recognize that a cable would be connected. This makes me wonder if the Ethernet module is properly powered & started, but that there is no successful communication to it from the ESP? I have tried two different switches and three different cables to isolate any issue related to them. My though with the external power supply instead of USB-cable from my laptop is to isolate any power issue, but I don't know if the USB connector is sufficient or if I should directly go for the external 5-12V one? I understand the board is not a officially supported one, but I appreciate any tips on how to get it running. Log from console during boot: EMS-ESP 3.7.0: press CTRL-D to activate this serial console ` |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi, To rule out hardware errors, I tested the board with ESPHome. With the following config for ethernet I managed to get the Ethernet connection working there: esphome: esp32: ethernet: logger: api: ota:
` |
Beta Was this translation helpful? Give feedback.
-
According to https://github.com/Xinyuan-LilyGO/T-Internet-COM/blob/main/example/Arduino/ETHDemo/config.h it should work with custom board setting and make sure you have set other ems-esp pins (rx, tx, led, button, dallas) not to same value as other pins mentioned in the config-file. Edit: if wifi is configured, eth is switched off in ems-esp to save memory, you need to clear ssid before connecting to to eth. |
Beta Was this translation helpful? Give feedback.
-
and adding to Michael's post, make sure the Button and LED is not on GPIO0 as this is the boot pin for Eth. Best just disabled it in EMS-ESP. When I was coding the Ethernet I used this small program to test it. It's very old, but maybe will give you some pointers on tracing down the root cause. |
Beta Was this translation helpful? Give feedback.
-
Hi, Thank you MichaelDvP and proddy for your replies! I managed to get the ethernet interface working. The solution was actually rather simple. I tried to disable options such as temperature sensors, led etc. As they are disabled by putting the GPIO no to 0, I had tried to do the same with the button and thus given it the value 0. This most likely created a conflict with the ethernet interface. |
Beta Was this translation helpful? Give feedback.
Hi,
Thank you MichaelDvP and proddy for your replies! I managed to get the ethernet interface working. The solution was actually rather simple. I tried to disable options such as temperature sensors, led etc. As they are disabled by putting the GPIO no to 0, I had tried to do the same with the button and thus given it the value 0. This most likely created a conflict with the ethernet interface.