robo8080 / ESP32_FTPServer_SD

ESP32 FTP Server
GNU Lesser General Public License v3.0
41 stars 14 forks source link

Error retriving files from FTP server. #3

Open andreferreira4564 opened 2 years ago

andreferreira4564 commented 2 years ago

Hi, this is the first issue that I present on GitHub, normally I'm able to troubleshoot everything just by reading others people problems, but in this specific case I wasn't lucky.

I'm building a under water data-logger that is submerged most of the time, only out of the water to retrieve data and charge up the battery.

Was a easier way to retrieve the data from de device I opted by using and ESP32 and program it to be a FTP server, thus using FileZilla the download the files.

It connects great using the code with miner changes, I'm able to upload files to the SD card through FileZilla, but I cannot download or delete files.

The error code is: 550 File oo.txt not found

The most strange situation is the line names and directory that apear in FileZilla on the FPT-Server are incomplete, buy that I mean that the file I was previously trying to download is not oo.txt but foo.txt.

I'm not a programmer, mostly a nooby. I do it on my free time.

The code is mostly unchanged:

include

include

include "ESP32FtpServer.h"

define SD_CS 5

const char ssid = "OCTOPETALA_B"; const char password = "Octopetala2022";

FtpServer ftpSrv; //set #define FTP_DEBUG in ESP32FtpServer.h to see ftp verbose on serial

void setup(void){ Serial.begin(115200); WiFi.begin(ssid, password); Serial.println("");

// Wait for connection while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("Connected to "); Serial.println(ssid); Serial.print("IP address: "); Serial.println(WiFi.localIP());

/////FTP Setup, ensure SD is started before ftp; /////////

if (SD.begin(SD_CS)) { Serial.println("SD opened!"); ftpSrv.begin("esp32","esp32"); //username, password for ftp. set ports in ESP32FtpServer.h (default 21, 50009 for PASV) }
}

void loop(void){ ftpSrv.handleFTP(); //make sure in loop you call handleFTP()!!
}

Thank you in advance, any help is greatly appreciated

KyleMolinari commented 1 year ago

I fixed this issue and made a pull request.

You can also find the code here: https://github.com/KyleMolinari/ESP32_FTPServer_SD