Greg Smith | 4 May 22:10 2016

Configuring PPP Options in Version 2.0.0 Beta1


I have been looking forward to the PPP enhancements made in lwIP 2.0.0 Beta1 compared to 1.4.1.  I've added the new version to my project with success and have a few questions about configuring PPP.  I appreciate any help you can give.


1) How can I setup a static IP address when _not_ running in PPP Server mode?  (I have been successful when setting the IP address as second argument of pppapi_listen() when running as a server.)

However, when running as a "client" using pppapi_connect(), the only thing I've found to work is something like:

pppapi_connect(pppPcb, 0);

pppPcb->ipcp_wantoptions.ouraddr = usartPpp.ip_addr.addr;


That seems kludgy and wrong.  And, it does not work if the delay time (second argument of pppapi_connect()) is set >0.  I would like to be able to set a static IP address and have a delay time.  So how do I get something like:

// <-- function call to set static IP address here --> //

pppapi_connect(pppPcb, 10);



2) In lcp_init(), several PPP options are hard-coded, such as negotiating the async map and compression.  Is there a programmatic way to set these options at either compile-time or run-time without directly modifying the lcp_init() function?  If so, how?



Thank you in advance for your help.


-- G

This email has been scanned for email related threats and delivered safely by Mimecast.
For more information please visit
lwip-users mailing list
thiyagu1989 | 3 May 15:14 2016

steps to compile Lwip !

Hello All ,

      I am really struggling to proceed further because open source and
communication stack are new for me .Initially my plan is to configure LwIP
and create a small application to communicate with the Hardware . As a
starter , I know I shouldn't be so jealous :) . So as a first step, I am
planning to compile the downloaded Lwip source in eclipse IDE with my
application but I couldnt find any Makefile. I had seen the some examples
but that are ported to particular MCU. Is there any one created a project
with an easy application and stub Ethernet driver so that it will be easy
for me understand ?
Any kind of help will be very useful for me .
Thanks in Advance .

View this message in context:
Sent from the lwip-users mailing list archive at
Erkan Ersoy | 27 Apr 19:19 2016

Re: raw api multiple connections

My device has both http server (web interface) and http client. While I have multiple listening ports including web interface i didnt have problems but when i try to have connect to remote server i have problem. I wonder if somebody already solved that problem.
lwip-users mailing list
Zhuoran Zhao | 27 Apr 17:10 2016

Port to raspberry pi 3

Hello all, 

I am currently using raspberry pi 3 (running ubuntu MATE) as a reference platform and trying to get some performance data out of it. Besides using TAP/TUN device and wlan bridging to port the lwip, I am wondering is there any open source lwip port for raspberry pi 3 making use of the on board network interface driver? 

Any suggestions/raspberry porting experiences will be helpful, thanks!

Zhuoran Zhao
Computer Engineering Research Center (CERC), University of Texas at Austin, 
Department of Electrical and Computer Engineering, University of Texas at Austin, 
Cellphone: (+1)512-751-1819
Skype: zhuoran.zhao

lwip-users mailing list
Andrey Butok | 27 Apr 15:14 2016

How to contribute to lwIP?



What are the best ways to contribute to lwIP stack project?

I mean bug fixing and adding new features and protocols.

I have requested membership in development of lwIP project, but did not receive any answer.

Does exist other ways or maybe an e-mail address where I may submit patches?



Andrey Butok


lwip-users mailing list
Thiyagu R | 27 Apr 10:41 2016


Hello All ,

   I am very new to embedded world and not familiar with communication stacks.As my research project I started working on configuring Lwip stack for renesas board .
I downloaded the source code and after that I really dont know where and how to start.

1. I am running lwip without RTOS .so going to use RAW api , how difficult to create a sample application using this ?

2.what compiler should I use ? whether lwip can be built as a standalone application ?

Thanks in advance .
lwip-users mailing list
Yanrui Hu | 27 Apr 11:32 2016

lwIP to support NAT

Seems somebody every let lwIP support NAT.
But I do not see the code in 1.4.1.
Could you guys tell me where I can get the code.

Best Regards,

Yanrui Hu

This email may contain or reference confidential information and is intended only for the individual to whom it is addressed.  Please refrain from distributing, disclosing or copying this email and the information contained within unless you are the intended recipient.  If you received this email in error, please notify us at legal-UabDsxdSIm5Wk0Htik3J/ immediately and remove it from your system.
lwip-users mailing list
Erkan Ersoy | 26 Apr 17:51 2016

raw api multiple connections

This is my first mailing list so sorry for not knowing some rules.

I developed a project that a device which is connecting a http server and has a web interface but i am facing a problem that when i get into web interface i have error

Assertion "tcp_input: pcb->next != pcb (before cache)" failed at line 182 in E:\CooCox\CoIDE\workspace\tcp_light\LwIP\core\tcp_in.c

I read that raw api is not thread safe but i noticed that too late so is there a way to do both work in raw api or i have to move whole project to netcon api

Also i had developed another device is listening multiple ports I think i will have problem there too.

I am using STM32f107RCT6 with lan8720

Thank you

lwip-users mailing list
Thiyagu | 25 Apr 16:39 2016

Need help to configure lwip

Hello All ,

   I am very new to embedded and learning to configure lwip stack for my
embedded system . I had downloaded the source code but don't know where to
start . Can anyone please tell me how to configure the downloaded stack ?
any suggestions or good materials will be helpful
Yanrui Hu | 25 Apr 11:07 2016

does lwIP support listen/bind on multiple IP and multiple port?

My senario should be a little special and I want to confirm if it's feasible.
What I have done by using lwIP receive IP packets, and lwIP use lwIP socket API to bind and listen on one specific IP and port. And receive according layer7 data and do something on it. And this already worked.
What I want to do is based on above solution to receive IP packets with different target IP.
That's means lwIP socket API need to bind/listen on multiple IPs and ports (maybe 255 IPs and port rang from 0-65535).
Is this feasible for current lwIP code? assign different IP on one NIC or start several NIC should not a good way.
Will this need raw API? or does that easy if can use raw API?

This email may contain or reference confidential information and is intended only for the individual to whom it is addressed.  Please refrain from distributing, disclosing or copying this email and the information contained within unless you are the intended recipient.  If you received this email in error, please notify us at legal-UabDsxdSIm5Wk0Htik3J/ immediately and remove it from your system.
lwip-users mailing list
Márk Bartha | 22 Apr 00:17 2016

lwIP Ethernet (TCP and UDP) communication slows down and acting weird

Hi all,


I'm developing a MicroBlaze application for Nexys™4 Artix-7 FPGA Board using lwIP 1.4.1 RAW API for Ethernet communication. This is about sending some data from PC to the FPGA that will do sg. and sends back the same amount of data to the PC using TCP communication. Everything is working fine, for example sending 16000 bytes from PC to FPGA and receiving it takes 450 ms, it's fine. And then I am doing a stress test, and repeating this TCP communication continuously will slow down but only after some time (ie. one communication time will increase to 4500 ms) and after some time it will suddenly slow down to 9000 ms and later to 35000 ms etc. I really took a lot of time finding out why this is happening but there are some weird stuff you need to know to answer my question:


Why is this happening and what suggestions do you have on fixing it?


- It's not deterministic when it will slow down. Sometimes it happens after the 6th communication but sometimes it won't happen either after 5 minutes of testing.


- Everything will slow down: accepting TCP connection, receiving packet, sending packet etc. I can see retransmissions and dup ACKs everywhere in the Wireshark.


- This only happens if I am using the FPGA connected to the router. But no, it has no connection with the DHCP, if I use it peer-to-peer connected to my PC, I am also using DHCP server, and it won't slow down.


- I don't think that is about memory leak (or not in the application layer or any leak in the TCP communication). I tried to change the lwIP memory options, everything, but if it happend to run out of memory the FPGA freezed, not slowed down. Increasing memory-related values also didn't fix it.


- It was tested on other FPGA device (same family). Same result.


- I didn't see any special in the lwIP STATS, no errors, no drops at all. Also DEBUG was enabled, nothing special, but if you need some text, I can show you. Actually when TCP debug was enabled nothing happened (the communication was slower of course).


- And here is my favourite one: After days of hard debugging I still thought it was about sg. in connection with the TCP. Meanwhile in the slowdown it had a stable ping response time, and really short, 50 ms. But guess what happened after I stopped the slow TCP communication: the UDP slowed down and became instable. And vice versa: If the TCP communication slows down (to 4500 ms) It became faster (3000 ms) while pinging it in every seconds and will be 700 ms (!) if I send UDP broadcast messages to the router in every 5 ms!


Really thanks for any suggestions. If you need any more information I can provide stat results, wireshark capture or anything about the communication algorithm.




Mark Bartha

lwip-users mailing list