4 ftp file download from the server – Telit Wireless Solutions Easy GPRS User Manual

Page 25

Advertising
background image





Easy GPRS User Guide

80000ST10028 Rev. 1 - 14/03/07

Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved

page 25 of 37


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)

NOCARRIER

AT#FTPCLOSE<cr>

(closing FTP connection)

OK

Deactivation of GPRS context if required:
AT#GPRS=0<cr>
OK

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




Advertising