User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
20Device and data security
Page 248 of 401
20.3.6.3Defined values
Parameter Type Description
<payload_length> Number Number of bytes to be sent.
<filename> String Filename where to store the encrypted data. See File system limits.
<unencrypted_data> String Stream of bytes.
<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.7Local decryption from AT interface +USECDATADEC
+USECDATADEC
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.7.1Description
Executes the local decryption of the encrypted data provided by the AT interface. The <payload_length>
parameter defines the data length which will be provided via the AT interface and is limited to 8224 bytes.
The stream of bytes can be entered after the '>' prompt has been provided to the user. The data transfer is
terminated exactly when <payload_length> bytes have been sent. Once the specified number of bytes have
been sent, and the decryption is finished, the AT interface is used to output the decrypted data.
If the <filename> 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. If the data transfer over the AT interface is stopped or
paused for some reason, the interface waits 20 s before aborting the data encryption.
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.7.2Syntax
Type Syntax Response Example
Set AT+USECDATADEC=<payload_
length>[,<filename>]
>
<encrypted_data>
<
[+USECDATADEC: <dec_data_
length>,<decrypted_data>]
OK
AT+USECDATADEC=512
>
512 bytes of data to be decrypted
<
+USECDATADEC: 512,"512 bytes of
decrypted data"
OK
AT interface syntax
Set AT+USECDATADEC=<payload_
length>
>
<encrypted_data>
<
+USECDATADEC: <dec_data_
length>,<decrypted_data>
OK
AT+USECDATADEC=512
>
512 bytes of data to be decrypted
<
+USECDATADEC: 512,"512 bytes of
decrypted data"
OK
File system syntax
Set AT+USECDATADEC=<payload_
length>,<filename>
>
<encrypted_data>
<
OK
AT+USECDATADEC=512,"decfile"
>
512 bytes of data to be decrypted
<
OK