[Top][All Lists]

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

RE: [lwip-users] Communication delays, if using lwIP in different networ

From: Benjamin Schelte
Subject: RE: [lwip-users] Communication delays, if using lwIP in different network areas
Date: Mon, 15 Nov 2010 09:14:24 +0100

Hi Kieran,

Here is some more information about my configuration settings and stuff.

> 1) a packet capture.
Please see the attachments. is a short communication between the PC and the device
inside the 10.x.x.x network is the same call to the device from 10.x.x.x network to
192.x.x.x network through the router
The other 2 are comparable to the 2nd one.

> 2) an example of how you're configuring your netif (e.g. the call to
> netif_add)
tcpip_init(vPrvEthCtrl_ConfigureInterface, NULL );
vPrvEthCtrl_SetDefaultNetConfig(MacAddress, &xIpAddr, &xNetMask, &xGateway);
/* add data to netif */
netif_add(&gsEthCtrl.sNetif, &xIpAddr, &xNetMask, &xGateway, NULL,
ethernetif_init, tcpip_input);

/* make it the default interface */

/* register status callback */
netif_set_status_callback(&gsEthCtrl.sNetif, vPrvEthCtrl_NetifStatus);

if (bUseDHCP == TRUE) {
        // Start DHCP service
else {
        // Start the network interface with a static IP address

> 3) your lwipopts.h
Please see the attachment.

Last Friday I did some more debugging and found out that the call to
netconn_recv() in my communication task does not always return, if data is
This results in the described response delay, which you can see in the logs
I attached.

I also did some tracing and debugging about the ARP-cache, but that one
seems to be ok.
The entry was (Gateway-IP address) and the according MAC-address
of the interface.

Best regards,

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Kieran Mansley
> Sent: Thursday, November 11, 2010 9:49 PM
> To: Mailing list for lwIP users
> Subject: Re: [lwip-users] Communication delays, if using lwIP in
> different network areas
> On 11 Nov 2010, at 19:12, Pettinato, Jim wrote:
> > Benjamin,
> >
> > TCP tries to optimize network throughput by placing outgoing data on
> a transmit queue, and sending when needed (or after a delay as you are
> seeing) . For some connections (for example command/response type
> connections like ModbusTCP) this is extremely inefficient because there
> is usually only one small block of data written per outgoing packet
> anyway.
> >
> > To circumvent the delay you are seeing, your application should call
> tcp_output() after queuing data with tcp_write().
> I can't see how that would be affected by there being a router involved
> though.
> I think to understand this problem we'll need to see
> 1) a packet capture.
> 2) an example of how you're configuring your netif (e.g. the call to
> netif_add)
> 3) your lwipopts.h
> Thanks
> Kieran
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users

Description: Binary data

Description: Binary data

Attachment: Example1.pcap
Description: Binary data

Attachment: Example2.pcap
Description: Binary data

Attachment: lwipopts.h
Description: Binary data

reply via email to

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