You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using HTTPClient for HTTPS 1.1 communication with a server which operates on HTTP2. I now have a problem of timeout at the client end running on ESP32. The device communicates well with the server sometimes even for 4 hrs and sometime for just 0.5 hr before it times out. Till it times out I get 200 responses from the server for all the sensor data sent at a frequency of 0.5 sec. Whenever it times out on a response, I close the HTTP connection using http.end() and re-negotiate the connection with a delay of 50 sec. It gives a different error this time. I keep re-negotiating the connection every time with a delay, but get the same error. I tried increasing the time for time out to 50 sec, but didnt help. Below is the debug message from the serial monitor.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
[V][ssl_client.cpp:279] send_ssl_data(): Writing HTTP request...
[W][HTTPClient.cpp:1332] returnError(): error(-11): read Timeout
[D][HTTPClient.cpp:1334] returnError(): tcp stop
[V][ssl_client.cpp:248] stop_ssl_socket(): Cleaning SSL connection.
[HTTPClient.cpp:383] disconnect(): tcp is closed
[V][HTTPClient.cpp:235] beginInternal(): url: https://xyz.com
[D][HTTPClient.cpp:276] beginInternal(): host: xyz.com port: 443 url: /api/device
[V][ssl_client.cpp:56] start_ssl_client(): Free internal heap before TLS 249660
[V][ssl_client.cpp:58] start_ssl_client(): Starting socket
[V][ssl_client.cpp:93] start_ssl_client(): Seeding the random number generator
[V][ssl_client.cpp:102] start_ssl_client(): Setting up the SSL/TLS structure...
[V][ssl_client.cpp:115] start_ssl_client(): Loading CA cert
[E][ssl_client.cpp:33] _handle_error(): [start_ssl_client():122]: (-8576) X509 - The CRT/CRL/CSR format is invalid, e.g. different type expected
[E][WiFiClientSecure.cpp:132] connect(): start_ssl_client: -8576
[V][ssl_client.cpp:248] stop_ssl_socket(): Cleaning SSL connection.
[D][HTTPClient.cpp:1029] connect(): failed connect to xyz.com:443
[W][HTTPClient.cpp:1332] returnError(): error(-1): connection refused
Please let me know how to solve this problem of time out. Is it because of difference in versions, ESP operating on HTTP 1.1 and Server on HTTP2?
Regards,
Ranganath
Beta Was this translation helpful? Give feedback.
All reactions