Page 1 of 2

Please open source the LWIP implementation for ESP8266

Posted: Sat Aug 01, 2015 1:06 am
by owendelong
Currently Espressif does not document their low-level interface and hides this in a binary LWIP library that ships as part of their SDK.

For a variety of reasons, not the least of which is the desire to reduce the memory footprint by shedding unneeded features in some applications, it would be better if ESP would release the source for this library and/or document the low-level interfaces required to implement an alternative.

This would benefit the community obviously.

However, it would also benefit Espressif as they would then be able to tap into a multitude of developers that would contribute improvements and additional capabilities to the library over time and it would simplify the process of keeping the ESP8266 version of LWIP library up to date as well.

Re: Please open source the LWIP implementation for ESP8266

Posted: Wed Aug 12, 2015 5:40 pm
by joostn
+1 !

At the least it would be great if you would give developers the choice between espconn or using the native lwip interface.

Re: Please open source the LWIP implementation for ESP8266

Posted: Wed Aug 12, 2015 6:07 pm
by eriksl
+1

Also it would give the opportunity to leave out parts, freeing up valuable iram space and also determine yourself which parts need to be in iram (in my case: none).

Re: Please open source the LWIP implementation for ESP8266

Posted: Wed Aug 12, 2015 7:26 pm
by rudi
[x] vote +1

gives the developer more freedom of choice in the art & type of application

Re: Please open source the LWIP implementation for ESP8266

Posted: Fri Aug 14, 2015 11:34 am
by datltq
+1

Though I really want no binary blobs.

Re: Please open source the LWIP implementation for ESP8266

Posted: Fri Aug 14, 2015 12:41 pm
by tve
Looks like our wish has been granted: viewtopic.php?p=3221
Sweeeeet!

Re: Please open source the LWIP implementation for ESP8266

Posted: Fri Aug 14, 2015 4:46 pm
by eriksl
Interesting. Note the bold entry. There are several more of this.

$ fgrep MEMP_NUM_TCP_PCB **/* 2>| /dev/null | fgrep -v MEMP_NUM_TCP_PCB_LISTEN
include/lwip/memp_std.h:LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB, sizeof(struct tcp_pcb), "TCP_PCB", DMEM_ATTR)
include/lwip/opt.h: * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
include/lwip/opt.h:#ifndef MEMP_NUM_TCP_PCB
include/lwip/opt.h:#define MEMP_NUM_TCP_PCB 5
include/lwipopts.h: * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
include/lwipopts.h:#ifndef MEMP_NUM_TCP_PCB
include/lwipopts.h:#define MEMP_NUM_TCP_PCB (*(volatile uint32*)0x600011FC)
lwip/app/espconn.c: tcp_num = MEMP_NUM_TCP_PCB;
lwip/app/espconn.c: MEMP_NUM_TCP_PCB = num;
lwip/app/espconn.c: if ((espconn == NULL) || (num > MEMP_NUM_TCP_PCB) || (espconn->type == ESPCONN_UDP))
lwip/app/espconn_tcp.c: if (num_tcp_fin == MEMP_NUM_TCP_PCB)
lwip/app/espconn_tcp.c: if (num_tcp_fin == MEMP_NUM_TCP_PCB)
lwip/app/espconn_tcp.c: if (num_tcp_fin == MEMP_NUM_TCP_PCB){
lwip/app/espconn_tcp.c: pserver->count_opt = MEMP_NUM_TCP_PCB;
lwip/core/init.c://#if (LWIP_TCP && (MEMP_NUM_TCP_PCB<=0))
lwip/core/init.c:// #error "If you want to use TCP, you have to define MEMP_NUM_TCP_PCB>=1 in your lwipopts.h"
lwip/core/init.c: MEMP_NUM_TCP_PCB = 5;
lwip/core/tcp_in.c: if (active_pcb_num == MEMP_NUM_TCP_PCB){

Re: Please open source the LWIP implementation for ESP8266

Posted: Fri Aug 14, 2015 5:27 pm
by eriksl
It's still a mystery how the lwip is invoked. It looks like the packets are injected and polled from, from one of closed source libraries :?

Re: Please open source the LWIP implementation for ESP8266

Posted: Sat Aug 15, 2015 5:33 pm
by rudi
eriksl wrote:...from one of closed source libraries :?



;-)

nice.

i am sure, we will get the rest open from espressif, there are perhabs more 'injections' like this.
they form a chain. We listen to each link and apply for open source for this each too step by step.

@espressif
thank you for the begin to open this.

best wishes
rudi ;-)

Re: Please open source the LWIP implementation for ESP8266

Posted: Sat Aug 15, 2015 6:00 pm
by joostn
This was just what I needed, thanks Espressif!