11 years, 2 months ago.

TCP error detection

Hello,

I'm trying to send data between two mbeds using TCP. I also want to be able to detect packet loss and then notify the sending mbed it needs to resend the packet. However, I am having trouble learning how to implement this using the mbed's TCP libraries. So my question is, how do I attach a callback function or at least access the sequence number?

Brad Jackson

More Info: Also of note is that I am also planning on storing the data being sent on an SD card in case of extended outages between the two mbed's.

1 Answer

11 years, 2 months ago.

Hi Brad!

TCP handles packet loss and re-transmit for you. You don't have to resend packets. If it is not possible to send a packet to the other side you should get an error at the send() operation.

See http://en.wikipedia.org/wiki/Transmission_Control_Protocol

Charly

I understand that TCP should resend packets, but as far as I can tell after looking through mbed's TCP libraries, mbed's port of lwip doesn't make use of TCP's ability of packet loss detection.

posted by Brad Jackson 06 Mar 2013