FTP client

Hello everyone! I am new to this site and this is my first post.
I have an Arduino due with an Ethernet shield.
I wold like to upload periodically a text file (a log file) to a ftp server.
I've searched the internet without success.
Here (Arduino Playground - HomePage) I found code that seems to be right for me but I encountered a problem:
When I compile the code I get the following error messages :

Files.ino: In function 'void setup()':
Files:41: error: 'PSTR' was not declared in this scope
Files:47: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void loop()':
Files:58: error: 'PSTR' was not declared in this scope
Files:59: error: 'PSTR' was not declared in this scope
Files.ino: In function 'byte doFTP()':
Files:82: error: 'PSTR' was not declared in this scope
Files:95: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void efail()':
Files:256: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void readSD()':
Files:278: error: 'PSTR' was not declared in this scope

Does anybody know the meaning of this error and how to fix it?

Thanks in advance
cheers

Italian version :
Un saluto a tutti; Sono un neofita e questo e' il mio primo post ...
Ho un Arduino due ed un Ethernet shield.
Vorrei avere la possibilita' di fare un upload periodico di un file testuale (contenente dei log) su un server ftp in rete.
Ho fatto delle ricerche e non ho trovato molto in merito.
Qui (Arduino Playground - HomePage) ho trovato il codice che sembra fare al caso mio, ma ho un problema.
Quando compilo ho i seguenti errori :

Files.ino: In function 'void setup()':
Files:41: error: 'PSTR' was not declared in this scope
Files:47: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void loop()':
Files:58: error: 'PSTR' was not declared in this scope
Files:59: error: 'PSTR' was not declared in this scope
Files.ino: In function 'byte doFTP()':
Files:82: error: 'PSTR' was not declared in this scope
Files:95: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void efail()':
Files:256: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void readSD()':
Files:278: error: 'PSTR' was not declared in this scope

Mi sapete spiegare il significato di questo errore e come risolverlo?

Vi ringrazio in anticipo
Khufu

My bad. Try it downloading the code again from the playground. The problem was client.write() and the F() macro do not get along. I changed them to client.print() and client.println().

Thank you for your reply SurferTim:

Same problem :

Files.ino: In function 'void setup()':
Files:41: error: 'PSTR' was not declared in this scope
Files:47: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void loop()':
Files:58: error: 'PSTR' was not declared in this scope
Files:59: error: 'PSTR' was not declared in this scope
Files.ino: In function 'byte doFTP()':
Files:82: error: 'PSTR' was not declared in this scope
Files:95: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void efail()':
Files:256: error: 'PSTR' was not declared in this scope
Files.ino: In function 'void readSD()':
Files:278: error: 'PSTR' was not declared in this scope

You are using a Due? I have not tried that board with that code. I guess you will be the first.

It seems to be complaining about the Serial.println(F()) calls. Try removing the F() macro from the Serial functions on those line numbers. See if that stops the error. Like this for line 41

Serial.println("SD init fail");

SurferTim,
I have the Arduino Due!
I removed all Serial.println functions (//commented) but the problem persists also for the client.println and client.print functions.

cheers

Then do the same with them. Remove the F() macro. I guess the Due doesn't like that.

So apparently there is no solution so far.
If ftp is not available how can I send a text file to an LAMP server ?

I don't know about the Due and what would cause that error. There are no errors thrown on any other board I tried compiling for. ??

Maybe you should go to the Due section and post a question there why that function call would create a compiler error.

OK, SurferTim I will follow your advice.

many thanks for now.

cheers

Sorry again SurferTim,
I have just compiled and uploaded the example called ChatServer and it works.
It uses same fuctions like :
Serial.print
Serial.println
client.println
client.available
client.read
server.write(thisChar);

Any idea ???