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

Parents
  • Did you create a provisioning configuration as detailed in Step 4 of the Process section?

    From the log, it looks like the provisioning firmware connected but had no steps to provision.

  • Could you list the minimum required commands to add to a rule in order to provision a device? I don't know what is needed. How to install CA Certificate?

    [00:00:02.480,010] <err> nrf_cloud_credentials: CA Certificate not found in sec tag 16842753
    [00:00:02.480,041] <wrn> cloud_connection: nRF Cloud credentials are not installed. Claim and onboard device on nrfcloud.com to continue.
    
    I have claimed the device using token.

  • I unclaimed the device and entered the commands above when reclaiming. Now it works :-) BUT I still get these messages every minute:

    [01:04:03.238,281] <inf> cloud_provisioning: Provisioning is active.
    [01:04:03.340,118] <inf> nrf_provisioning_http: Requesting commands
    [01:04:06.536,895] <inf> nrf_provisioning_http: Connected
    [01:04:06.536,926] <inf> nrf_provisioning_http: No more commands to process on server side
    [01:04:11.537,017] <inf> cloud_provisioning: Provisioning is idle.
    [01:05:07.537,750] <inf> cloud_provisioning: Provisioning is active.
    [01:05:07.639,587] <inf> nrf_provisioning_http: Requesting commands
    [01:05:09.404,327] <inf> nrf_provisioning_http: Connected
    [01:05:09.404,357] <inf> nrf_provisioning_http: No more commands to process on server side
    [01:05:14.404,479] <inf> cloud_provisioning: Provisioning is idle.

    How to complete provisioning? (not active/idle)

  • 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.

Reply
  • 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.

Children
Related