Problem with http client

brazoayeye
Posts: 41
Joined: Sun May 03, 2020 2:37 pm

Problem with http client

Postby brazoayeye » Thu Apr 08, 2021 1:23 pm

Hello,

I'm using latest ESP-IDF and i'm testing an HTTP client. I face two problems:

1. esp_http_client_cleanup(client) causes random crashes, usually on the next esp_http_client_init(&config) but sometimes the cpu simply goes off. Usual error:

Code: Select all

assertion "heap != NULL && "realloc() pointer is outside heap areas"" failed: file "IDF/components/heap/heap_caps.c", line 345, function: heap_caps_realloc
2. When I updated the esp-idf to the latest master branch, I always have an error when connecting. Example:

Code: Select all

I (4611) httpServer: Loading url https://script.google.com/macros/s/AKfyasFQ/exec
E (4681) esp-tls-mbedtls: No server verification option set in esp_tls_cfg_t structure. Check esp_tls API reference
E (4681) esp-tls-mbedtls: Failed to set client configurations
E (4691) esp-tls: create_ssl_handle failed
E (4691) esp-tls: Failed to open new connection
E (4701) TRANSPORT_BASE: Failed to open a new connection
E (4711) HTTP_CLIENT: Connection failed, sock < 0
3. With new code I have a bug with idf.py monitor where it starts trying to connect as I wish to download the code:

Code: Select all

idf.py monitor
Executing action: monitor
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____
/dev/ttyUSB0 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header
No serial ports found. Connect a device, or use '-p PORT' option to set a specific port.
Can someone help?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 146 guests