November 23, 2024, 01:43:59 AM

ESPHome ethernet not working?

Started by sh00t2kill, October 01, 2023, 04:11:46 AM

Previous topic - Next topic

sh00t2kill

I have 2 ESP32-POEs i purchased some time ago. These work great.
I have 2 i purchased this week, but i cannot get ethernet to work. The new ones are `ESP32-POE-ND`

The documented example on esphome's website is:

```
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12
```

Im guessing the pin configuration has changed, but I cant work out exactly what it should be.

TIA!

LubOlimex

The config seems proper, I've compared it with the schematic of the board. There doesn't seem to be any changes of routing between revisions of ESP32-POE. Unless you are using ESP32-POE-WROVER (which has one pin different), there should be no differences in the config (but I think you are not using WROVER since it has no IND version).

Did you use different versions of esphome. Maybe the software introduced some bug?

Maybe test the Ethernet with other software? ESP32 package for Arduino IDE has working built-in Ethernet example.

Technical support and documentation manager at Olimex

mihaiadrian

Quote from: LubOlimex on October 02, 2023, 08:32:19 AMESP32 package for Arduino IDE has working built-in Ethernet example.

In Arduino IDE, make sure you have this 2 before header inclusion:

# mandatory defines before including headers to have cable network working on esp32 poe iso
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 12

#include <ETH.h>
#include <Ethernet.h>


and if still not working, I recommend try to compile&flash an example using expressif cmd line approach.

Regards,
Mihai

sh00t2kill

I did try to update esphome, but no change.
I then, just for good measure, reflashed one of my older ones, and it worked perfectly.


Interestingly, i loaded the inbuilt example sketch, and it worked.
Seems like an esphome bug!

LubOlimex

Yeah, I've got similar reports from ESPHome users in last few weeks. Make sure to report it to ESPHome team or in their forums, so they know there is such bug with LAN8710/LAN8720.
Technical support and documentation manager at Olimex