SARA-R4/N4 series - AT Commands Manual
UBX-17003787 - R09
20 FTP
Page 215 of 307
20.2.3 Defined values
Parameter
Type
Description
<op_code>
Number
FTP command request. Allowed values:
•
0: FTP logout; terminates the FTP session by performing a logout.
•
1: FTP login; connects to the FTP server using the parameters of the current FTP
profile (set via
•
2: deletes the file from the FTP server.
•
3: renames the file. This AT command just sends requests to the FTP process.
•
4: retrieves the file from the FTP server.
•
5: stores the file on the FTP server.
•
6: retrieves a file from the FTP server using direct link mode. This command handles
the initial steps of the FTP protocol for retrieving a file; after that it will establish
a transparent end to end communication with the data connection TCP socket via
the serial interface. After the CONNECT result code, the file content will be directly
sent to the serial interface. When the data transfer is completed, the module will
automatically exit from direct link mode (no need to send +++ sequence).
•
7: sends a file to the FTP server using the direct link mode. This command handles
the initial steps of the FTP protocol for sending a file; after that it will establish a
transparent end to end communication with the data connection TCP socket via
the serial interface. After the CONNECT result code, the user can send the file
content via the serial interface. Once finished, the user must wait at least 2 s before
sending the +++ sequence to switch off the direct link mode. This operation may
take a few seconds because the command also handles the final steps of the FTP
protocol
•
8: changes the working directory to the specified one.
•
9: RFU.
•
10: creates a directory on the FTP host.
•
11: removes the directory from the remote FTP server.
•
12: RFU.
•
13: information of a file or a directory. The URC +UUFTPCD returns the information
of the specified file or directory from the FTP server.
•
14: lists the file names in a specified directory. The URC +UUFTPCD returns the list
of the file names received from FTP server. If the directory name is omitted, the list
of the files names of current working directory is requested.
•
100: retrieves the FOTA update file. The downloaded file will not be accessible to the
user. The +UUFTPCR URC will display the MD5 checksum of the downloaded file.
<file_name>
String
File name to be deleted/renamed from the FTP host. For the limit of the length of the
string, see
<new_file_name>
String
New file name. For the limit of the length of the string, see
.
<remote_file_name> String
Remote file name to be retrieved from the FTP host or stored in it. The maximum
parameter length is 256 characters.
<local_file_name>
String
Local file name (module file system) text string to be stored/sent on the file system.
For the limit of the length of the string, see the
<retrieving_mode>
Number
Allowed values:
•
0 (default value): the file is retrieved from beginning.
•
1: restart the data retrieving from the last data received during the previous
download interrupted due to error.
<number_of_byte>
Number
Represents the number of bytes already sent to the FTP server or received from it.
•
During a file retrieval the server writes the file from the offset indicated with this
parameter.
•
During a file storing the server sends the data from the value indicated with this
parameter.
<directory_name>
String
Directory name on the FTP server. For the limit of the length of the string, see
<file_directory_
name>
String
Path file/directory name to be listed. If not specified, the current directory list is
requested. For the limit of the length of the string, see
•
<param1> optional parameter; the text string of the path (file or directory) to be
name listed. If not specified, the list of the files names of current working directory
is requested.
<ftp_data_len>
Number
Amount of data in bytes