nRF Cloud Provisioning Service

Hi 

I'm trying to use the nRF Cloud Provisioning Service with the nRF Cloud multi-service sample in SDK 2.6 on a nRF9151DK.

I have got the token from the device using AT%ATTESTTOKEN and claimed the device in nRF Cloud

Then I compiled the sample with 

-DEXTRA_CONF_FILE="overlay-http_nrf_provisioning.conf"

But the provisioning is not ok...What am I missing?

[00:00:00.256,439] <inf> spi_nor: gd25wb256e3ir@1: 32 MiBy flash
*** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:00.259,643] <inf> main: iAMP-Hydro has started, version: 1.0.2, protocol: MQTT
[00:00:00.259,704] <inf> cloud_connection: Enabling connectivity...
[00:00:00.544,769] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.725,860] <inf> cloud_connection: Waiting for network ready...
[00:00:05.010,375] <inf> cloud_connection: Network connectivity gained!
[00:00:06.010,589] <inf> cloud_provisioning: Initializing the nRF Provisioning library...
[00:00:06.010,833] <inf> cloud_connection: Network is ready
[00:00:07.050,079] <inf> cloud_provisioning: Provisioning is active.
[00:00:07.152,038] <inf> nrf_provisioning_http: Requesting commands
[00:00:09.535,980] <inf> nrf_provisioning_http: Connected
[00:00:09.536,010] <inf> nrf_provisioning_http: No more commands to process on server side
[00:00:14.536,102] <inf> cloud_provisioning: Provisioning is idle.
[00:00:14.536,163] <inf> cloud_connection: Connecting to nRF Cloud
[00:00:14.536,224] <inf> cloud_connection: Device ID: 50333648-3230-48f5-xxxx-xxxxxxxxxxx
[00:00:18.436,676] <err> nrf_cloud_transport: MQTT input error: -128
[00:00:18.436,737] <err> nrf_cloud_transport: Error disconnecting from cloud: -128
[00:00:18.436,798] <inf> cloud_connection: Disconnecting from nRF Cloud
[00:00:18.436,828] <err> cloud_connection: Could not connect to nRF Cloud
[00:00:18.436,828] <inf> cloud_connection: Retrying in 30 seconds...

Bård

  • I see below that you have it working. But for anybody else reading this thread, what you need there is the AWS CA certificate. That gets auto-populated when using the "Create new rule for onboarding to nRF Cloud" button.

  • To complete provisioning, add the Provisioning Command called "Finished".

  • I added Finished to Provisioning Configuration like this:

    but Provisioning is still active/idle. Have I added it correctly?

  • It will help to get a complete log of the application, to understand what is going on at the firmware level. Also, any changes in configuration from the defaults. 

    I just re-read in your original message that you are using 2.6. In SDK 2.6.0, the default of the sample is to check once per minute if there's a change in provisioning. See the following in overlay-hittp_nrf_provisioning.conf:

    # Set the provisioning interval to 60 seconds.
    # This is a very frequent interval. To save power, set this to something approaching 24 hours.
    # But note that provisioning may take up to twice as long as this interval, since it
    # happens in two steps.
    CONFIG_NRF_PROVISIONING_INTERVAL_S=60

    So you might want to change CONFIG_NRF_PROVISIONING_INTERVAL_S to a different value.

    If you are able to move to SDK 2.8.0, the provisioning library has a new API: nrf_provisioning_set_interval(). This is used in the nRF Cloud Multi Service sample to change the provisioning interval to a much longer interval after the initial provisioning is complete. The new interval is set with CONFIG_POST_PROVISIONING_INTERVAL_M.

  • This works. But the device still start provisioning at regular intervals. Is there a way to disable the service after a time interval? 

    I have a nRF9151DK that I provisioned using DeviceID and Pin. I tried the same with a custom board using DeviceID and HWID, but got this error:

    Is it possible to provision custom boards this way? If so, why the error? Do I need to download a certificate, or is it present in all nrf9151 SOC's?

Related