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: Patrick Klos
Subject: Re: [lwip-users] Re-Transmission from PC is ignored due to sequence number
Date: Mon, 23 Apr 2018 11:18:00 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 4/23/2018 1:32 AM, Daniel L wrote:
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.

Yes, the LwIP side should have retransmitted the packet.  Packet 21 of the trace file shows an ACK of 00009b45, so even though the LwIP device thought it sent a response to the PC (bumping the ACK to 00009b56), LwIP should have noticed that and resent the data from the previous packet.

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>

Looking at the trace file and re-reading your symptoms, I wonder if the ethernet transmitter on your embedded device failed to send that specific payload packet?  Does your ethernet controller have a status register that might indicate if an error occurred during transmission?

Either that, or the packet got lost between the embedded device and the Windows PC?  Is there a switch or other network device between the device and the PC?  You might need to tap at the embedded device itself to see for sure what packets are actually leaving the device.  I use a Netgear GS108E (with port mirroring) for such a setup so I can monitor/verify the packets on the embedded system's link.

Still, it's unclear why the LwIP stack sent packet 22 with the SEQuence number 0009b56 when that data has not been ACKed yet?

Patrick




reply via email to

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