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.

Problems with NDK client example on TDMSEVM6678L

Other Parts Discussed in Thread: TMS320C6678

Hi,
I'm trying to stream in both direction a video between a Linux PC and a TDMSEVM6678L.
I'm having trouble using MCSDK (v. 2_01_02_06) client example on my TMS320C6678.
When I run winapps send program, the connection hangs after a random number of packets (generally between 2 and 5, logs hereunder).
When I run winapps receive program, the connection is reliable but slow (around 24 Mbps, logs hereunder).
Would you have another TCP example with full speed reliable connection that I could build on?
Thanks,
BR,
Julien Heulot

--------------------------------------
Winapps send program

mpelcat@pc-eii37:/opt/ti/ndk_2_21_01_38/packages/ti/ndk/winapps$ ./send 192.168.2.100 100
^C
mpelcat@pc-eii37:/opt/ti/ndk_2_21_01_38/packages/ti/ndk/winapps$ ./send 192.168.2.100 1
1 Sending 8192 bytes...passed
2 Sending 8192 bytes...passed
3 Sending 8192 bytes...passed
4 Sending 8192 bytes...passed
5 Sending 8192 bytes...passed
^C
mpelcat@pc-eii37:/opt/ti/ndk_2_21_01_38/packages/ti/ndk/winapps$ ./send 192.168.2.100 1
1 Sending 8192 bytes...passed
2 Sending 8192 bytes...passed
3 Sending 8192 bytes...passed
4 Sending 8192 bytes...passed
^C
mpelcat@pc-eii37:/opt/ti/ndk_2_21_01_38/packages/ti/ndk/winapps$ ./send 192.168.2.100 1
1 Sending 8192 bytes...passed
2 Sending 8192 bytes...passed
^C

--------------------------------------
Winapps receive program

mpelcat@pc-eii37:/opt/ti/ndk_2_21_01_38/packages/ti/ndk/winapps$ ./recv 192.168.2.100 10
10 Requesting 46720 bytes ... receive... passed
20 Requesting 46720 bytes ... receive... passed
30 Requesting 46720 bytes ... receive... passed
40 Requesting 46720 bytes ... receive... passed
50 Requesting 46720 bytes ... receive... passed
60 Requesting 46720 bytes ... receive... passed
70 Requesting 46720 bytes ... receive... passed
80 Requesting 46720 bytes ... receive... passed
90 Requesting 46720 bytes ... receive... passed - 4204800 bytes/s
(...)
^C

  • Hi Julien,

    I am able to run the client example from BIOS-MCSDK 2.1.2.6 and use the send/recv program without any hangs. 

    How are your PC and your EVM set up? Would you be able to monitor the network traffic and see if any packets are being dropped intermediately? Double check that there are no firewalls preventing the packets from being streamed. By the looks of your Winapps send log, it looks like the EVM is still running and functioning properly after the hang occurs. Can you try using a continuous ping and see if the same hang occurs?

    -Ivan

  • Hi Ivan,

    My computer is under Linux and configured at static IP address 192.168.2.101.
    The EVM is configured in no boot mode and at static IP address 192.168.2.100 (corresponding pin set to 0). I program the EVM using a ccs debug session.
    I use the following tools:
     - Compiler TI v7.4.0 
     - MCSDK 2.1.2.6 and PDK 1.1.2.6
     - NDK 2.21.2.43
     - SYS/BIOS 6.33.6.50
     - XDC 3.23.4.60
     - Target ti.targets.elf.C66 and Platform ti.platforms.evm6678

    I have compiled the winapp send program using "gcc send.c -o send"

    The hang doesn't occur on a continuous ping.
    You can find attached the wireshark dump corresponding at the following execution:
    ----------------------------------------------------------------------------------------------------
     

    jheulot@pc-eii19:/opt/ti/ndk_2_21_02_43/packages/ti/ndk/winapps$ ./send 192.168.2.100
    1 Sending 8192 bytes...passed
    2 Sending 8192 bytes...passed
    3 Sending 8192 bytes...passed
    4 Sending 8192 bytes...passed
    5 Sending 8192 bytes...passed - 40960 bytes/s
    6 Sending 8192 bytes...passed - 49152 bytes/s
    7 Sending 8192 bytes...passed - 546 bytes/s 
    8 Sending 8192 bytes...passed - 624 bytes/s

    ---------------------------------------------------------------------------
    the lines 5 & 6 appears almost instantly, lines 7 & 8 appears around 100 sec later (after a timeout?).
    If I send a ping request during the hang, it answer correctly & instantly. 

    It seems like some packets are not transmitted correctly. I check my firewall, and it is disabled:
    jheulot@pc-eii19:~$ sudo ufw status 
    Status: inactive

    7725.send_example_03_06_13.dat

    Could you please give me a clue on how to go further?

    Thanks and BR,

    Julien

  • Julien,

    Are you using a router? Can you use the send program on an external website (such as google.com?) and see that it doesn't hang?

    Would you also mind grabbing Wireshark and see if anything looks weird? It sounds like the EVM is still working fine, but either packets are being dropped (thus ./send is waiting indefinitely) or the TCP connection is dropped. I'm not quite sure of the problem yet based on the information you have given me.

    [If you have another computer on the network] Try using the send program from a different computer and see if there's a difference.

    -Ivan

  • Hi Julien,
    I have exactly the same problem with C6678 NDK client example, except that I use a Windows machine. Initially I could get about 400000 bytes/s throughput for the "recv" command, and about 4000 bytes/s for the "send" command. By increasing the CFGITEM_IP_SOCKTCPTXBUF buffer to 64000, setting the priority to NC_PRIORITY_HIGH and creating custom platform package with L2 cache enabled, I could achieve 8500000 bytes/s for the "recv" command, what is appropriate for me. But I still have problems with sending data to the board. Playing with buffer sizes, task priorities, etc. produced no result, and I still have about 600 bytes/s throughput and a connection drop after several passes.
    Have you found the solution for this problem?Thanks and best regards,
    Alexey Kurbanov.