User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
20Device and data security
Page 249 of 401
Type Syntax Response Example
Test AT+USECDATADEC=? +USECDATADEC: (list of supported
<payload_length>s)
OK
+USECDATADEC: (1-8224)
OK
20.3.7.3Defined values
Parameter Type Description
<payload_length> Number Number of bytes to be decrypted.
<filename> String Filename where to store the decrypted data. For more details on file system
limitations, see File system limits.
<encrypted_data> String Stream of bytes to be decrypted.
<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].
20.3.8Local encryption from a file +USECFILEENC
+USECFILEENC
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.8.1Description
Executes the local encryption of the plain data stored in a file. The file size is limited to 8192 bytes. Once the
file has been read and the encryption is finished the AT interface is used to output the encrypted data.
If the <out_file> parameter is given then the encrypted 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 local encryption
or decryption are used.
20.3.8.2Syntax
Type Syntax Response Example
Generic syntax
Set AT+USECFILEENC=<filename>[,
<out_file>]
[+USECFILEENC: <enc_data_
length>,<encrypted_data>]
OK
AT+USECFILEENC="file_to_
encrypt"
+USECFILEENC: 512,"512 bytes of
encrypted data"
OK
AT interface syntax
Set AT+USECFILEENC=<filename> +USECFILEENC: <enc_data_
length>,<encrypted_data>
OK
AT+USECFILEENC="file_to_
encrypt"
+USECFILEEC: 512,"512 bytes of
encrypted data"
OK
File system syntax
Set AT+USECFILEENC=<filename>,
<out_file>
OK AT+USECFILEENC="file_to_
encrypt","file_to_store_data"
OK
20.3.8.3Defined values
Parameter Type Description
<filename> String Filename of the file containing the plain data.
<out_file> String Filename where to store the encrypted data. For more details on file system
limitations, see File system limits.