This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RL-TcpNet - client application receiving same data bytes that was sent previously

Hi,

I am using my MCU as a client application (i.e. active open).
The problem is, each time I attempt to send data, the callback function always return TCP_EVT_DATA event and I received the same data that I sent previously (or you can say, loopback).
Keil defines TCP_EVT_DATA as an event that, TCP data packet has been received.
As a client application, I will expect the TCP_EVT_DATA event to be triggered only when a TCP data packet is received from a remote server, not when the client is sending the TCP data.

The fact is, with the same piece of code, it does not happen when I configure it as server application instead.

Will like to know if anybody has similar experience?

Parents Reply Children
  • Thank you for the prompt response!

    Yes, each time I send data, the client callback function will return TCP_EVT_ACK first. This is correct.
    Therafter, the callback function will return TCP_EVT_DATA, which shouldn't be the case, in my honest opinion.

    On the Keil debugger, I set a breakpoint after "case TCP_EVT_DATA:". The debugger will always stop at this breakpoint each time the client application sent a byte.

    My client application is sending the data to Hyperterminal and I am quite sure the terminal itself does not echo the data back.