lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP full-duplex communication problem


From: Simon Goldschmidt
Subject: Re: [lwip-users] TCP full-duplex communication problem
Date: Thu, 8 Dec 2016 11:11:33 +0100

As I've written before, full-duplex communication for socket & netconn only works with LWIP_NETCONN_FULLDUPLEX set to 1.
This is not available in <= 1.4.1, so you need to have 2.0.0 (or some git version before) at least.
 
The other problem (using 2 separate connections) should not be a problem.
 
Don't assume it's lwIP's fault: lwIP is working great for many people, so please first assume it's a fault in your setup somewhere.
This can be your BSP, netif driver, OS adaption or your application.
(Oh, and I guess this would be what Sergio would say, too, only I try to say it less "rude" ;-) Nevertheless, the advice stays the same)
 
Simon
 
 
Gesendet: Donnerstag, 08. Dezember 2016 um 00:43 Uhr
Von: pekez <address@hidden>
An: "Mailing list for lwIP users" <address@hidden>
Betreff: [lwip-users] TCP full-duplex communication problem
Hi guys,

me again, with new question. :)

On my client side (PC) right now I have two threads, one thread only
sending, whreas other one is always receiving. Both threads work with
same socket. On the server side (ZYNQ) I have the same thing, one thread
receiving, while other is sending.

Now, when I test only one direction independently, let's say only
sending from PC to ZYNQ, or vice verca sending from ZYNQ to PC,
everything works fine. However, I need everything to work
simultaneously, and when I let all threads start working, next thing
happens: both threads on PC finish working as expected, while on the
ZYNQ, one thread finish working as expected, most often the one that is
sending, while the other one never receives all the data it is supposed
to receive, as though the socket is closed or something (it's not, I
checked carefully). Nothing is happening at all, I am looking in
Wireshark, and there is just no communication at all after the first
thread on the ZYNQ finish working.

I also tried to make two separate connections so that one direction
(PC--->ZYNQ) is working over one socket, and other one (PC<---ZYNQ) over
some other socket. This works much better, never have similiar problems
on ZYNQ side, but really rarely even in this case, communication stops
working, but this time the problem seems to be PC side, again when one
thread finish before the other, I am getting some kind of strange
messages in Wireshark, such as "tcp acked unseen segment".

I have made referent server application for PC, and when communication
is PC to PC, everything is OK, so I assume that it's some kind of
problem with lwIP, which can be solved maybe by changing some options in
lwipopts.h (I hope it's only that :) ). I guess is hard to help with
only this much of information, but maybe someone has already faced
similar problems.

I am working with Socket API, lwIP v1.4.1 with FreeRTOS v8.2.3.

Best regards,
and thanks in advance.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

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