nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.64k stars 3.12k forks source link

Our LwIP is way out of date #3040

Closed nwf closed 2 years ago

nwf commented 4 years ago

Our LwIP appears to correspond to upstream's effcb90fdf29e6475614c84d327bcf2722f854b6, a commit made in December of 2010, but with some local patches added. We should:

rvalle commented 4 years ago

@nwf did you look into this? I think #2931 could be related. We see sine HTTP requests failing and we can trace it down to different use of TCP segments by different browsers.

nwf commented 4 years ago

Unfortunately, I have looked into it and LwIP straddles the boundary between the open and closed aspects of the SDK. https://github.com/pfalcon/esp-open-sdk/issues/263 provides a reasonable, if depressing, overview of the situation.

https://github.com/d-a-v/esp82xx-nonos-linklayer looks like a sensible shim between the proprietary SDK bits and a more modern LwIP, but I have not had time to look into it much beyond theoretical discussion.

Espressif themselves have done a more modern LwIP, https://github.com/espressif/esp-lwip, but only as part of the IDF/RTOS world, so not us. This might be further indication that living out on the NONOS branch is not a long-term survival strategy for NodeMCU, but I think we have not wanted to make the jump due to the RTOS increasing heap usage (by how much I cannot say; if someone has a link to more information handy, that'd be great).

pjsg commented 3 years ago

To me, the https://github.com/d-a-v/esp82xx-nonos-linklayer repo looks like the right code to start with. I especially like that they have managed to get ipv6 working -- and while I don't expect nodemcu to support it as a result of this migration, it then would at least be feasible -- it is mostly the lua interfaces that would need to be changed.

TerryE commented 3 years ago

I endorse @nwf and @jsqg working on this but I won't have much bandwidth to support this until I have this next tranche of LFS changes in and working. BTW, as I noted elsewhere I've got some yard-works going on at the moment and keeping an eye on this is soaking up a lot of my free time for this coming week.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.