User manual

605M-D1 GPRS Modem User Manual
man_605M-D1_1.5.doc Page 28
Setting the FTP Transfer Type
With the command AT#FTPTYPE[=<type>] is possible to configure the file transfer type. The command must be
provided during an FTP connection.
Parameter:
<type> - file transfer type:
0 - binary
1 - ASCII
NOTE: The command causes an ERROR result code to be returned if no FTP connection has been
opened yet.
NOTE: If the parameter is omitted then the behaviour of Set command is the same of Read command.
FTP File Transfer to the server
With the command AT#FTPPUT=<filename> , to issued during an FTP connection, is possible to open a data
connection and starts sending <filename> file to the FTP server.
If the data connection succeeds, a CONNECT indication is sent, otherwise a NO CARRIER indication is sent.
Parameter:
<filename> - string type, name under which you choose to save the file on the server (must have the
right extension: es. if the file you’re sending is .txt then the <filename> can be test.txt)
NOTE: use the escape sequence +++ to close the data connection.
NOTE: The command causes an ERROR result code to be returned if no FTP connection has been
opened yet.
Example of an FTP file transfer to the server:
Define PDP contest:
AT+CGDCONT=1,”IP”, "internet.wind.biz"<cr>
OK
GPRS Context Activation, as response gives IP of the module:
AT#SGACT=1,1 <cr>
#SGACT: 193.199.234.255
OK
Opening of FTP connection:
AT#FTPTO=1000<cr> (FTP settings of time-out)
OK
AT#FTPOPEN=”199.188.25.77”,”user”,”pass”,0<cr>
OK
In this case port of FTP server is not specified, which means that it has the default value: 21
AT#FTPTYPE=0<cr> (FTP settings of file type)
OK
FTP file transfer to the server in the file named “file.txt”:
AT#FTPPUT="file.txt"<cr>
CONNECT
(send the file)
+++ (escape sequence +++ to close the data connection)