Set ethernet speed parameter on both ethernet ports for Apalis i.MX8 Yocto Linux

Hello,

We are using on Apalis i.MX8 with customize image reference to multimedia image using Yocto project.
We are trying to get and set network speed on both the ethernet ports eth0 and eth1.
We are able to get the ethernet speed using “ethtool” command.

root@apalis-imx8-07107218:~# ethtool eth0
Settings for eth0:
** Supported ports: [ TP MII ]**
** Supported link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Supported pause frame use: Symmetric**
** Supports auto-negotiation: Yes**
** Supported FEC modes: Not reported**
** Advertised link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Advertised pause frame use: Symmetric**
** Advertised auto-negotiation: Yes**
** Advertised FEC modes: Not reported**
** Link partner advertised link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Link partner advertised pause frame use: Symmetric Receive-only**
** Link partner advertised auto-negotiation: Yes**
** Link partner advertised FEC modes: Not reported**
** Speed: 100Mb/s**
** Duplex: Full**
** Port: MII**
** PHYAD: 1**
** Transceiver: internal**
** Auto-negotiation: on**
** Supports Wake-on: d**
** Wake-on: d**
** Link detected: yes**

For setting the ethernet speed we are using below command:
**ethtool -s eth0 speed 10 duplex half autoneg off**
This command is setting the speed as 10 Mbps

root@apalis-imx8-07107218:~# ethtool eth0 **
Settings for eth0:
** Supported ports: [ TP MII ]

** Supported link modes: 10baseT/Half 10baseT/Full **
** 100baseT/Half 100baseT/Full **
** Supported pause frame use: Symmetric**
** Supports auto-negotiation: Yes**
** Supported FEC modes: Not reported**
** Advertised link modes: 10baseT/Half **
** Advertised pause frame use: Symmetric**
** Advertised auto-negotiation: No**
** Advertised FEC modes: Not reported**
** Speed: 10Mb/s**
** Duplex: Half**
** Port: MII**
** PHYAD: 1**
** Transceiver: internal**
** Auto-negotiation: off**
** Supports Wake-on: d**
** Wake-on: d**
** Link detected: yes**
root@apalis-imx8-07107218:~#

But after reboot, the ethernet speed is reset to previous value (100 Mbps).
Is there any other way to set the ethernet speed permanently and retain is even after reboot using command?

Hello,
Please give us solution on this issue as soon as possible.

Hi @dipakshetye,

Please check similar post with solution. Do let us know if this is not what you are looking for.

Best Regards
Ritesh Kumar

Hello Ritesh,
Thanks for your reply.
Please let me know, Any other command to set ethernet speed instead of ethtool ?

Hi @ritesh.tx ,
We are trying to use connmanctl to set all the ethernet configurations. But we did not find any way to set the ethernet speed using connmanctl.
Is there any way to set ethernet speed using connmanctl?

Thanks,
Prathamesh Kulkarni

Hi @prathamesh.kulkarni @dipakshetye ,

I am not sure if connman can do same but you may like to test with systemd-network. For this simply stop conman and use systemd-network to configure your network.

Please do check below reference:

Best Regards
Ritesh Kumar