nrf9160

Set command

The set command writes and reads the public key. The public key is updated directly to Non-volatile Memory (NVM). The write operation is allowed only when the modem is not activated.

Active %XPOFWARN warning blocks the update.v1.3.x≥2

Syntax:

%XPMNG=<opcode>[,<content>[,<sec_tag>]]

Response syntax for read command:

%XPMNG: <content>
+CME ERROR code
513 – For read: Not found.
514 – Not allowed.
515 – Memory full.
518 – Not allowed in active state.
519 – Already exists, for write.
520 – For write: Already exists.
528 – Not allowed when power off warning is active.v1.3.x≥2

The set command parameters and their defined values are the following:

<opcode>
0 – Write
2 – Read
<content>
String. Mandatory if parameter <opcode> is "Write". An empty string is not allowed. Parameter <content> is enclosed in double quotes. ASN.1 DER encoding in Base64 encoded with the header and footer of begin key and end key.
<sec_tag>
Integer, 0–9 (optional). A secure tag for multiple public keys.

The following command example writes the public key:

AT%XPMNG=0,"-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----"
OK

The following command example reads the public key:

AT%XPMNG=2
%XPMNG: "-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----"
OK