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.

J721EXSOMXEVM: Not able to configure Ethernet Switch Firmware using switchconfig_client.py tool

Part Number: J721EXSOMXEVM

Tool/software:

Dear TI Support team,

We are trying to analyze the behavior of Ethernet Switch Firmware in J721E Demo board. For that, we are trying to configure the switch firmware using  switchconfig_client.py tool.

But we could not able to connect with MCU2_0 (Ethernet switch firmware) using the IP / UART. Can you please guide us how to configure Ethernet Switch firmware?

I got the following logs in terminal while doing this activity. It will be good if you can help us by mentioning which IP needs to be used to connect from  switchconfig_client.py tool.

We are using Quad Port Ethernet board for connecting SGMII interface & available ports are MAC port 2,5,6,7.

=======================================================
CPSW Ethernet Firmware
=======================================================
ETHFW: Warning: Using 6 random MAC address(es)
EnetMcm: CPSW_9G on MAIN NAVSS
Mdio_open: MDIO manual mode enabled
PHY 16 is alive
PHY 17 is alive
PHY 18 is alive
PHY 19 is alive
EnetPhy_bindDriver: PHY 16: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK
EnetPhy_bindDriver: PHY 17: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK
EnetPhy_bindDriver: PHY 18: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK
EnetPhy_bindDriver: PHY 19: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK
ETHFW: Shared multicasts:
ETHFW: 01:00:5e:00:00:01
ETHFW: 01:00:5e:00:00:fb
ETHFW: 01:00:5e:00:00:fc
ETHFW: 33:33:00:00:00:01
ETHFW: 33:33:ff:1d:92:c2
ETHFW: 01:80:c2:00:00:00
ETHFW: 01:80:c2:00:00:03
ETHFW: Reserved multicasts:
ETHFW: 01:80:c2:00:00:0e
ETHFW: 01:1b:19:00:00:00
ETHFW: VLAN 1024 member=0x1ed virtMember=0x7 regMcastFlood=0x1ed unregMcastFlood=0x1ed untag=0x0
ETHFW: 1 VLAN entries added in ALE table

ETHFW Version : 0.05.00
unibase-1.1.5-jacinto
ETHFW Build Date: Dec 12, 2024
ETHFW Build Time: 10:41:48
ETHFW Commit SHA:

