4 ftp file download from the server – Rainbow Electronics GM862-QUAD-PY User Manual

Page 33

Advertising
background image





Easy GPRS User Guide

80000ST10028 Rev. 4 - 16/07/08

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

page 33 of 63

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#SGACT=1,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.

Example:

Define PDP contest:
AT+CGDCONT=1,”IP”, "internet.wind.biz"<cr>
OK

Advertising