FTP Server Demo
Mike G
Posts: 2,702
I get emails and PMs from time to time requesting FTP services for the Spinneret and W5200. Honestly, I'm not a fan of file IO on embedded devices. I believe rather strongly that file IO is a waste of resources which could be better handled by a distributed system. But I'll step down from my soapbox.
I decided to dive into the world of FTP and build an FTP server over the weekend. The weekend project turned into 2 weeks with several hair pulling days. Anyways, attached is the result of the last two weeks.
I used FileZilla and Windows command line FTP but mostly FileZilla to build and test the FTP server. A couple of items to note. 1) The FTP demo implements just enough FTP commands to get by with FileZilla. 2) The majority of testing was done in passive mode. An active FTP connection requires network and/or firewall setup.
If you are scratching your head, passive mode tells the client which server IP and port to connect for data transfer. Active connections work the opposite direction where the server connects to an IP and port directed by the client. Active connections can get blocked by firewall. I lost some hair over this one.
That’s all, go have fun.
Oh, and the latest files are always on the Google repo.
I decided to dive into the world of FTP and build an FTP server over the weekend. The weekend project turned into 2 weeks with several hair pulling days. Anyways, attached is the result of the last two weeks.
I used FileZilla and Windows command line FTP but mostly FileZilla to build and test the FTP server. A couple of items to note. 1) The FTP demo implements just enough FTP commands to get by with FileZilla. 2) The majority of testing was done in passive mode. An active FTP connection requires network and/or firewall setup.
If you are scratching your head, passive mode tells the client which server IP and port to connect for data transfer. Active connections work the opposite direction where the server connects to an IP and port directed by the client. Active connections can get blocked by firewall. I lost some hair over this one.
That’s all, go have fun.
Oh, and the latest files are always on the Google repo.
Comments
I'll try to set up one spinneret as the server and my other one as the client. I had to make the client work with passive mode too. And yeah... it sucked figuring it out. The RAW ftp commands are simple once you can find a good reference for them but it was a pain trying to get everything worked out.
I compiled your W5200 FTP server and it works quite well. If I could combine that with the web server in the same module, that would allow me to upload new pages at any time without bringing down the server. I tried just adding the webserver module to it but it came out 800 longs too much. Is thee any duplication that I could eliminate and fit it in? I am a novice at propeller programming so I sure could use the help. I would like to put my website on the module. Http:www.onedir.com
Thanks
Donald