Trying to reach a server that needs about 8 seconds to reply, but AT+HTTPCPOST always returns with "SEND FAIL" after 5 seconds already. How to change this timeout with AT+ commands??
We cannot adjust the timing somewhere in a .h file, because it's about units in the field, not in the lab.
(when we address the server "manually" with AT TCP/IP commands, the answer is well received, after 8 to 10 seconds).
AT+HTTPCPOST timeout
Re: AT+HTTPCPOST timeout
You can change in esp-at/esp-idf/components/esp_http_client/esp_http_client.c file. This configuration is to set the timeout time of the AT+HTTPCPOST command.
If you don't want to change the source code, you can make an HTTP package and use AT+CIPSTART and AT+CIPSEND commands instead of AT+HTTPCPOST command.
Code: Select all
static const int DEFAULT_TIMEOUT_MS = 5000
Code: Select all
static const int DEFAULT_TIMEOUT_MS = 5000
If you don't want to change the source code, you can make an HTTP package and use AT+CIPSTART and AT+CIPSEND commands instead of AT+HTTPCPOST command.
Who is online
Users browsing this forum: No registered users and 44 guests