Page 1 of 1
A FTP server for under 70 $
Posted: Fri Apr 17, 2015 6:00 pm
by gallegojm
This is what cost a STM32-E407 and a 32 GB microSD
I adapt my
ftp server for Arduino Due (see my
post on Arduino forum) to the STM32-E407 and ChibiOS
The software is on
Github and is developed under ChibiStudio and chibios 2.6.7
This is my first project with ChibiOS so please be indulgent ...
User name is
STM32-E407 and password is
chibi. They are defined in
ftps/ftps.h with other parameters
I use dhcp so
LWIP_DHCP is defined to
1 in file
lwipthread.cTested with the following clients: FTP Rush and Filezilla under windows, gFTP and Filezilla under linux
The following commands are implemented:
USER, PASS
CDUP, CWD, QUIT
MODE, STRU, TYPE
PASV, PORT
DELE
LIST, MLSD, NLST
NOOP, PWD
RETR, STOR
MKD, RMD
RNTO, RNFR
FEAT, SIZE
SITE FREE
There are more details in file
readme.txtI would appreciate remarks, suggestions, testing, ...
Re: A FTP server for under 70 $
Posted: Tue Apr 21, 2015 6:30 pm
by Giovanni
Very interesting project I must say

Probably it would be a good idea to port to ChibiOS 3.0 and put it as demo in the community repository.
Giovanni
Re: A FTP server for under 70 $
Posted: Thu Apr 30, 2015 5:17 am
by gallegojm
Thank you for your interest!
put it as demo
Well, for this, I must first polish the code and make the server capable of
supporting multiple clients.
It is for this purpose that I worked on the web server presented in another post, because I think it is simpler and easier for me to concentrate on the multithreading aspect.I would like to know if my approach is correct.
port to ChibiOS 3.0
I have two questions about ChibiOS 3.0:
- is it actually stable enough?
- is there a post that resume the benefits and progress against version 2.6?
Re: A FTP server for under 70 $
Posted: Thu Apr 30, 2015 9:04 am
by Giovanni
Hi,
ChibiOS 3.0 has been stable enough for one year now. It is generally faster and includes new features (tickless mode, statistics and other things).
This a work document but still valid:
http://www.chibios.org/dokuwiki/doku.ph ... _and_ideasGiovanni
FTP server is now multi clients
Posted: Thu Jun 25, 2015 8:25 pm
by gallegojm
I put in
GitHub the new version of my FtpServer.
It is compiled with ChibiOS version 3.0.0p5 and support multiple simultaneous clients.
Since a couple of weeks, I use it to store the images produced by IP cameras connected to the same local network.
The uploading and downloading speed is more than adequate for this application.
The number of simultaneous clients is defined by
FTP_NBR_CLIENTS in file
ftps.hI set it to 5 for my own use ( 4 cameras and a client to download the images) but it can be increased.
Some definitions in
lwipopts.h depend on the number of clients. The details are in the file
readme.txtI tested with the following clients:
on Windows: FTP Rush, Filezilla
on Ubuntu: gFTP, Filezilla
on Android: AndFTP
IP cameras: Panasonic BLC-131, Trendnet TV-IP121W, D-Link DCS-930L
Please feel free to download, test and make remarks...
FTP server now use RTC to timestamp files
Posted: Mon Aug 03, 2015 11:09 pm
by gallegojm
A new version is on
GitHub.
The server now use the
RTC clock to timestamp the uploaded files.
A
NTP client is used to synchronize the clock.
A
logger (using ChibiOS Messages) allows recording of events or statistics. It is useful to monitor the clock synchronization which is done every 24 hours.
You must create in the SD card the subdirectory
/Log where are stored those files.
A new command:
STAT (Status) returns some data from the server, especially the date and time.
It is compiled with
ChibiOS 3.0Configuration of the local IP and Mac address is done in main.cpp thanks to the patch
lwip_bindings.zip uploaded by
steved at:
download/file.php?id=863
Re: A FTP server for under 70 $
Posted: Tue Apr 19, 2016 5:07 am
by DeusExMachina
Interesting project! I wish I had time to check it

Re: A FTP server for under 70 $
Posted: Mon May 02, 2016 6:14 pm
by gallegojm
Hi DeusExMachina
Thank you for your interest!
Yesterday, Venezuela, where I am living, changed time zone, returning to what it was in 2007. So I have to recompile the code of my server, as time zone is hard coded.
The server was working without any interruption since the beginning of November of last year.
I took the opportunity to refresh the
Github repository.
The other, and more interesting change since the last update, concerns the frequency of the RTC clock. It is now recalibrated each time a NTP server is called, using the register
RTC_CALR of the STM32-E407 microcontroller. For monitoring purpose, the value written to this register is now stored in the file
\Log\rtc.log
Re: A FTP server for under 70 $
Posted: Wed Apr 12, 2017 9:20 am
by franek.bmw
Hello,
I tested FTP and I have a problem. Everything works except transmission of .jpg files. There are always some problem and the transmitted image is very distorted. Do you know what could be the reason for this? With txt files all is correct.
Could anyone help me?
Best regards,
Franek
Re: A FTP server for under 70 $
Posted: Wed Apr 12, 2017 10:24 am
by Giovanni
If I remember well FTP has a binary mode, probably you have to choose that in your client.
Giovanni