Download binary files

CrunchyNerdy
Posts: 1
Joined: Fri Oct 31, 2025 8:48 pm

Download binary files

Postby CrunchyNerdy » Fri Oct 31, 2025 9:02 pm

I've am using an ESP32-C6-DevKitC-1 with esp-at. My host is a Nucleo-F767. No issues connecting and performing basic post functions (AT+HTTPCPOST). That part is working great. I am having issues downloading binary files.

I'm using the method here:
https://github.com/espressif/esp-at/blo ... amples.rst

Result are OK when downloading a 1MB file but, when downloading larger files (25MB) I am not getting the whole file. I am missing bytes. Maybe esp-at is missing packets? I've tried increasing the UART baud rate but I am receiving the bytes faster than they are coming in from the esp32. Is there a better way to download binaries using esp-at?

Second issue:
Sometimes the esp32 will not join the AP. It returns an error 3, no AP found. The AT command to scan for AP's (AT+CWLAP) returns OK with no AP's found. After removing power from the devkit, it starts to work again. I tried using AT+RESTORE but that did not help. What could be causing this behavior?

esp-at
Espressif staff
Espressif staff
Posts: 335
Joined: Mon May 09, 2022 3:00 am

Re: Download binary files

Postby esp-at » Thu Nov 13, 2025 11:25 am

Hi @CrunchyNerdy ,

Regarding issue (1): Missing bytes when downloading a 25 MB file

Please check the following possible causes:
  • Verify whether the raw data sent by the server is correct.
  • If UART hardware flow control is not enabled, the receive buffer on the Nucleo-F767 may overflow, causing data loss.
  • Try a comparison test - for example, use a serial tool on your PC to see whether you can successfully receive the entire 25 MB file.
You can also refer to the following document for debugging guidance:
https://docs.espressif.com/projects/esp ... g-examples
Additionally, you can directly download the corresponding ESP32-C6 debug firmware from GitHub Actions to reproduce the issue.
If convenient, please also share the download URL with me so that I can try to reproduce it on my side.

Regarding issue (2): ESP32 sometimes fails to connect to the AP

This is quite unusual. Could it be that the ESP32 is too far from the AP?
In theory, when the ESP32 connects to an AP, it first performs a scan (sending probe requests and receiving probe responses).
This scanning logic is the same as the AT+CWLAP command, so their behaviors should be consistent.

You can refer to the following document and enable AT Wi-Fi Function Debugging to view detailed logs from the debug UART:
https://docs.espressif.com/projects/esp ... _logs.html

If you encounter any difficulties, please let me know. I'll be glad to assist further.

Who is online

Users browsing this forum: No registered users and 1 guest