This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6422: CPSW SWITCH IP

Part Number: AM6422

Tool/software:

Hello,

    Using the AM6422 on SDK 8.6, the CPSW Ethernet was set to switch mode via power-on self-start. However, at this point, it has no IP address. An IP address needs to be manually assigned using ifconfig eth0 192.168.x.x for it to take effect, but this configuration is lost after disconnecting the Ethernet cable and needs to be reconfigured. Attempting to set a static IP address by creating the 01-eth0-static.network file results in the IP address being present after power-on and persisting even after unplugging the cable. However, at this point, SSH connection software using eth0 fails to connect.

When manually entering commands, if we first set the host IP and then separately configure the IP addresses for the eth0 and eth1 ports, we can successfully connect via SSH client software. We suspect this is due to the sequence of IP address configuration. What could be the reason for this behavior?

  • Hello,

    AM6422 on SDK 8.6, the CPSW Ethernet was set to switch mode via power-on self-start.

    Is there a particular reason for using SDK 8.6 as opposed to the latest SDK? 

    Are you testing on a custom board or a TI AM64x EVM?

    How is the CPSW being configured to switch mode using power-on self-start? Do you mean your AM6422 board boots with CPSW already configured in switch mode? 

    An IP address needs to be manually assigned using ifconfig eth0 192.168.x.x for it to take effect, but this configuration is lost after disconnecting the Ethernet cable and needs to be reconfigured.

    Please try using "ip addr add 192.168.x.x/16 dev eth0" instead of ifconfig. ifconfig is more outdated than ip. I know that at least on the latest SDKs on an AM64x TI EVM, using ip to set a static IP address should not result in the IP address being lost after cable disconnection. To my knowledge, the IP address will only be lost if the EVM is power cycled/rebooted or if manually removed with "ip addr del 192.168.x.x/16 dev eth0".

    Attempting to set a static IP address by creating the 01-eth0-static.network file results in the IP address being present after power-on and persisting even after unplugging the cable. However, at this point, SSH connection software using eth0 fails to connect.

    With this method of setting an IP address, please try to check if you can ping eth0 before trying to connect with SSH, just to double check if communication is able to be established.

    -Daolin

  • Hello

        Since we initially used SDK version 8.6 during development, and upgrading to the new version would require a significant amount of work, we have not updated to the latest version for now; this will be addressed in subsequent tasks. The power-on auto-start is achieved by writing a script that is invoked during the power-on boot process. When using SDK version 8.6, after setting the IP address with the command ip addr add 192.168.1.xxx/16 dev eth0, SSH connection can be established. However, the IP address will not persist after the network cable is unplugged.

        When I set the IP address using a static variable, the ping command fails, but the IP address appears correct when checked with the ifconfig command.I found through Wireshark software that there are no link packets with the IP address 192.168.1.xxx.

  • Hi,

    When I set the IP address using a static variable, the ping command fails, but the IP address appears correct when checked with the ifconfig command.I found through Wireshark software that there are no link packets with the IP address 192.168.1.xxx.

    Please try checking ethtool -S eth0 and if the connected device to your board is running Linux, ethtool -S (interface name of the device) after trying to ping to see if perhaps the packets are being dropped by the CPSW MAC before getting out on the Ethernet cable. 

    Also, is this a custom board?

    Please see this application note for additional suggestions on how to debug ping failure: https://www.ti.com/lit/an/spradj8/spradj8.pdf 

    -Daolin