Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

I can't upload or edit files in FTP Server #20

Open
rcrIbercomp opened this issue Jun 29, 2023 · 1 comment
Open

I can't upload or edit files in FTP Server #20

rcrIbercomp opened this issue Jun 29, 2023 · 1 comment

Comments

@rcrIbercomp
Copy link

Hi,
I am testing the W5x00_ftp_server.c in a W5100S-EVB-Pico, and I can't upload files to the FTP Server or edit the ones that exists there.

directorios

I can build the example, burn it on the RPI and connect through FTP with WinSCP. I can also download the test.txt file in my computer.

This is the trace I get:
--> When Download file:
download

--> When upload file:
upload

--> When creating file in the FTP Server:
newFile

Also when trying to edit the new file in the FTP Server, I get connection error.

Any idea of what is happening?

Kind Regards

@keitarusm
Copy link

I hope you already figured this out, but the FTP example provided doesn't do anything with files, it's only the comms interface. The actual code for the FTP server in ftpd.c, which is part of the ioLibrary_Driver repo and not the RP2040-HAT-C repo, shows this on or about line 295 where you'll see that the response given to the FTP client is hardcoded in.
Similarly, when you try and store a file the server code will dutifully listen to the transmission, storing it in a buffer temporarily, responding to the client that the file was successfully transferred(regardless of conditions). It will respond with the same buffer it used to 'listen' with, now having overwritten the first bytes with the response string.

tldr; There is no file handling in the example, it is left as an exercise for the reader.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants