-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Read and customize TCP_WND, TCP_MSS #1392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you put lwip/opt.h in your sketch folder, you should be able to set the TCP_WND in that file. |
@lbernstone sorry , but your solution does not work:
neither does this:
outputs:
The last once is interesting, how does WiFi.h manages to overwrite my #define TCP_MSS 536 Am I missing something here ? |
Not include. Physically copy the opt.h into your sketch directory and modify it there. Arduino IDE will override the lwip/ include. |
@lbernstone are you sure you don't mean lwipopts.h ? Because this code worked:
I put lwipopts.h in the same folder as sketch and modified TCP_MSS to 536 |
If you have a solution, please close the issue. |
This is not 100% solved, can we hold this for couple of days so I can do more tests with Wireshark. I suspect even if I change TCP_MSS define, the real value is hard-coded in the pre-compiled lib, I have to figure out how to change TCP_WND as well. On a related question - if I customized esp-idf , how do a make Arduino IDE to use my esp-idf and not the default supplied one ? (This way I can just use sdkconfig , to set all these settings) ? |
You can use Arduino as IDF component and set these options on IDF This will replace the pre-compiled libs by your IDF code/configs |
Is using Arduino as IDF the only way to do it ? What if I want to keep arduino IDE, is it possible ? A lot of contrubutors on my project would like to stay in Arduino IDE as well and not go to the trouble of configuring esp-idf, etc. Can I just supply them a customized / forked version of this repository ? |
ok, got it =) You can set up Arduino as IDF component just for you, then configure the TCP things on To work on everyone's computer with the new settings, just tell the people to grab your version of |
I think I can do even better. It is not the headers you need to drop in to overrride, but the c files themselves. Download the esp-idf (https://github.com/espressif/esp-idf) and find the .c file(s) where those defines are used. Place THOSE in the sketch folder, and add defines to them for the values you want. I just tested this with sntp.c (which is much easier to see your changes), and got it to refresh every minute instead of every hour. Sorry for forgetting how that override works... |
I am porting some code from ESP8266 to ESP32 core.
What is the proper way to read/change TCP_WND, TCP_MSS from the code ?
The constants TCP_WND, TCP_MSS no longer work on ESP32, but worked fine on ESP8266.
It would be nice if these can be brought back for compatibility.
Thank you.
The text was updated successfully, but these errors were encountered: