lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Re-Transmission from PC is ignored due to sequence numb


From: Daniel L
Subject: Re: [lwip-users] Re-Transmission from PC is ignored due to sequence number
Date: Sun, 22 Apr 2018 22:32:10 -0700 (MST)

Simon Goldschmidt wrote
> Let's instead start with explaining *why* lwIP is acting properly:
> TCP is a "reliable stream" protocol. All bytes have a sequence number at
> transmission. Delivering the retransmitted bytes again to the application
> would double them (there's no information about the sequence numbers in
> the
> application API).
> 
> Being like that, lwIP is only saying: "it's OK, I already got those bytes"
> by sending its empty ACK.

OK Simon I understand that lwip is acting correct. Passing the payload to
the application a second time would be nonsense.


Simon Goldschmidt wrote
> How come your PC retransmits with the same sequence number after 300ms?
> The
> Modbus implementations I know are retransmitting the application data
> (i.e.
> Modbus frame), not the TCP seqnos.

The retransmission is not done by the Modbus implementation but by the
Windows 7 TCP/IP stack.
For me this seems OK. Because the initial modbus frame from PC is not
acknowledged by our device (the frame containing the ACK is the frame
getting lost), Windows has to do a retransmission after some time.
Do you see a problem here?

Thinking about the retransmission from PC side:
Shouldn't lwip also do a retransmission of the lost frame?
You know, these bytes never get acknowledged by PC.


Patrick Klos-2 wrote
> Based on your description, yes, LwIP is acting properly.  You need to
> find out why the payload packet isn't making it to the PC?  How big is
> the payload packet?  Can you share a file with the packets from Wireshark?

The frame just contains a dozen bytes of TCP-payload, thus, with all the
TCP/IP headers the raw ethernet frame is about 65 bytes.
We are investigating where the frame gets lost.
This may be some hardware issue.

However, as Simon Goldschmidt wrote, TCP is a reliable protocol.
As far as my understanding goes, one lost ethernet frame should be no
problem because TCP/IP has mechanisms to handle this.
Again I'm wondering why lwip does not perform a retransmission after not
getting acknowledged by PC-side?

trace.pcap <http://lwip.100.n7.nabble.com/file/t2047/trace.pcap>  



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]