Debug and Troubleshooting

This section provides methods for diagnosing and resolving Ethernet connection issues.

Debug Commands

You can use the following commands for debugging.
Table 1. Debug Commands
Category Command
Check Ethernet device information
  • Check adapter status:
    ifconfig eth0
  • Check data package send and receive statistics:
    cat /proc/net/dev
  • Check the current speed:
    cat /sys/class/net/eth0/speed
Enable or disable an Ethernet device
  • Enable:
    ifconfig eth0 up
  • Disable:
    ifconfig eth0 down
Configure an Ethernet device
  • Configure static IP address:
    ifconfig eth0 192.168.1.101
  • Configure MAC address:
    ifconfig eth0 hw ether 00:11:22:aa:bb:cc
  • Automatically obtain the IP address:
    udhcpc -i eth0
  • Set PHY mode: (Set the speed of 100 M, enable full duplex and auto negotiation.)
    ethtool -s eth0 speed 100 duplex full autoneg on
General test commands
  • Connection test:
    ping 192.168.1.101
  • Throughput test:
    Note: Make sure you have enabled the iperf tool in the kernel menu before performing the test.
    • TCP throughout test:

      Server side:

      iperf3 -s -i 1
      Client side:
      iperf3 -c 192.168.1.101 -i 1 -t 60 -P 4
    • UDP throughput test:

      Server side:

      iperf3 -s -u -i 1
      Client side:
      iperf3 -c 192.168.1.101 -u -b 100M -i 1 -t 60 -P 4

Troubleshoot Software Issues

The following list shows the general troubleshooting steps for software problems.
  1. Verify whether the PHY mode is configured correctly.

  2. Verify whether the clock settings are configured correctly.

  3. Verify whether the GPIO settings are configured correctly, for example, IO MUX (multiplexing) functions, drive strength, and pull-up/pull-down settings, etc.

  4. Verify whether the PHY reset settings are configured correctly.

  5. Use the following command to verify the status of sending and receiving data packets on "eth0".
    cat /proc/net/dev

Troubleshoot Hardware Issues

The following list shows the general troubleshooting steps for hardware problems.
  1. Verify whether the PHY power supply vcc-ephy is working properly.

  2. Verify whether the clock waveform looks good.