Sanny55 | 10 Feb 17:41 2016

LWIP TCP server(Dup ACK and Retransmission)(Bare metal)

Hi all,

I have problem. Using program Wireshark, I discovered that are sent
duplicate acknowledgment packets (server) and retransmission (client).
This problem only occurs if TCP_MSS < p->tot_len. //p->to_len size data

My code:


#define TCP_MSS                         1460
#define TCP_WND                         (2*TCP_MSS)


Callback receive data:

err_t echo_recive(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t

    if (err == ERR_OK && p != NULL)

        /* Inform TCP that we have taken the data. */
        u16_t tot_len = p->tot_len;
        tcp_recved(tpcb, tot_len);

(Continue reading)

Jaime Fernández | 10 Feb 20:49 2016

Lwip for omapl137


Hope this is the right mail to ask and please forgive me if it is not. 

I'm looking to add support for the omapl137 under sysbios. There are examples, without sysbios, under the stater ware pckagenfor the omapl138.  In the lwip wiki I see a mention to a ported driver for the

But when I downloaded it I cannot see or find the drivers. Any suggestions?


Sent from my iPhone
lwip-users mailing list
Frédéric Grandjean | 8 Feb 13:52 2016

LWIP raw TCP socket disconnection


I’m using LWIP 1.4.1 and I’m facing an issue with “brutal” raw socket disconnection.


Imagine the following scenario:

-          Create a TCP_PCB listener (server)

-          On connection from a remote host (a Windows PC), accept it, with all callbacks

-          Now, I remove the Ethernet cable from my application

-          I also exit (brutally) the remote client application

-          Now, I wait 1 minutes and connect back the Ethernet cable

-          LWIP never signals the connection is lost, not the state of the PCB tells me (Still ESTABLISHED)!



How to detect this kind of disconnection ?


Thank you



lwip-users mailing list
Gaurav Jain | 5 Feb 09:23 2016

TCP ACK not received - Probably due to seq no.

I have tried implementing a lwip server which connects to a client in
a windows machine. My lwip server is running on Virtex 7. Now what I
need to do is send 100MB data to the server, do some operations and
then write back to the client. I did as required. However I have the
following observations:

1. The client successfully sends the data to the server (whatever size).
2. What I had implemented was, that at the end. the client would send
a particular string, upon which the server would start processing the
data. After that the server would writeback to the client.

3. I used wireshark to analyze the packet flow. What is happening is,
that packets sent by the server start with the sequence number
received as ACK seq no from client, instead of starting from 1.
However, the client on the other hand after sending has entered a
blocking receive state, where it expects the data to be with sequence
number 1.

Due to this, the client does not send back any acknowledgement to the
server, where the snd_buf limit then reaches and the sending further

Is it that once the server receives all the packets from the client,
do I have to again initiate the three-way handshake before it starts
sending to client. (By three way handshake I mean do I need to again
set up the pcb and set up a new connection? Or is there a way to
modify the ACK start number? Or I am somewhere wrong in all this?

Thank You
Giuseppe Iellamo | 4 Feb 15:27 2016

Connection Reset

Hello everyone,

I'm using lwip lwip-1.4.1 as bundled by texas instruments with their TIVA 129 microcontroller.

I establish a tcp connection (I'm NOT using the socket API), either way after say half an hour without any message sent, connection goes reset. 

This is the tcpdump Read:

15:01:17.674343 IP > Flags [R.], seq 6549, ack 1964636757, win 4096, length 0

I've tried to enable KEEP_ALIVE. But nothins seems to have changed.

Is this a desired behaviour ? Did I hit a bug?

How can overcome this issue ?

lwip-users mailing list
Gaurav Jain | 4 Feb 08:00 2016


Is there a limit on the tcp send buffer? What I have observed is, that
If I try to send huge amount of data in chunks, it accumulates it upto
8192 (8K) and then gives out No Space in Send buffer.

Do we have to reset the buffer or we can call tcp_output(pcb) so that
the data fargments are sent immediately?

Hugh Reynolds | 3 Feb 12:36 2016

Reconnecting to a device

I’m having trouble reconnecting to a device.

I have a pair of devices that talk to each other. The user sets one as Primary and one as Backup.

The Backup initiates a TCP/IP connection and requests data from the Primary.  The Primary responds.


If the user changes the configuration of the Backup unit to Primary and then back (which might happen during installation of the units) I get the following debug messages when I call error = tcp_bind(pcb, IP_ADDR_ANY, PRIPORT);


[T Unable to Bind: IP = PORT = 09988]

[T Another connection is bound to the same port]


So my question is: How do I successfully close (or unbind) a connection so that a moment later it can be reopened?


I am maintain a port of LWIP 1.3.1 I’m not brave/clever enough to try upgrading.

Init.h says:

#define LWIP_VERSION_MAJOR      1U

#define LWIP_VERSION_MINOR      3U


#define LWIP_VERSION_RC         2U

#define LWIP_RC_RELEASE         255U







This email has been sent from a virus-free computer protected by Avast.
lwip-users mailing list
Gaurav Jain | 3 Feb 06:48 2016

TCP Buffer Size Increment

I have implemented a TCP server running over Microblaze (Virtex 707
FPGA). I am sending it 1 GB data from my client (running on windows
machine). What I want is that the entire data should be received and
stored in my onboard DDR memory, processed and then sent back.
I have set the buffer limit size at the client to 512 bytes. However,
what I am observing is that the first packet the server receives is
512 bytes, but there onwards the packet size is randomly changing and
most of the times being 1460 bytes.

Now from what I  understand, what LWIP does is, if I call tcp_recved()
after receiving a packet successfull, it increases the congestion
window size. I tried the same without tcp_recved() and still the bytes
received size was not limited to 512. Why could this be happening?

Thank You
Matt Jaffa | 1 Feb 18:00 2016

lwip for use in Android VpnService


I have an Android VpnService. And I don’t want to tunnel to a remote server, what I want is to have this lwip
stack handle the request give me a response and then I put that back into the Android interface stack. This
allows me to do filtering on the data outgoing from Android without having to have a remote server. 

Does lwip sound it would be able to do this for me on Android? I have the source compiling on Android right now,
just need to know if it is going to work.

lwip-users mailing list
lwip-users <at>
Peter Ruesch | 28 Jan 14:55 2016

Mainline DHCP server?



is there a lwip mainline dhcp server?

I found something, but I’m wondering why there is no dhcp server in the contrib repository. Would this be something to be added ?



do you know of other lwip related implemenatations? I have read about lwDHCP but this seems to be dead L



Mit freundlichen Grüßen / Best regards


Peter Ruesch

Research Scientist – Embedded Systems



Am Krebsbach 2

79241 Ihringen, Germany

Phone     +49 (7668) 9900 - 1813

Fax          +49 (7668) 9900 – 3923



Hella Gutmann Solutions GmbH * Unternehmensform: Gesellschaft mit beschraenkter Haftung *
Firmensitz: 79241 Ihringen * Eingetragen im Handelsregister: AG Freiburg i.Br., HRB 290194 *
Geschaeftsfuehrer: Alfred Mayer, Bjoern Rietschel * USt-IdNr.: DE142208666
lwip-users mailing list
Kaufman, Michael | 28 Jan 11:30 2016

Delayed ACKs

I am testing lwIP 1.4.1 on Freescale Kinetis K60 tower under CMX OS.

The test sends data in quants of 1272 bytes from the target (lwIP) to PC host over TCP.

Almost immediately a lot of duplicated ACKs and TCP retransmissions pop out and the speed drops drastically.

The same test over UDP works fine, also there is no problem with TCP in other direction (lwIP sends data to PC).

I tried to open debug output for TCP and saw a bunch of “tcp_fasttmr: delayed ACK” messages.

When I add delay of 1ms and more between sending 1272 from PC application the problem disappears.

I started with default lwIP TCP settings and then tried to increase TCP window and segment size, but it doesn’t seem to help.

The capture file attached was with the following configuration:


#define TCP_QUEUE_OOSEQ        1

#define TCP_MSS                          (1500 - 40)

#define TCP_WND                         (20*TCP_MSS)


In the attached capture file is a PC host and is a target running lwIP.


I have not much experience with TCP, so if someone can point me to right direction I will apreciate it.



Michael Kaufman

Attachment (delayed acks.pcap): application/octet-stream, 71 KiB
lwip-users mailing list