User manual

Chapter 4 Configuration
Page 29 Dec 2009
NOCARRIER
AT#FTPCLOSE<cr> (closing FTP connection)
OK
Deactivation of GPRS context if required:
AT#SGACT=1,0<cr>
OK
FTP File download from the server
With the command AT#FTPGET=<filename> , to issued during an FTP connection, opens a data connection and
starts getting a file <filename> from the FTP server.
If the data connection succeeds, a CONNECT indication is sent, otherwise a NO CARRIER indication is sent. The
file is received on the serial port.
Parameter:
<filename> - file name, string type.
NOTE: The command causes an ERROR result code to be returned if no FTP connection has been opened yet.
Example of an FTP file download from 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
AT#FTPCWD="incoming" (change working directory if requiered)
OK
In order to get the list of files on the working directory from the server AT command AT#FTPLIST
should be used.
Downloading FTP file “file.txt” from the server:
AT#FTPGET="file.txt"<cr>
CONNECT
(receive the file)
Data connection will be closed automatically when the file sending is terminated:
NO CARRIER
AT#FTPCLOSE<cr> (closing FTP connection)