User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
17File System
Page 198 of 401
17.2Download file +UDWNFILE
+UDWNFILE
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial No No No - +CME Error
17.2.1Description
Stores (writes) a file into the file system:
The stream of bytes can be entered after the '>' prompt has been provided to the user. The file transfer is
terminated exactly when <size> bytes have been entered and either "OK" final result code or an error result
code is returned. The feed process cannot be interrupted i.e. the command mode is re-entered once the
user has provided the declared the number of bytes.
If the file already exists, the data will be appended to the file already stored in the file system.
If the data transfer stops, after 20 s the command is stopped and the "+CME ERROR: FFS TIMEOUT" error
result code (if +CMEE=2) is returned.
If the module shuts down during the file storing, all bytes of the file will be deleted.
If an error occurs during the file writing, the transfer is aborted and it is up to the user to delete the file.
SARA-R4 / SARA-N4
On the UART interface, if the data transfer stops, the command is stopped and the "+CME ERROR: FFS
TIMEOUT" error result code (if +CMEE: 2) is returned after 30 s.
SARA-R4 / SARA-N4
The available free memory space is checked before starting the file transfer. If the file size exceeds the
available space, the "+CME ERROR: NOT ENOUGH FREE SPACE" error result code will be provided (if
+CMEE: 2).
SARA-R404M / SARA-R410M-01B / SARA-N4
If the HW flow control is disabled (AT+IFC), a data loss could be experienced. So the HW flow control usage
is strongly recommended. If HW flow control is not supported, the use of +UDWNBLOCK is recommended.
SARA-R410M-02B / SARA-R410M-52B
On SARA-R410M-02B-00 and SARA-R410M-52B-00, if the HW flow control is disabled (AT+IFC), a data
loss could be experienced. So the HW flow control usage is strongly recommended. If HW flow control is
not supported, the use of +UDWNBLOCK is recommended.
17.2.2Syntax
Type Syntax Response Example
Set AT+UDWNFILE=<filename>,<size>[,
<tag>]
>
<text>
OK AT+UDWNFILE="filename",36,
"USER"
>
The 36 downloaded bytes of the file!
OK
Download audio configuration
Set AT+UDWNFILE=<filename>,<size>,
"AUDIO_EXT"
OK AT+UDWNFILE="audioconfig",4873,
"AUDIO_EXT"
OK
17.2.3Defined values
Parameter Type Description
<filename> String File name. For file system file name and data size limits see File system limits.
<size> Number File size expressed in bytes. For file system file name and data size limits see File
system limits.
<tag> String Optional parameter that specifies the application file type. FILE TAGS table lists the
allowed <tag> strings. For more details on specific limitations, see Notes.
<text> String Stream of bytes.