Connecting Thingy:91X to own nRF Cloud account

Hi,

I have a Thingy:91X which connects fine to hello.nrcloud.com. Now I want to connect it to my own nRF Cloud account.

Note that I have successfully provisioned multiple of our own (brand-new) nRF9151 devices to nRF Cloud using preconnect onboarding (self-signed cert, device_credential_installer, etc), this process always worked for me.

However, for Thingy:91X I have tried both preconnect-onboarding as well as auto-onboarding, and both fail.

1. Preconnect-onboarding

I load the credentials into the device via device_credential_installer and onboard the device into my nRF Cloud account via  nrf_cloud_onboard. When the device connects with the nrf_cloud_multi_service I would expect the cloud to accept the connection and finish onboarding into my account. However, I always get

[00:01:48.924,774] <err> nrf_cloud_transport: MQTT input error: -128
[00:01:48.924,835] <err> nrf_cloud_transport: Error disconnecting from cloud: -128

I assume the nRF Cloud terminates the connection because the keys/certificates mismatches, but I don't know why.

2. Auto-onboarding

Then I followed https://devzone.nordicsemi.com/f/nordic-q-a/120488/thingy91x-connecting-to-nrf-cloud-mqtt-input-error--128. I retrieved an access token, claimed the device in the nRF cloud, and ran nrf_cloud_multi_service built with auto-provisioning support. However, now I always get

[00:12:13.442,657] <err> nrf_provisioning_jwt: Failed to generate JWT, error: -12
[00:12:13.442,687] <inf> nrf_provisioning_http: Failed to generate JWT, error: -12
[00:12:13.442,718] <err> nrf_provisioning_http: Could not format HTTP auth header

I don't know how to fix the JWT error.

Can you let me know how to get either method to work? Connecting a Thingy:91X to one's own nRF Cloud account is probably something a number of people are trying, so is there streamlined documentation for this process somewhere?

Thanks

Parents Reply
  • Could you try your first approach again and run device_credential_installer with -d, this will replace what ever you have in the sectag and place the new one. Basically the next steps:

    create_ca_cert

    device_credentials_installer -d --ca *_ca.pem --ca-key *_prv.pem -d  --verify

    nrf_cloud_onboard --api-key $API_KEY --csv onboard.csv

    This is similar from what is written here. Also confirm that you have these Kconfigs in yout project, either in .proj or in some overlay:

    # Enable modem-based JSON Web Token (JWT) generation required for nRF Cloud authentication
    CONFIG_MODEM_JWT=y

    # Configure the nRF Cloud library to use the device's internal UUID as the client ID
    CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y

    # Define the modem security tag where nRF Cloud credentials will be stored (16842753 is the standard tag used by Nordic examples)
    CONFIG_NRF_CLOUD_SEC_TAG=16842753

    Regards,

    Elfving

Children
Related