User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
21FTP
Page 258 of 401
Type Syntax Response Example
Set AT+UFTPC=6,<remote_file_name>[,
<number_of_byte>]
OK AT+UFTPC=6,"data.zip",30
OK
Send a file to the FTP server using the direct link mode
Set AT+UFTPC=7,<remote_file_name>[,
<number_of_byte>]
OK AT+UFTPC=7,"data.zip",30
OK
Change the working directory to the specified one
Set AT+UFTPC=8,<directory_name> OK AT+UFTPC=8,"data_folder"
OK
Create a directory on the FTP host
Set AT+UFTPC=10,<directory_name> OK AT+UFTPC=10,"new_data_folder"
OK
Remove the directory from the remote FTP server
Set AT+UFTPC=11,<directory_name> OK AT+UFTPC=11,"data_folder"
OK
Information of a file or a directory
Set AT+UFTPC=13[,<file_directory_
name>]
OK AT+UFTPC=13,"data_folder"
OK
List the file names in a specified directory
Set AT+UFTPC=14[,<file_directory_
name>]
OK AT+UFTPC=14,"data.zip"
OK
Retrieve the FOTA update file
Set AT+UFTPC=100,<remote_file_
name>[,<fw_download_status>]
OK AT+UFTPC=100,"data.zip"
OK
Test AT+UFTPC=? +UFTPC: (list of supported <op_
code>s)
OK
+UFTPC: (0-5,8,10,11,13,14,100)
OK
URC +UUFTPCD: <op_code>,<ftp_data_
len>,<ftp_data>
+UUFTPCD: 13,16,"16 bytes of data"
URC +UUFTPCR: <op_code>,<ftp_
result>[,<md5_sum>]
+UUFTPCR: 1,1
Status during the FOTA update file transfer (<op_code>=100)
URC +UUFTPCR: 100,<stored_byte> /
<total_byte>
+UUFTPCR: 100,202752 / 1103692
21.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 AT+UFTP command).
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