Set command

The set command injects encrypted provisioning messages to the nRF9160 modem.

Syntax:

%KEYINJECT=<msg>

Response syntax:

%KEYINJECT: <response>
+CME ERRROR codes
50 – Incorrect parameters
51 – Command is disabled in this software build
513 – Signing or decrypting key not found on device
515 – Not enough memory for processing
518 – Not allowed in active state

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

<msg>
Provisioning message and signature separated by a dot ".". The actual message is encrypted and the ciphertext is delivered in a COSE_Encrypt object.
The format is "Base64url(COSE_Encrypt(provisioning_message)).Base64url(COSE_Sign1)".
<response>
The response format is base64url(cbor_resp).

The following command example shows the nRF9160 modem receiving an encrypted provisioning message:

%KEYINJECT="2GCEQ6EBCqEFTS6b97seIkh_t5cLNhpYikK5miurjQrYHxWuPaA_LQFo5Qk2s9g3xO71g8ec-
AVvKRyk4Gdo2DCRL9q3gGOZxgrYEN9R44F1WOdaGhnaypjtdNwqgu-Kv-6DlZRqyxKkSvrZLuOq3R6GdLPK2BZ5pQNYkeN
8dIPhJujbA5Bb_bt_iUrlYA2jIF3MR395PDtd4BlTb4ika-tVeoGDRKEBOBiiIKQBAiABIVgg8zFHgdz6a3LjQ2Nq7V-jM
u9CM3KxI9XjPajLT8fOKGkiWCDi4YnIiCDQisIPWoCaucAnUUti4h-eazw1UMX3LR3X_ARCGC1A.0oRYH6MBJjoAAQAAUL
UTc_owres5hDTJSUsd4r46AAEAAQShBEMZAtP2WEAIQ9Gw3O2-ymC1_bMChHdYorwSPGSK7okxl9Xkj3V7JVrUW1UK7QeW
M1ajtaxNYs7wJARQdeSmMbNTF6R0_VuD"
%KEYINJECT: "2dn3gwVQ________RK2Afv__z-ihGIEA"
OK