User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
20Device and data security
Page 251 of 401
20.3.10Pre-Shared Key (PSK) generation +USECPSK
+USECPSK
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.10.1Description
Generate a PSK identity and key.
20.3.10.2Syntax
Type Syntax Response Example
Set AT+USECPSK=<psk_size> +USECPSK: <psk_id>,<psk>
OK
AT+USECPSK=16
+USECPSK: "1234ABCD",
"1234567890ABCDEF"
OK
Test AT+USECPSK=? +USECPSK: (list of supported <psk_
size>s)
OK
+USECPSK: (16,32)
OK
20.3.10.3Defined values
Parameter Type Description
<psk_size> Number Size requested for the <psk> parameter expressed in bytes. The allowed values are 16
and 32.
<psk_id> String PSK key identity in hexadecimal format. For more details, see +USECPRF
(<op_code>=9).
<psk> String PSK key in hexadecimal format. For more details, see +USECPRF (<op_code>=8).
20.3.11End to end encryption from AT interface +USECE2EDATAENC
+USECE2EDATAENC
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.11.1Description
Executes an end to end encryption of the plain 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 8192 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 encryption is finished, the AT interface is used to output the encrypted data.
If the <filename> 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. If the data transfer over the AT interface is stopped or
paused for some reasons, the interface waits 20 s before aborting the data encryption.
20.3.11.2Syntax
Type Syntax Response Example
Generic syntax
Set AT+USECE2EDATAENC=<payload_
length>[,<filename>]
>
<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
AT interface syntax