Starting lwIP, local interface IP is dhcp-enabled
ETHFW: Virtual port configuration:
ETHFW: Host MAC address: 70:1f:87:25:95:57
[LWIPIF_LWIP] Enet LLD netif initialized successfully
[LWIPIF_LWIP_IC] Interface started successfully
[LWIPIF_LWIP_IC] NETIF INIT SUCCESS
[LWIPIF_LWIP_IC] Interface started successfully
[LWIPIF_LWIP_IC] NETIF INIT SUCCESS
Added interface 'br3', IP is 0.0.0.0
ETHFW: Enable gPTP on MAC port 2 (tilld2)
ETHFW: Enable gPTP on MAC port 3 (tilld3)
ETHFW: Enable gPTP on MAC port 5 (tilld5)
ETHFW: Enable gPTP on MAC port 8 (tilld8)
ETHFW: EthFwTsn_gptpYangConfig:domain=0
ETHFW: TimeSync PTP enabled
ETHFW: CpswProxyServer: initialization completed (core: mcu2_0)
INF:ubase:GPTP_MEDIUM_ALLOC: fragsize=16 fragused/fragnum=1294/1426 (90
INF:ubase:GPTP_SMALL_ALLOC: fragsize=4 fragused/fragnum=31/97 (31
INF:ubase:SM_DATA_INST: fragsize=8 fragused/fragnum=3806/3806 (100
CpswMacPort_checkSgmiiStatus: MAC 5: SGMII link parter config port: link up: 1-Gbps Full-Duplex
Cpsw_handleLinkUp: Port 5: Link up: 1-Gbps Full-Duplex
CpswMacPort_checkSgmiiStatus: MAC 2: SGMII link parter config port: link up: 1-Gbps Full-Duplex
Cpsw_handleLinkUp: Port 2: Link up: 1-Gbps Full-Duplex
Added interface 'br3', IP is 192.168.10.98
ETHFW: Announce Endpoint Service to HLOS
ETHFW: VIRT_PORT_INFO | C2S | core=0 endpt=1024
REMOTE_SERVICE: Init ... !!!
ETHFW: VIRT_PORT_INFO | S2C | switchPortMask=1 macPortMask=10
ETHFW: ATTACH | C2S | core=0 endpt=1024 virtPort=0
REMOTE_SERVICE: Init ... Done !!!
ETHFW: ATTACH | S2C | token=0 rxMtu=1522 features=3
ETHFW: ATTACH | C2S | core=0 endpt=1024 virtPort=4
ETHFW: ATTACH | S2C | token=400 rxMtu=1522 features=1
ETHFW: ALLOC_RX | C2S | core=0 endpt=1024 token=0
ETHFW: ALLOC_RX | S2C | flow=172,0 rxPsil=0x4a00 status=0
ETHFW: ALLOC_TX | C2S | core=0 endpt=1024 token=0
ETHFW: ALLOC_TX | S2C | txPsil=0xca04 status=0
ETHFW: ALLOC_TX | C2S | core=0 endpt=1024 token=0
Cpsw_handleLinkDown: Port 5: Link down
ETHFW: ALLOC_TX | S2C | txPsil=0xca07 status=0
ETHFW: ALLOC_MAC | C2S | core=0 endpt=1024 token=0
ETHFW: ALLOC_MAC | S2C | macAddr=70:3e:38:2f:0a:0b status=0
ETHFW: ALLOC_RX | C2S | core=0 endpt=1024 token=400
ETHFW: ALLOC_RX | S2C | flow=172,1 rxPsil=0x4a00 status=0
ETHFW: ALLOC_TX | C2S | core=0 endpt=1024 token=400
ETHFW: ALLOC_TX | S2C | txPsil=0xca03 status=0
ETHFW: ALLOC_MAC | C2S | core=0 endpt=1024 token=400
ETHFW: ALLOC_MAC | S2C | macAddr=70:c6:a7:fe:16:e8 status=0
ETHFW: REGISTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=70:3e:38:2f:0a:0b flowIdx=172,0
Cpsw_ioctlInternal: Registered MAC address (ALE entry=9, policer entry=2)
ETHFW: REGISTER_MAC | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=33:33:00:00:00:01 vlanId=65535 flowIdx=172,0
ETHFW: ADD_FILTER_MAC | S2C | status=0
ETHFW: REGISTER_MAC | C2S | core=0 endpt=1024 token=400 macAdd=70:c6:a7:fe:16:e8 flowIdx=172,1
ETHFW: REGISTER_MAC | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=01:00:5e:00:00:01 vlanId=65535 flowIdx=172,0
ETHFW: ADD_FILTER_MAC | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=33:33:ff:2f:0a:0b vlanId=65535 flowIdx=172,0
ETHFW: ADD_FILTER_MAC | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=01:80:c2:00:00:00 vlanId=65535 flowIdx=172,0
ETHFW: ADD_FILTER_MAC | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=01:80:c2:00:00:03 vlanId=65535 flowIdx=172,0
ETHFW: ADD_FILTER_MAC | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=01:80:c2:00:00:0e vlanId=65535 flowIdx=172,0
ETHFW: EthFwMcast_filterAddMac: Failed to add reserved mcast addr on vlan 0 and hwVlanId 3 01:80:c2:00:00:0e: -2
ETHFW: CpswProxyServer_filterAddMacHandlerCb: Failed to add multicast: -2
ETHFW: CpswProxyServer_clientRequestHandler: Failed to add mcast to filter: -2
ETHFW: ADD_FILTER_MAC | S2C | status=-2
ETHFW: REGISTER_IPv4 | C2S | core=0 endpt=1024 token=0 ipAddr=192.168.10.99 macAdd=70:3e:38:2f:0a:0b
ETHFW:
SNo. MAC Address VLAN IP Address
ETHFW: ------ ------------------- ------ -----------------
ETHFW: 1 70:3e:38:2f:0a:0b 0 192.168.10.99
ETHFW: REGISTER_IPv4 | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=01:00:5e:00:00:fb vlanId=65535 flowIdx=172,0
ETHFW: ADD_FILTER_MAC | S2C | status=0
ETHFW: ADD_FILTER_MAC | C2S | core=0 endpt=1024 token=0 macAdd=33:33:00:00:00:fb vlanId=65535 flowIdx=172,0
ETHFW: ADD_FILTER_MAC | S2C | status=0

Regards,

Dinesh

  • Hi,

    Added interface 'br3', IP is 192.168.10.98

    You are supposed to configure the above IP address, the ETHFW local switch IP address.

    There are prerequisites to run the ETFW Demos. Please refer to the ETHFW User Guide for more details.
    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j7200/10_01_00_04/exports/docs/ethfw/docs/user_guide/demo_ethfw_combined_top.html#demo_ethfw_dhcp_server

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Thanks for your feedback.

    I could be able to communicate with Ethernet Switch firmware using " iperf -c 192.168.1.<r5f_0> -t 20 -i 1"command as mentioned in the Demo setup section in the above link. But using the same address, "switchconfig_client.py tool" could not be able to communicate and it is always giving an error message like "Error in creating the socket".  Our intention is to understand the current configuration of Ethernet switch firmware and then modify the configurations. Any input related to this?

    Please note that in my setup, I am using a router for DHCP server and both laptop & J721E board are connected to this router. 

    I have added debug prints in this python script and understood that the error is in connection stage as given below.

    **********************************************

    Socket creation failed with error [Errno 111] Connection refused
    Error code: ECONNREFUSED
    Error in creating socket

    **************************************************

    The logs corresponding to iperf is as follows. Please note that IP address is different than earlier logs but I used the same address in configuration tool also.

    *****************************************************

    iperf -c 192.168.10.118 -t 20 -i 1
    ------------------------------------------------------------
    Client connecting to 192.168.10.118, TCP port 5001
    TCP window size: 85.0 KByte (default)
    ------------------------------------------------------------
    [ 1] local 172.18.85.191 port 40118 connected with 192.168.10.118 port 5001
    [ ID] Interval Transfer Bandwidth
    [ 1] 0.0000-1.0000 sec 11.8 MBytes 98.6 Mbits/sec
    [ 1] 1.0000-2.0000 sec 12.1 MBytes 102 Mbits/sec
    [ 1] 2.0000-3.0000 sec 11.4 MBytes 95.4 Mbits/sec
    [ 1] 3.0000-4.0000 sec 11.2 MBytes 94.4 Mbits/sec
    [ 1] 4.0000-5.0000 sec 11.4 MBytes 95.4 Mbits/sec
    [ 1] 5.0000-6.0000 sec 11.5 MBytes 96.5 Mbits/sec
    [ 1] 6.0000-7.0000 sec 11.2 MBytes 94.4 Mbits/sec
    [ 1] 7.0000-8.0000 sec 11.2 MBytes 94.4 Mbits/sec
    [ 1] 8.0000-9.0000 sec 11.6 MBytes 97.5 Mbits/sec
    [ 1] 9.0000-10.0000 sec 11.5 MBytes 96.5 Mbits/sec
    [ 1] 10.0000-11.0000 sec 11.4 MBytes 95.4 Mbits/sec
    [ 1] 11.0000-12.0000 sec 11.2 MBytes 94.4 Mbits/sec
    [ 1] 12.0000-13.0000 sec 11.5 MBytes 96.5 Mbits/sec
    [ 1] 13.0000-14.0000 sec 11.4 MBytes 95.4 Mbits/sec
    [ 1] 14.0000-15.0000 sec 11.8 MBytes 98.6 Mbits/sec
    [ 1] 15.0000-16.0000 sec 11.2 MBytes 94.4 Mbits/sec
    [ 1] 16.0000-17.0000 sec 11.9 MBytes 99.6 Mbits/sec
    [ 1] 17.0000-18.0000 sec 11.2 MBytes 94.4 Mbits/sec
    [ 1] 18.0000-19.0000 sec 11.4 MBytes 95.4 Mbits/sec
    [ 1] 19.0000-20.0000 sec 11.4 MBytes 95.4 Mbits/sec
    [ 1] 0.0000-20.0174 sec 230 MBytes 96.2 Mbits/sec

    *****************************************************

    Regards,

    Dinesh

  • Hi,

    But using the same address, "switchconfig_client.py tool" could not be able to communicate and it is always giving an error message like "Error in creating the socket".  Our intention is to understand the current configuration of Ethernet switch firmware and then modify the configurations. Any input related to this?

    If you look at the configuration files, the Source IP is in the 192.168.1.x domain, which is the same as the DHCP-recommended domain in the ETHFW User Guide.
    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j7200/10_01_00_04/exports/docs/ethfw/docs/user_guide/demo_ethfw_combined_top.html#demo_ethfw_dhcp_server

    Above, iperf running with ETHFW IP, which is 10.x domain.

    Please ensure the configuration and ETHFW IP are in the same domain to run ETHFW Demos.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Your observation is correct. Here I am using a router and pc & board are connected to this router. So both PC & Board using 10.x domain. I hope this is OK.

    From analysis, it observed that when configuration tool try to connect with EthFW, that connection is refused. The same problem is happened when I used curl command & try to connect with port 5555. Any input based on this error?

    curl 192.168.10.118:5555
    curl: (7) Failed to connect to 192.168.10.118 port 5555 after 1 ms: Connection refused

    Seems to be port 5555 is not opened in Server. I executed the command  "nmap 192.168.10.118" and observed that only port 5001 is opened as shown below

     nmap 192.168.10.118
    Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-27 06:22 UTC
    Nmap scan report for 192.168.10.118
    Host is up (0.0039s latency).
    Not shown: 999 closed tcp ports (reset)
    PORT STATE SERVICE
    5001/tcp open commplex-link

    Regards,

    Dinesh

  • Hi,

    curl 192.168.10.118:5555
    curl: (7) Failed to connect to 192.168.10.118 port 5555 after 1 ms: Connection refused

    By default, TCP/IP alone enabled from LWIP.

    You can run only the demos mentioned in the ETHFW User Guide for IPv4, IPV6 packets.

    If you want support for any other protocols that need to be enabled in LWIP and used.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Thanks for the feedback. 

    I have debugged the CPSW_Config_server code and observed that "ETHFW_DEMO_SUPPORT" macro related codes are not enabled even though we provide ETHFW_DEMO_SUPPORT=yes as part of make command for compilation. When analysed, it observed that the following statements are not available for _MODULE=normal and this is available for qnx only.

    ifeq ($(ETHFW_DEMO_SUPPORT),yes)
     DEFS += ETHFW_DEMO_SUPPORT
    endif

    When I added the above code, then "switchconfig_client.py tool" could be able to connect with EthFw.