AT+HTTPCPOST timeout

Stephan
Posts: 12
Joined: Tue Aug 27, 2019 2:42 am

AT+HTTPCPOST timeout

Postby Stephan » Wed Mar 16, 2022 2:39 pm

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).

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: AT+HTTPCPOST timeout

Postby ESP_Sun » Fri Mar 18, 2022 2:35 am

You can change

Code: Select all

static const int DEFAULT_TIMEOUT_MS = 5000
in esp-at/esp-idf/components/esp_http_client/esp_http_client.c file.

Code: Select all

static const int DEFAULT_TIMEOUT_MS = 5000
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.

Who is online

Users browsing this forum: No registered users and 19 guests