Closed d-a-v closed 9 years ago
Thanks, merging. Do you think you can give it a try and move on to upstream lwip? There's a ready to use antares/src/contrib/lwip/kcnf boilerplate for all configuration options.
@d-a-v Yes, and please do a git rebase -i instead of merging master into your tree. Merging bloats git history a lot.
Sorry about rebase. I tried but I messed things up with my github branched fork (pull rebase origin then push-pull from my branch) so I decided to go on with no more rebase on this branch.
About upstream lwip. Yes I'm dived into it. For now I have a perl script that removes all chinese comments so to get a proper/minimal patch between official 1.4.0 and espressif/our version. So far I've only checked the diff in the lwip/core directory and there are not much changes. I suspect these changes do not all come from espressif because of long-good-english comments that are not in the original 1.4.0_STABLE version available on savannah. I'll continue deeper and try to automate 1.4.0depatch -> 1.5repatch. I can try to provide the diff scripts into the repo (src/contrib?) if requested.
There's this project https://github.com/CHERTS/esp8266-liblwip Some things are already done there. But after giving it a quick look - Espressif's changes turned out to be more than just adding ICACHE_FLASH_ATTR to all functions. Meanwhile, I dived into the junk and found a nice stm32f4 discovery and a nice ENC28J60 lan module. Should be enough to test lwip with a different architecture.
Oops, sorry. wrong link. Forum Thread: http://www.esp8266.com/viewtopic.php?f=9&t=1492 github: https://github.com/kadamski/esp-lwip
Thanks for the link, it is very interesting.
I took another approach (before reading the links), because I have found something close to the very version of LWIP espressif took as a start for their own version (it is not exactly lwip-1.4.0). I am now:
Once there, I think we can consider using the work of Kadamski's repo.
Still in the path to make a very stable serial<->wifi passthrough, (and after several headbanging and some broken keyboards) this is a tcp fix again.
For testing purpose, a new optional service called "echo" is available. It simply sends what is received. In src/contrib, a program tcpechotester.c is available to fight with this echo service. in STA mode I sustained 1.6Mbits/s for several minutes on some good WLAN conditions.
This is working only because I modified TCP_MSS (1024) and TCP_WND (2_MSS) in lwipopts.h to some "good" values [good = working :)]. It does not work well (but not worse than the previous versions) with original espressifs values 1460 / 4_MSS.
Also in src/contrib/ a text file with a short tcpdump trace showing how lwip-1.4.0 is not dealing well.
The next step is to try and update lwip (which is hardwork) to check if things become more stable with any value for MSS and WND.