User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
21FTP
Page 257 of 401
SARA-R4 / SARA-N4
<timer_trigger>, <data_length_trigger> and <character_trigger> parameters are not supported.
During connection to FTP remote server (via FTP login command) the FTP profile parameters cannot be
changed or reset to factory-programmed values until disconnection takes place (FTP logout). Only <op_
code>=5 (inactivity timeout), and <op_code>=6 (FTP mode), can be updated while the FTP connection is
on the go.
21.2FTP command +UFTPC
+UFTPC
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial No No No - +CME Error
21.2.1Description
Triggers the FTP actions corresponding to the <op_code> parameter. The final result code indicates if sending
the command request to the FTP process was successful or not. The +UUFTPCR (FTP command result) URC
returns to the user the final result of the FTP command previously sent with +UFTPC. As well, the +UUFTPCD
FTP unsolicited data URC provides the data requested by the user (e.g. file or directory lists) and received from
the FTP server.
The timing before the +UUFTPCR URC is issued on the AT terminal also depends by the DNS resolution.
For further details about the estimated response time related to the DNS resolution, see the +UDNSRN
AT command.
SARA-R4 / SARA-N4
When using direct link mode to retrieve a file from the FTP server (<op_code>=6) or to send a file to the
FTP server (<op_code>=7), if the HW flow control is disabled (AT+IFC), a data loss could be experienced.
So the HW flow control usage is strongly recommended.
21.2.2Syntax
Type Syntax Response Example
General syntax
Set AT+UFTPC=<op_code>[,<param1>[,
<param2>[,<param3>]]]
OK AT+UFTPC=4,"data.zip","data.zip"
OK
FTP logout
Set AT+UFTPC=0 OK AT+UFTPC=0
OK
FTP login
Set AT+UFTPC=1 OK AT+UFTPC=1
OK
Delete the file from the FTP server
Set AT+UFTPC=2,<file_name> OK AT+UFTPC=2,"mytest"
OK
Rename a file of FTP server
Set AT+UFTPC=3,<file_name>,<new_
file_name>
OK AT+UFTPC=3,"old_name","final_
name"
OK
Retrieve the file from the FTP server
Set AT+UFTPC=4,<remote_file_name>,
<local_file_name>[,<retrieving_
mode>]
OK AT+UFTPC=4,"data.zip","data.zip"
OK
Store the file on the FTP server
Set AT+UFTPC=5,<local_file_name>,
<remote_file_name>[,<number_of_
byte>]
OK AT+UFTPC=5,"data.zip","data.zip",
30
OK
Retrieve a file from the FTP server using direct link mode