Updating the nRF Cloud certificate
When you wish to use nRF Cloud’s REST Application Programming Interface (API), the Development Kit (DK) requires a valid security certificate. This means that you need to update the certificate stored on the DK. You need to download a new certificate and then provision it to your DK.
Downloading the nRF Cloud certificate
To download the nRF Cloud certificate for your DK, complete the following steps. Make sure you are logged in to the nRF Cloud portal.
Click Devices under Device Management in the navigation pane on the left.
Click Add Devices.
The Select Device Type pop-up opens.
Click LTE Device in the Select Device Type pop-up.
Click Create JITP Certificates at the bottom of the page.
The Create JITP Certificates dialog box opens.
Enter the following information:
Device ID: the device ID is composed of nrf- and the 15-digit International Mobile (Station) Equipment Identity (IMEI) number that is printed on the label of your DK. For example, nrf-123456789012345.
Ownership code: the ownership code is the PIN or the hardware ID of your DK, and it is found on the label of your DK.
If the label contains a PIN in addition to the IMEI number, enter this pin. If it does not contain a PIN, enter the Hardware ID (HWID) HEX code, with or without colons. For example, AA:BB:CC:DD:EE:FF or AABBCCDDEEFF.
Note
The ownership code serves as a password and proves that you own the specific DK. Therefore, do not share it with anyone.
Click Download Certificate and save the
.cert.json
file to a folder of your choice.Note
The certificate contains all the information that is needed to connect your DK to nRF Cloud. Therefore, do not share it with anyone.
Close the Create JITP Certificates dialog box.
Provisioning the nRF Cloud certificate
After downloading the certificate, you must provision it to your DK.
Note
The application firmware on the DK must support long AT commands up to three kB to provision the certificate. If you have updated the application firmware using the instructions in either the Getting started using Quick Start documentation or the Updating the DK firmware using Programmer or Programming onto nRF91 Series devices sections, this requirement is fulfilled.
Complete the following steps to provision the certificate:
Start nRF Connect for Desktop and install the Cellular Monitor app.
Open the Cellular Monitor app.
Connect the DK to the computer with a micro-USB cable, and turn it on.
Click Select device and select the DK from the drop-down list.
The drop-down text changes to the type of the selected device, with the SEGGER ID below the name.
Click the Open Serial Terminal option of the Cellular Monitor app to open the Serial Terminal.
Enter
AT+CFUN=4
in the text field for AT commands and click Send. This AT command sets the modem to offline state.Enter
AT+CFUN?
in the text field for AT commands and click Send. This AT command returns the state of the modem.The command must return
+CFUN: 4
, which indicates that the modem is in offline state. If it returns a different value, repeat the previous step.Open the Cellular Monitor app.
Click CERTIFICATE MANAGER in the navigation bar to switch to the certificate manager view.
Click Load from JSON and select the
*.cert.json
file that you downloaded from nRF Cloud. Alternatively, you can drag and drop the file onto the GUI.Ensure that the Security tag is set to
16842753
, which is the security tag for nRF Cloud credentials.Click Update certificate.
The log message “Certificate update completed” indicates that the certificate was provisioned successfully. If you encounter any errors, switch to the terminal view and check the output of the AT commands that were sent to the nRF91 Series modem.
Note
If you have connected your DK to nRF Cloud before, you must delete the device there after provisioning the certificate. Open the entry for your device from the Devices view, then click the gear icon to the right of the device’s name, and select Delete Device. Then, add the DK again as described in Connecting the nRF9160 DK to nRF Cloud.