Pages: [1]   Go Down
Author Topic: Simple Quasi-FTP Server (Work in progress)  (Read 1336 times)
0 Members and 1 Guest are viewing this topic.
Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
I don't usually finish my sentences but when I do I like to
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!  smiley-grin

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!  smiley-grin


Cheers.

Download URL to check out what I have so far:

http://www.dkirwan.ie/Arduino/JavaFileSeverLib.zip
http://www.dkirwan.ie/Arduino/JavaFileSeverLib.hash
« Last Edit: August 10, 2011, 07:22:48 pm by mamolian » Logged

Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
I don't usually finish my sentences but when I do I like to
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Update History:
11/8/11

- 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.
« Last Edit: August 10, 2011, 07:24:06 pm by mamolian » Logged

Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
I don't usually finish my sentences but when I do I like to
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink

Now to get cracking on the project!


Mamo
Logged

Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
I don't usually finish my sentences but when I do I like to
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

waiting for your final work, it's awesome  smiley-wink
Logged

Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
I don't usually finish my sentences but when I do I like to
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

« Last Edit: November 24, 2011, 08:27:11 pm by mamolian » Logged

Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
I don't usually finish my sentences but when I do I like to
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-sad
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
sensors.

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 smiley


Cheers

Mamo



* ardtweeno-mvp-interface.png (30.32 KB, 1200x800 - viewed 6 times.)
Logged

Pages: [1]   Go Up
Jump to: