First of all, thanks to Renzo for all his work.
I have adapted one of Renzo’s examples (Arduino_esp32_SD) to transfer files via FTP between an SD CARD and my PC. When I upload files to the SD CARD, everything works perfectly. However, if I download files from the SD CARD to the PC, the file is created in the destination directory, but it’s empty.
I use the SD / ESP8266WiFi / SimpleFTPServer libraries.
I’ve tried this with several FTP clients and files of different sizes: the target file is always empty.
I should add that I read the file on the SD CARD with this code:
File config_SD = SD.open("config.txt","r");
if (!config_SD.available()) {
while (config_SD.available()){
Serial.println(config_SD.readStringUntil('\n'));
}
}
config_SD.close();
Could you please give me a hint?
Thank you and have a nice day.
Bruno
This topic was modified 5 months, 1 week ago by BrunoPicard.
This topic was modified 5 months, 1 week ago by BrunoPicard.
Hi Renzo,
Thanks for the feedback 🙂
Filezilla is well configured: upload to SD CARD works perfectly. It’s the same using WinFTP.
With the same settings, FTP works with another project that uses flash memory storage.
Hi, the stream.readBytesmust return the number of bytes read, as the documentation specifies, so I think it’s an ESP core temporary bug.
But I check better next.
Thanks for your feedback, RM
Maintaining a repository (or site or forum) is a lot like tending to a garden - it requires constant care and attention to keep it thriving. If you're a skilled gardener (or coder!) and want to help keep our repository blooming, we'd love to have you on board! We're also looking for talented writers and forum moderators to help us grow our community. Interested in joining our team? Don't hesitate to reach out and let us know how you can contribute!
Are you a fan of electronics or programming? Share your knowledge with others, write a simple tutorial or how to make a great project Contact me: share_your_ideas@mischianti.org
The content displayed on this website is protected under a CC BY-NC-ND license. Visitors are prohibited from using, redistributing, or altering any content from this website for commercial purposes, including generating revenue through advertising. Any unauthorized use is a violation of the license terms and legal action may be taken against individuals or entities found to be in violation.
You must also provide the link to the source.