WM620 AT
Command Manual
Copyright © Neoway Technology Co., Ltd
104
Remarks
N/A
13.3 Downloading Data from the FTP Server: +FTPGET
Description
To download data from the FTP server
Format
AT+FTPGET=<dir&filename>,<type>,<Content or Info> [,<offset>,<len>]<CR>
Parameter
<Dir&filename>: Path and name of the file to be read
(Note: The file directory under the FTP root directory)
<Type>: File transfer mode
1: ASCII
2: Binary
<Content or Info>: File content or file (or specified directory) information
1: Obtain the file content
2: Obtain the information of the file or the specified path
<offset>: The down load offset
<len>: The length of the download data
If the value is 0, it indicates the size of the download file minus the offset.
Return Value
+FTPGET: Error
: The format of the AT command is incorrect
+FTPGET:Error Not Login
: The user has not logged in to the FTP server.
+FTPGET:AT Busy
: Last FTP AT command has not been executed
completely.
+FTPGET: Error!TimeOut
: Some failure is caused by download timeout
(timeout period is 30 seconds) and the module does not receive data from the
FTP server within 30 seconds.
+FTPGET:<length>,<data>
:
<length>
indicates the data length;
<data>
indicates the data content.
+FTPGET:OK.total length is <n>
: The module reads data successfully and
the data length is
n
.
+FTP:Server Data Link Disconnect
: The link is disconnected. It will be
connected automatically when the module downloads or uploads data again.
+FTP:Server Control Link Disconnect
:
The control link is disconnected
because you do not use the link for long time or for other causes. The module
returns this message whenever the control link is disconnected. You need to
connect to the FTP server again by running the
AT+FTPLOGIN
command.
Example
AT+FTPGET=,1,2
+FTPGET:446,drw-rw-rw- 1 user group 0 Apr 14
15:55 .
Obtain
information
in the root