User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
20Device and data security
Page 252 of 401
Type Syntax Response Example
Set AT+USECE2EDATAENC=<payload_
length>
>
<unencrypted_data>
<
+USECE2EDATAENC: <enc_data_
length>,<encrypted_data>
OK
AT+USECE2EDATAENC=512
>
512 bytes of data to be encrypted
<
+USECE2EDATAENC: 512,"512 bytes
of encrypted data"
OK
File system syntax
Set AT+USECE2EDATAENC=<payload_
length>,<filename>
>
<unencrypted_data>
<
OK
AT+USECE2EDATAENC=512,
"encfile"
>
512 bytes of data to be encrypted
<
OK
Test AT+USECE2EDATAENC=? +USECE2EDATAENC: (list of
supported <payload_length>s)
OK
+USECE2EDATAENC: (1-8192)
OK
20.3.11.3Defined values
Parameter Type Description
<payload_length> Number Number of bytes to be encrypted.
<filename> String Filename where to store the encrypted data. For more details on file system
limitations, see File system limits.
<unencrypted_data> String Stream of bytes to be encrypted.
<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.12End to end encryption from a file +USECE2EFILEENC
+USECE2EFILEENC
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.12.1Description
Executes an end to end 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 is written to the indicated file system file. If the
file already exists the existing file will be overwritten.
20.3.12.2Syntax
Type Syntax Response Example
Generic syntax
Set AT+USECE2EFILEENC=
<filename>[,<out_file>]
[+USECE2EFILEENC: <enc_data_
length>,<encrypted_data>]
OK
AT+USECE2EFILEENC="file_to_
encrypt"
+USECE2EFILEENC: 512,"512 bytes
of encrypted data"
OK
AT interface syntax
Set AT+USECE2EFILEENC=<filename> +USECE2EFILEENC: <enc_data_
length>,<encrypted_data>
OK
AT+USECE2EFILEENC="file_to_
encrypt"
+USECE2EFILEEC: 512,"512 bytes of
encrypted data"