Skip to content

Commit d10ee8f

Browse files
committed
docs: Update provisioning documentation with extra details
Update the provisioning documentation to include additional details: - What happens during provisioning - What can be done after provisioning - Link to provisioning in main ToC Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent f9bd4b1 commit d10ee8f

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ west flash --erase
107107

108108
4. Wait for the device to provision credentials and connect to nRF Cloud over CoAP. Once connected, the device should be available under **Device Management****Devices**.
109109

110-
See [Provisioning](docs/common/provisioning.md) for more details.
110+
See [Provisioning to nRF Cloud](docs/common/provisioning.md) for more details.
111111
</details>
112112

113113
## System Architecture
@@ -139,6 +139,7 @@ The architecture is detailed in the [Architecture documentation](docs/common/arc
139139
## Table of Content
140140

141141
* [Getting Started](docs/common/getting_started.md)
142+
* [Provisioning to nRF Cloud](docs/common/provisioning.md)
142143
* [Architecture](docs/common/architecture.md)
143144
* [System Overview](docs/common/architecture.md#system-overview)
144145
* [Zbus](docs/common/architecture.md#zbus)

docs/common/provisioning.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@
22

33
Device provisioning establishes credentials for secure communication with nRF Cloud CoAP.
44

5+
<details>
6+
<summary><strong>What happens during provisioning?</strong></summary>
7+
8+
The Asset Tracker Template uses the `nrf_provisioning` library to handle device provisioning automatically. The library provisions the root CA certificate for the provisioning service to the modem during boot if it's not already present. During provisioning, the following steps occur:
9+
10+
1. **Secure Connection**: The library establishes a secure DTLS connection to the nRF Cloud CoAP Provisioning Service. The device verifies the server's identity using the root CA certificate.
11+
12+
2. **Device Authentication**: The device authenticates itself using a JWT (JSON Web Token) signed with the modem's factory-provisioned Device Identity private key. This key is securely stored in the modem hardware and cannot be extracted.
13+
14+
3. **Command Retrieval**: After successful authentication, the device requests provisioning commands from the server. These commands typically include cloud access credentials and configuration settings.
15+
16+
4. **Modem Configuration**: To write the received credentials and settings, the library:
17+
- Suspends the DTLS session (to maintain the connection state)
18+
- Temporarily sets the modem offline
19+
- Writes the credentials to the modem's secure storage
20+
21+
5. **Result Reporting**: After executing the commands, the library resumes or re-establishes the DTLS connection (if needed), authenticates again with JWT, and reports the results back to the server. Successfully executed commands are removed from the server-side queue.
22+
23+
6. **Validation**: The device uses the newly provisioned credentials to connect to nRF Cloud CoAP services.
24+
25+
> [!NOTE]
26+
> The modem must be offline during credential writing because the modem cannot be connected to the network while data is being written to its storage area (credential writing).
27+
> Therefore its normal that LTE is disconnected/connected multiple times during provisioning.
28+
>
29+
> The attestation token is different from the JWT - it's used during the initial device claiming process to prove device authenticity to nRF Cloud, not during the provisioning protocol itself.
30+
31+
For more details on the provisioning library, see the [nRF Cloud device provisioning documentation](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/networking/nrf_provisioning.html).
32+
33+
</details>
34+
535
## Manual Provisioning
636

737
1. Get the device attestation token:
@@ -36,6 +66,19 @@ Device provisioning establishes credentials for secure communication with nRF Cl
3666

3767
1. Once connected, the device will be available under the **Devices** section in the **Device Management** navigation pane on the left.
3868

69+
<details>
70+
<summary><strong>What can I do after provisioning?</strong></summary>
71+
72+
After your device is provisioned and connected, you can:
73+
74+
- **Monitor device data**: View real-time data from your device including location, temperature, battery percentage, and other sensor readings in the nRF Cloud portal.
75+
76+
- **Retrieve data programmatically**: Use the [Message Routing Service](https://docs.nordicsemi.com/bundle/nrf-cloud/page/Devices/MessagesAndAlerts/MessageRoutingService/ReceivingMessages.html) to automatically forward device messages to your own cloud infrastructure or application endpoints.
77+
78+
- **Perform firmware updates**: Deploy over-the-air firmware updates to your device. See [Firmware Updates (FOTA)](fota.md) for detailed instructions on preparing and deploying firmware updates via nRF Cloud.
79+
80+
</details>
81+
3982
### REST API Alternative
4083

4184
You can also use the REST API as an alternative for provisioning by running the following command:

0 commit comments

Comments
 (0)