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.

EVMK2H: [TI-NDK,TCP Stack] TCP 3way handshake broken!

Part Number: EVMK2H

Hello community,

Im working on a project with TI-RTOS and EVMK2H. I created TCP client sockets with using NDK Tcp Stack. I have a question about this stack.

TCP using 3-way handshake(SYN, SYNACK, ACK). SYN packets have to be seq=0, SYNACK packets have to be seq=0 ack=1, ACK packets have to be seq=1 ack=1.

In my case, rarely ACK packets have invalid seq&ack numbers while SYN & SYNACK packets has valid seq&ack. So, connection has never established, because EVMK2H sent SYN packet with(seq=2973524992) TCP Server tries to establish with SYNACK (seq=341319682, ack=2973524993) but NDK-TCP stack replies with ACK(Seq=139587585, Ack=4140089672).

This 3-way handshake is not normal:

--->SYN(seq=A)

<---SYNACK(seq=B, ack=A+1)

--->ACK(C not A+1, D not B+1)

How can i handle this problem? 

Best Regards,

Srt

  • The team is notified. They will post their feedback directly here.

    BR
    Tsvetolin Shulev
  • Hi,

    What is the Processor SDK RTOS version and NDK version you used? Which test application (your own code?) you ran for TCP client? K2H EVM is client, who is the TCP server? How frequent you met this issue? Is every time this a fresh start (power cycled)? Or you have TCP connection establishing, closing in an infinite loop test?

    Regards, Eric
  • Hi,

    Thank you for your responses.

    RTOS is `bios_6_37_03_30`, NDK is `ndk_2_22_02_16`. I created TCP Client Socket and Send TCP Connection Request to TCP Server. TCP Server run on another embedded board. There is no problem in first connection. Problem occurs after that one of TCP side power off and power on(Without FIN packets), so other TCP side not recognize it. 

    I tried another test: EVMK2H(TCP Client) and PC(TCP Server) with `SocketTest'er(https://bit.ly/2s2or3Y). I power up EVMK2H and tried TCP Connection with same port(PC still thought established). This time PC side broke TCP 3way handshake (PC sent wrong SYNACK seq&ack numbers). Is it possible a TCP general problem?

    Best Regards,

    Srt

  • Hi,

    Are you able to share your TCP client CCS project so I can build and test with a server?

    Regards, Eric