Closed smadurange closed 11 months ago
Hello @smadurange Apologies for the delayed response. I have created a patch to fix this issue. Can you please try with the following patch and let me know if it solves the issue for you.
Thanks!
Hello @smadurange Any updates on this issue? Does the patch I shared works for you?
@hmalpani I do not have access to the chip at the moment. I will test this next week and get back to you.
@hmalpani I tried with the patch, now I get the full 48KB file. However, the HTTP_EVENT_ON_DATA
event doesn't seem to stop firing after downloading 48KB. I continue to see the log line I (19828) app: HTTP response size = 48000 bytes
. I'm guessing the rc != ESP_ERR_HTTP_EAGAIN
condition doesn't evaluate to true in the following for
loop in the main function:
for(;;) {
rc = esp_http_client_perform(http_client);
if (rc != ESP_ERR_HTTP_EAGAIN)
break;
vTaskDelay((TickType_t) 100 / portTICK_PERIOD_MS);
}
Hello @smadurange
I think the file you are downloading have size greater than 48KB. In that case, client will continue to download the file. If you want to download only 48KB, you can use partial download. Or you can handle the 48KB downloaded chunk in the event handler. Hope this helps.
Hello @smadurange
I think the file you are downloading have size greater than 48KB. In that case, client will continue to download the file. If you want to download only 48KB, you can use partial download. Or you can handle the 48KB downloaded chunk in the event handler. Hope this helps.
Yes, you are right. Used the wrong file. So, this patch fixes my original issue. Thanks!
Answers checklist.
IDF version.
5.1.1
Espressif SoC revision.
ESP32-D0WD-V3 (revision v3.1)
Operating System used.
Windows
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32 ESP-WROOM-32
Power Supply used.
USB
What is the expected behavior?
The HTTP client should download and read 48000 bytes into the buffer.
What is the actual behavior?
When
is_async
is set to true, the download always stops after 15709 bytes with the errortransport_base: esp_tls_conn_read error, errno=No more processes
. I tried increasing the timeout to a very large number (500000 ms), but the result is the same.Steps to reproduce.
main.c:
Debug Logs.
More Information.
If I set
is_async
tofalse
in the exact same code above, it works (downloads the full 48000-byte file).