8000 ethernet component is missing options to manually configure link speed · Issue #5100 · esphome/issues · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ethernet component is missing options to manually configure link speed #5100
Open
esphome/esphome
#8995
@nekromant

Description

@nekromant

The problem

On some boards with IP101GRI PHY 100Mbit mode doesn't work reliably. However 10mbit is fully functional and seems way more stable. Unfortunately, very few routers/network cards downshift link speed to 10mbit during autonegotiation and it takes a long while for them to do so.

There's a suggestion to add a few more options to the ethernet component, namely:

link_speed: 10 # "10", "100", "auto"
link_duplex: full # "full" or "half"

Adding these should be very straightforward: Just adding a few lines to ethernet_component.cpp near line 127, just before calling esp_eth_start():

 esp_eth_ioctl(eth_handle, ETH_CMD_S_AUTONEGO, &autonego);
 esp_eth_ioctl(eth_handle, ETH_CMD_S_SPEED, ...);
 esp_eth_ioctl(eth_handle, ETH_CMD_S_DUPLEX_MODE ...);

There's a small issue though. It seems that the underlying version of esp-idf in esphome at the time of writing this issue doesn't support these ioctls yet, although they are listed in the documentation. Perhaps that would be due to be implemented once the esp-idf is updated (?).

Which version of ESPHome has the issue?

2023.12.0.dev0

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

homebrew board with screwed signal integrity.

Component causing the issue

ethernet

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0