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.

AM2634: How to communicate with UDP client and UDP server in AM2634

Part Number: AM2634
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi teams,

I am working on the eval board : AM2634, sdk 10.02.00.13 version.
I am using the example enet_cpsw_udpclient example so here i can able to ping both the ip's 

so here i could be able to ping those 2ip's.
  

now I am Tried to achieve UDP client and UDP server so I connected in ethernet - 2 UDP client is working fine i can be able to see data in Socket Tester.

  

But i am facing issue in the UDP client and UDP server in ethernet - 1 i am tried to observe in Socket Tester but i cannot able to see any data so can u say why this is happening?and even though i can able to see the ping message.

  • Hi AK,

    1. I'm unable to understand the exact setup here, do you mind sharing what "ethernet-2" is? Do you mean the MAC-Port-2 on the AM263x?

    2. If I understand correctly, you are running the UDP client on AM263x board with both MAC Ports enabled, with MAC Port-2 it works fine and with MAC Port-1, you cannot see any data but you are able to ping. Is this understanding correct?

    3. Are you using the default out-of-box example or have you modified the application/syscfg? If yes, can you share the changes/updated files?

    4. If you have 2 different client tasks running, have you split them into two different threads? Have you tied client-1 to port-1 and client-2 to port-2 in any way?

    Regards,
    Shaunak

  • Hi Shaunak,

    1. Ethernet - 1 and Ethernet -2 is nothing but i connected the ethernet cable from those port which i given below.

    2. If I understand correctly, you are running the UDP client on AM263x board with both MAC Ports enabled, with MAC Port-2 it works fine and with MAC Port-1, you cannot see any data but you are able to ping. Is this understanding, correct?

    Ans: yes,what ever u mention above that is correct...

    3. Are you using the default out-of-box example or have you modified the application/syscfg? If yes, can you share the changes/updated files?

    Ans: i am using the same example which you given I didn't do any modification in sysfg only modification which i made is that i added NETIF instance as 2.

    But, one thing i observed if I configured one Netif in sysconfig ethernet 1 (UDP & TCP working fine),if we configured 2 Netif in sysconfig only Ethernet-2 is working fine but not ethernet-1 but ping is working.

    can you say why this is happening? and can you just check from your side. your's replay is mostly welcome!!!

  • Hi AK,

    1. Can you share application logs for failure case?

    2. Do you see IPs assigned for both the NetIFs?

    3. Are you expecting UDP to communicate over both MAC Ports? The current flow that I understand is:

    When both MAC Ports are enabled and a single NetIF is used, this NetIF is for the Host port of CPSW (the single IP address you get is for host port and not MAC Ports), since both MAC Ports are enabled, regardless of the MAC port connection (1 or 2), both will work fine.

    When both MAC Ports are enabled and both NetIFs are enabled, we force CPSW into MAC only mode. This time the IP addresses are assigned for MAC Ports and not Host Port, and whichever UDP client connects to the server communicates independently with the server. If MAC Port-1 connects first, then the client with IP of MAC Port-1 will communicate and if MAC Port-2 connects first, then the client with IP of MAC Port-2 communicates.

    We are sure that the link/ethernet is not broken since we can ping both IPs independently. 

    The open end here is what is the actual expectation from the application.

    1. If you want to run 2 clients with two different IPs on 2 different MAC Ports, the application needs to be modified to have two different client tasks running.

    2. If you want to run a single client with a single IP address talking to a UDP server, then you can disable the second netif, connect both MAC Ports, connect the device to server and expect both ports to communicate with the server. 

    What you observe above is not really a failure, but i believe the default application does something different compared to what the expectation here is.

    Regards,
    Shaunak