feature-requests
feature-requests copied to clipboard
Add support for Davicom DM9051 SPI Ethernet Controller
Describe the problem you have/What new integration you would like Introduce support for the Davicom DM9051 SPI Ethernet Controller
Please describe your use case for this integration and alternatives you've tried: The ETH01 Evo modules are equipped with this "new" ETH chip, enabling POE usage, however device not currently supported in ESPHome.
Additional context Davicom Website - Product Page Espreff Description on how to implement
Unfortunately I am not a programmer, will be able to test, but not to make pull requests in this topic, therefore asking for implementation to this community.
Additionally: Driver source code
I bought 5 eth01-evo units on Aliexpress that mount this chip thinking they were compatible with esphome but I wasn't able to make them work, does anyone have a solution thanks
The EVO work perfectly, EXCEPT the physical ETH01 port. Unfortunately as you have seen my request this is not (yet) supported in ESPHome.
All other functionalities work fine.
I suppose you have them working by WiFi?
+1 for this requests, as the eth01-evo ist by far the cheapest solution for PoE enabled ESP32.
I have added an issue to the eth01-evo repo with full documentation and an example to get wired ethernet working. https://github.com/AI6YP/eth01-evo/issues/2
With the W5500 support added which is also based on an SPI implementation, should this be too hard to add now?
Any update? Thanks!
I purchased a bunch of these boards, just to realize that it's not supported. It would be great if this board could be added to ESPHome.
I started looking at this, with partial success. WiP code (expect lots of force-pushing and buggy commits!) is here: https://github.com/bmork/esphome/tree/dm9051
Not sure I like the current ethernet SPI solution. Will probably try to change that into using the spi bus component. Doesn't seem impossible. I had to drop the only W5500 specific part (SPI framing) anyway, since the DM9051 uses different framing. Both drivers will auto-configure the format anyway as long as it's unset, so why bother? Letting the driver DTRT looks much better than moving that knowlegde into esphome.
But first task is to make RX more stable. It's pretty unusable as-is.
EDIT: very happy to admit I was completely wrong. Reducing SPI clock to 8 MHz seems to stabilize this completely. Will move focus to cleaning up the SPI bus config and submit this.
EDIT2: reconsidering. Guess it's best to add this feature using the current scheme, and then modify the scheme later in a separate PR.
So I realized why the current code didn't use the esphome spi component: We need commit ecd1759a0ba6 ("feat(esp_eth): abstraction of SPI driver for SPI Ethernet modules") in esp-idf for that, and it was added as recently as v5.2
I did a quick hack, but it is not exactly ready to merge... It boots and sort of works. But it's easy to make it fall over with an
spi_master: spi_device_acquire_bus(1031): Cannot acquire bus when a polling transaction is in progress.
error by simply flood pinging the device. I will leave it there until we both have a use case and esp-idf v5.2 or higher is recommended. The current PR is fine.
My experimental hack is here if anyone is interested: https://github.com/bmork/esphome/tree/dm9051-spidev-experimental
Hello! I was very excited to see that you had managed to get the ETH01-EVO working but I can't... Is it because it hasn't been officially uploaded yet or something like that?
But the result is this one:
What am I doing wrong?
Thank you very much!
@Imanol82 It was not merged yet, this is the reason why it is not working. The PR was linked, but here is a direct link to the config https://github.com/esphome/esphome/pull/6861#issuecomment-2276027979
Well, I'll have to wait for it to come out officially (because that doesn't work for me). It looks like they are making a lot of progress :)
Thank you!
You are missing the external component part - which will pull the component from that PR.
Sorry. I'm a bit beginner. I don't understand what you're telling me.
Thank you very much!!!
This part :)
external_components:
- source: github://pr#6861
components:
- ethernet
Yes, now it is compiling
Thank you very much!
hahahaha now I'm not able to flash...
I win hahahaha. Online :)
Thank you very much @randybb