Go Down

Topic: FTP conection to arduino SD card via ethernet (Read 1 time) previous topic - next topic

nino90

How can i make my arduino mega withe Ethernet shield a ftp server. I have on the SD txt files stored and updated the whole time. Now i want to make a program in visual C++ or another language, and to have access to the files on the SD card so i can use them in the program. I was thinking i need to make an FTP server so i can connect to the card like with Total Comander, enter username and password and dowload the wished files. Maybe unable them to be removed only read or something like that. I have been loking at the ethernet examples in arduino program but couldnt find anything useful.

johnwasser

I would start with one of the Server examples and a description of the FTP protocol.

To simplify you may want to start with TinyFTP.

Maybe these sources will help:
http://sourceforge.net/projects/tinyftp/
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

nino90

i dont understand tinyFTP, first i tough it was an arduinio library and added it so, but couldn't find any examples code.
How to use tinyFTP?

SurferTim

If you are going to download files from the Arduino, maybe http protocol would be easier. You can download most types of files using that.

FTP protocol, especially the server end, is a bit more complex. It requires two sockets, and is more difficult to program.

nino90

#4
Aug 01, 2013, 12:11 pm Last Edit: Aug 01, 2013, 12:20 pm by nino90 Reason: 1
aha, so can u give me an examle code how to do that please?
I have a delay(1000) in a loop in the void loop. I think maybe it could make problems for webserver
I attached my code in this post

SurferTim

I can give you a link to my server code. You should be able to modify it to download other file types besides html docs.
http://playground.arduino.cc/Code/WebServerST

You should look up html Content-Type and Content-Length header values. Those will determine what the client thinks the file type an length is.

nino90

i dont understand this code what it does, it gives me to enter something in two colones :S

I have a lot of folders and files on my SD card, and i want to be just able to get all of the folders and files the same as they are on the sd on mu computer via internet connection.

nino90

ok, how about this,
I just want to be able to download all files and folders from the sd card via internet to my pc and to be able to errae everytnihg from the card?
Is that posible , and how what libary to use ect ?

SurferTim

What operating system do you have on the PC? If you want to use FTP, the PC must be the FTP server. With Windows XP Pro, you can install a http and ftp server in your control panel. Select "Add or Remove Programs" and select "Add/Remove Windows Components". Select IIS and install. FTP is one of the services under IIS.

nino90

How i understande that, u mean to make a FTP server on my PC ? I use windows 7.
I need to make it able everyone on the internet to get acces on my flles on SD card, and some people e
enable to errase files. Maybe there is another way than ftp? I dont know :S
I hoped i could just pres one button on a program on Windows and it connects to the SD card and download
the files.

gallegojm

I have a ftp server operating on Arduino, though still incomplete.
Take a look at http://forum.arduino.cc/index.php?topic=182382.0

Go Up