User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
20Device and data security
Page 250 of 401
Parameter Type Description
<enc_data_length> Number Number of encrypted bytes returned.
<encrypted_data> String ASCII string representing the encrypted data of <enc_data_length> characters in the
range [0x00,0xFF].
20.3.9Local decryption from a file +USECFILEDEC
+USECFILEDEC
Modules SARA-R410M-63B SARA-R410M-73B SARA-R410M-83B
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No < 30 s +CME Error
20.3.9.1Description
Executes the local decryption of the encrypted data stored in a file. The file size is limited to 8192 bytes. Once
the file has been read and the decryption is finished the AT interface is used to output the decrypted data.
If the <out_file> parameter is given then the decrypted data will be written to the file in the file system. If the
file already exists the existing file will be overwritten.
A total of a hundred local encryption/decryption sessions are granted for free as trial period, unless the
module has already successfully registered with the security server. If the hundred sessions are used
and the module is not registered with the security server, an error result code is returned when the local
encryption or decryption are used.
20.3.9.2Syntax
Type Syntax Response Example
Generic syntax
Set AT+USECFILEDEC=<filename>[,
<out_file>]
[+USECFILEDEC: <dec_data_
length>,<decrypted_data>]
OK
AT+USECFILEDEC="file_to_
decrypt"
+USECFILEDEC: 512,"512 bytes of
decrypted data"
OK
AT interface syntax
Set AT+USECFILEDEC=<filename> +USECFILEDEC: <dec_data_
length>,<decrypted_data>
OK
AT+USECFILEDEC="file_to_
decrypt"
+USECFILEDEC: 512,"512 bytes of
decrypted data"
OK
File system syntax
Set AT+USECFILEDEC=<filename>,
<out_file>
OK AT+USECFILEDEC="file_to_
decrypt","file_to_store_data"
OK
20.3.9.3Defined values
Parameter Type Description
<filename> String Filename of the file containing the encrypted data.
<out_file> String Filename where to store the decrypted data. For more details on file system
limitations, see File system limits.
<dec_data_length> Number Number of decrypted bytes returned.
<decrypted_data> String ASCII string representing the decrypted data of <dec_data_length> characters in the
range [0x00,0xFF].