Pages: [1]   Go Down
Author Topic: FTP conection to arduino SD card via ethernet  (Read 997 times)
0 Members and 1 Guest are viewing this topic.
Sarajevo
Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

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

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

* first_code.ino (5.52 KB - downloaded 11 times.)
« Last Edit: August 01, 2013, 05:20:02 am by nino90 » Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

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

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

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Offline Offline
Jr. Member
**
Karma: 1
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: