espressif / esp-at

AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266
Apache License 2.0
910 stars 829 forks source link

AT+HTTPCGET binary mode problem with newlines #860

Closed ringtailsoftware closed 3 months ago

ringtailsoftware commented 3 months ago

Answers checklist.

General issue report

Using the method from https://github.com/espressif/esp-at/blob/84b025894debf0d3fb025d245c7377f45328de44/docs/en/AT_Command_Examples/at_msg_resp_fmt_ctrl_examples.rst I am attempting to download a binary file.

It appears to work for some files and not others and it seems that newline characters in the middle of a file cause the transfer to end early. Is there a way to disable whatever it's doing with newlines and get a true binary passthrough of data?

I have a webserver with a file containing the following 9 bytes 0d0a0d0a0d0a0a0d0a ("\r\n\r\n\r\n\n\r\n"). On downloading I get:

0d0a
0d0a
0d0a4f4b0d0a ("\r\nOK\r\n")

(For more information see my forum post at https://www.esp32.com/viewtopic.php?f=42&t=38650&p=135583#p135583)

ustccw commented 3 months ago

@ringtailsoftware Thanks for your report! i'll fix it within one week.

ustccw commented 3 months ago

@ringtailsoftware Hello, this issue should get fixed on master branch, could you please git pull the code and have a test.

ringtailsoftware commented 3 months ago

Thank you. This is working in all of my tests so far.

ustccw commented 3 months ago

Glad to hear that! If you have any other questions or need further assistance, please feel free to let us know.