Go Down

Topic: Simple Quasi-FTP Server (Work in progress) (Read 2379 times) previous topic - next topic


Jul 25, 2011, 04:13 pm Last Edit: Aug 11, 2011, 02:22 am by mamolian Reason: 1
Hi folks, new user to Arduino here.

I've recently ordered an Arduino Mega 1280 on ebay with a basic starter kit, and hope to pick up a suitable Ethernet shield in the very near future also. This little bit of hardware has got me fascinated so far, I've been dreaming up projects to use it for ever since I clicked confirm purchase on ebay!  :D

When I went searching for methods of getting data off the SD card on the Ethernet shield, the only options I've so far discovered would be through a mini web server running on the board? Ideally I'd prefer an FTP style method of getting the files, so decided to attempt to write my own solution for this problem.

As the board isn't in my possession yet, I've instead been working on the server code which I'll be running on my laptop that the Arduino will connect to over Ethernet.  I have the bare bones protocol written which listens for TCP connections on a port, once a client connects the server sends an authentication challenge, should the client pass, its allowed then to make a request to send binary data.  The server then saves the data to disk for processing elsewhere.

I've tested it using PuTTY manually and it appears to work nicely, I guess I'll have to wait for the Arduino to arrive, to begin working with the SD card and handling the TCP connections and all that on the client side, I'll be sure to make my work available to anyone interested.

Comments and suggestions are most welcome!  :D


Download URL to check out what I have so far:



Jul 26, 2011, 12:48 am Last Edit: Aug 11, 2011, 02:24 am by mamolian Reason: 1
Update History:

- Added ability to change the port number the server runs on.

- Completely reworked the method of program flow control.  Table in the readme should explain everything.


Had a freakout situation earlier, my W5100 Ethernet Shield arrived from Hong Kong! But any time I connected it to the Arduino, the Arduino would be inaccessible
through the USB connection, and the little LCD screen I have attached would stop working.

Turns out the USB port on my laptop can't supply enough power to run everything. I've since found a nice 12V 2000mA power supply which has resolved the issue ;)

Now to get cracking on the project!



Have the Arduino communicating with the PC over ethernet using the basic sketches with the Ethernet Lib, but I've been running into issues accessing SD cards.
I'll keep trying! In the mean time I'll be working on a basic sketch which does not require the SD card, I'll basically have it just sending a String to be saved in a text file on the
server's end.

Updated the files anyway to the latest codebase, and rewrote the readme accompanying it.

Any comments/suggestions welcome!


waiting for your final work, it's awesome  ;)


Nov 24, 2011, 01:51 pm Last Edit: Nov 25, 2011, 02:27 am by mamolian Reason: 1
Been snowed under with assignments and study at University, but I've not given up or forgotten about this project don't worry !
After Christmas I'll have the majority of 2012 (first 9 months at least) to work on it some more.

I've hit a few snags which I've not been able to overcome so far, this latest being the data I'm sending from my test client is being received
but is not the values expected, but once this issue is resolved, I'll upload the first proper working example of this project.

Now back to Uni work!  :smiley-eek-blue:

-edit, funnily enough I've been working on a Uni assignment, and have come across a similar problem to the one where I am stumped on this project..  Its an issue with character sets, I'm going to have to look into this a lot more to figure out how to be working with the right character encoding on both the server and client ends.


Hi folks !

It's been an age, since I updated this project, due to running into some snags I was just simply unable to overcome to date. I've been
having issues with the Ethernet shield I own, it appears to be malfunctioning when I attempt to run it in conjunction with an LCD display,
so I'm guessing its not getting enough power to operate at the same time as the LCD. At this stage I've all but given up on it sadly :(
I may possibly revisit at some point who knows.

On a brighter note, I've since purchased 2 Arduino FIO boards, 3 x 2mW XBee 802.15.4 radios and a couple of barometric pressure/temperature

I was also lucky enough to get a Raspberry PI in the first 4,000 batch, and have been developing a big brother version to this Quasi FTP project
using all these components for a final year project at University.

I'm using the Raspberry Pi to host a Ruby powered HTTP REST API application which listens for data being POSTED to the API from another application
listening to data received over the XBee serial interface which is receiving data broadcast from the Arduino FIO's which have XBees configured in a mesh
network configuration.

The system will be released on a non commercial CC BY-NC 3.0 licence on https://github.com/davidkirwan/ardtweeno in the coming weeks/days.

Feel free to check it out and help test/debug :)



Go Up