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

Related