Skip to content

Support setting the Link Speed for Ethernet #10923

Closed
@Ing-Dom

Description

@Ing-Dom

Related area

(Wired) Ethernet driver

Hardware specification

especially for LAN8720, but relevant for all PHYs with the capability of setting the LINK speed by software

Is your feature request related to a problem?

While a lot of drivers for the LAN8720 PHY support setting the link speed manually, it is not possible within arduino-esp32.
It IS indeed possible when you are using plain IDF, but the Arduino Ethernet driver (ETH.h) hides that from the user.
One could argue why this is neccessary - in 10Base-T Ethernet, which is often sufficient for embedded devices like the ESP32, the PHY needs much less power (50mA @3,3V). While you can set you PHY to 10MBIT in general by using the boot strap pins on the phy, this can cause serious issues with newer switches that do not support 10Base-T anymore.
So the option should be in software.

Describe the solution you'd like

I would like to have an interface in the ethernet driver to be usable like

ETH.setLinkSpeed(eth_speed_t ::ETH_SPEED_MAX);
ETH.setLinkSpeed(eth_speed_t ::ETH_SPEED_10M);
ETH.setLinkSpeed(eth_speed_t ::ETH_SPEED_100M);

and also a ETH.getLinkSpeed();

Describe alternatives you've considered

I tried to bypass the Ethernetdriver like this:

eth_speed_t speed = ETH_SPEED_10M;
esp_eth_ioctl(ETH.handle(), ETH_CMD_S_SPEED, &speed);

but his does not work.
It is not possible when you do it before ETH.begin(), and als not afterwards.
It has to be done somewhere in the middle of ETH.begin()..

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

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