-
Notifications
You must be signed in to change notification settings - Fork 769
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
lwIP http request takes too long at altcp_connect() in TLS example #411
Comments
I also tried (although, as I wroted, this step is passed fast) to connect to ip directly, instead of DNS resolving by hostname, and it still takes same long. |
Also, in the code, I tried to set big (45) as well as small (1-5) values of |
|
I also tried to call Can someone at least tell do they have or not same experience? Maybe it just how things works? |
So, in case of other people have at least few seconds long requests, after weeks of searching, I have only few possible issues:
|
Today I finally managed to make debug work, here is what Pico W outputs (nothing special):
So, of course 99% of time (about 18 seconds) takes |
Today I decided to run python, instead of C, to test http request on the Pico W, and it works fine (takes few seconds). So, it is definetely me doing somehing wrong. Can someone please at least point the direction, where should look to? |
Problem
I successfully build and run a TLS client Example (
picow_tls_client_background
executable) from the GitHub, however a simple http GET request takes about 20 seconds. It does not actually depend on the server response: I tested server, that responds empty string at all, and server with about few kb output - no matter, it takes about 20 seconds to make a request.As the result of debug, I understand, that 99% of the request time takes
altcp_connect
- before that, it takes several miliseconds, and after that, starting from the callback, i.e.tls_client_connected
, it takes about millisecond until the request is made:Tried to solve
I made a reserch, I found that such behaviour, can be caused by lwIP configuration in
lwipopts.h
. It already sounds weird, because it probably should been tested by Raspberry Pi developers, who posted the code on GitHub.So I set
#define MEMP_SANITY_CHECK 0
, setI also tried to reduce
TCP_WND
or\andTCP_MSS
, but any signficant changes produced cmake errors, that something overflows something. However, I reduced a bit that values, without errors at building.However, all of that actions did not change request time - it still the same.
The text was updated successfully, but these errors were encountered: