AW: [En-Nut-Discussion] TCP/IP-Problems

Oliver Schulz olischulz at web.de
Fri Jun 2 20:47:49 CEST 2006


Hello folks, Hello Dirk,

After a first look to the dumps and the Nut sources, I think the problem is
in the window size reported by the S7 on the first packets. The CP 343-1
LEAN indicates on the first sent SYN packet a MSS of 456 bytes but a window
size of only 280 bytes. That means, that the CP 343-1 LEAN cannot even store
a segment with it's MSS of 456 bytes.

NutOS limits the sended segment sizes to the peer MSS, but always waits
until the peer's window is big enough to store even the data to send.
In your application Nut tries to send 300 bytes, which obviously dont fit in
the receivers window. So Nut aborts the connection after a timeout, I think.

Indeed the "old" (and expensive (~1200EUR), I know that, b/c I also used the
343-1 on my own developments) CP from SIEMENS indicates a MSS of 512 bytes
and a window size of 560, which will work with Nut.

Although this behaviour from the CP LEAN is very, very unusual (never saw
that before), I cannot find in the RFC 793 (TCP) that this is a fault. That
means, we have a bug in Nut/Net.

@Dirk: To check whether I'm right, please limit the MSS to 200 bytes, or
limit the send data to 200 bytes. Then it should work.

Hope that helps,
Oliver.


> -----Ursprüngliche Nachricht-----
> Von: en-nut-discussion-bounces at egnite.de 
> [mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von 
> Dirk Becker
> Gesendet: Dienstag, 30. Mai 2006 18:30
> An: Ethernut User Chat (English)
> Betreff: Re: [En-Nut-Discussion] TCP/IP-Problems
> 
> Hi Brett,
> 
> thanx for your reply.
> Further down you can find a tcpip-dump of the working station.
> The problem with the long delay seems to be the TCP/IP-retransmission 
> timer, it happens only shortly after sytem start (a bit strange, but 
> probably not the real problem). A bit further down you can 
> find packets 
> where no retransmissions happen, but also no data is sent and the 
> Ethernut? ends the connection.
> Dusan Ferbas pointed out, that it might be connected with MSS not 
> accepted by the Ethernut and he suggestet me changing MSS. 
> With his help 
> the LEAN version now sometimes accepts some data but then the 
> connection 
> is dropped again suddenly after 1 packet with data (300 Bytes).
> 
> Kind regards,
> 
> Dirk
> 
> 
> 
> 




More information about the En-Nut-Discussion mailing list