<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Can&amp;#39;t Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107824/can-t-add-device-to-nrfcloud-via-rest-api</link><description>Recently I had been having trouble with one of our test devices (shadow was corrupted) on nrfCloud so I decided to delete it and then re-provision and re-add it to nrfCloud to start fresh (something we have done several times before). 
 We have a a python</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 06 Apr 2024 18:16:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107824/can-t-add-device-to-nrfcloud-via-rest-api" /><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/477405?ContentTypeID=1</link><pubDate>Sat, 06 Apr 2024 18:16:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f8e8e1d-f60d-43e2-9a24-72d2b6af81a6</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;you can set the expiration using the &amp;ldquo;dv&amp;rdquo; parameter when running the scripts.&lt;/p&gt;
&lt;p&gt;the default is 10 years.&lt;/p&gt;
&lt;p&gt;for nrf9160 devices, you could implement credential update functionality similar to how the scripts operate. &amp;nbsp;signal the device to execute the KEYGEN AT command and have it send back the CSR. &amp;nbsp;create a cert from the CSR and send it back to the device.&lt;/p&gt;
&lt;p&gt;for nrf91x1 devices you can use the nRF Cloud provisioning service:&amp;nbsp;&lt;a id="" href="https://docs.nrfcloud.com/SecurityServices/ProvisioningService/ProvisioningOverview.html"&gt;https://docs.nrfcloud.com/SecurityServices/ProvisioningService/ProvisioningOverview.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;the fw library is:&amp;nbsp;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/nrf_provisioning.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/nrf_provisioning.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;you could use this library as a reference for your own nrf9160 implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/477401?ContentTypeID=1</link><pubDate>Sat, 06 Apr 2024 13:02:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fb6d501-73f6-4103-8f6b-c507e72c4d3d</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;Justin,&lt;/p&gt;
&lt;p&gt;One last question that I can&amp;#39;t seem to find an answer for in the docs. Is there any expiration of the certificates/credentials that needs to be handled that are created with the above-mentioned scripts? Or are these certificates good for the life of the device?&lt;/p&gt;
&lt;p&gt;If there is expiration, hoes does Nordic recommend updating credentials?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/477385?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 22:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77931089-5d06-43dd-92c5-b834a4a1bb8a</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;glad to hear.&lt;br /&gt;creating your own credentials will prevent this problem and is the recommended method.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/477384?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 22:03:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfd21b86-e86d-4d04-9f36-d8666fcdfcb7</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;Justin,&lt;/p&gt;
&lt;p&gt;This was with the JITP process. Adding the device manually did not work unfortunately. I finally bit the bullet and updated the scripts to use the Nordic one provided here:&amp;nbsp;&lt;a href="https://github.com/nRFCloud/utils/tree/master/python/modem-firmware-1.3%2B"&gt;utils/python/modem-firmware-1.3+ at master &amp;middot; nRFCloud/utils (github.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Specifically:&lt;/p&gt;
&lt;p&gt;create_ca_cert.py&lt;/p&gt;
&lt;pre&gt;&lt;code class="code-line" dir="auto" data-line="7"&gt;device_credentials_installer.py&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="code-line" dir="auto" data-line="12"&gt;nrf_cloud_onboard.py&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This did work and got the device onboarded correctly. Still not sure why our older script stopped working as it once did. But we will create a new manufacturing script based on the above mentioned, scripts.  &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="code-line" dir="auto" data-line="7"&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/477367?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 16:24:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bab608b6-3352-435e-a1f3-3d3b8d038c80</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;are you still using JITP certs?&lt;/p&gt;
&lt;p&gt;if so, it is likely that this device has performed the JITP process like last time, so the device exists in our system but is not yet associated with your team.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;you can perform the associate step here:&amp;nbsp;&lt;a href="https://nrfcloud.com/#/add-device/lte-device"&gt;https://nrfcloud.com/#/add-device/lte-device&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/476705?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 21:44:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12da48e0-6f11-4eb1-b7f9-45656b00c110</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;Nordic team any update on this? We don&amp;#39;t want to attempt to move any devices until this is resolved, because it effetely bricks the unit if we can&amp;#39;t use it with nrfCloud.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/476412?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 01:33:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0570669b-504f-4893-97ff-b30945aa4020</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;If I call FetchDevice via the REST API we get:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="json"&gt;{
    &amp;quot;message&amp;quot;: &amp;quot;This device is not associated with any team.&amp;quot;,
    &amp;quot;code&amp;quot;: 40410
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;We had previously deleted the device from nrfCloud using the UI and then attempted to re-provision using the same process as in the original post.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/476411?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 01:28:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56854611-cd05-4cf3-9f50-6510fea9c997</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;We have recently been&amp;nbsp;using our provisioning script mentioned above. We now can&amp;#39;t add a device for a different reason. The bulk upload to nrfCloud succeeds: with the expected:&lt;pre class="ui-code" data-mode="json"&gt;{&amp;quot;bulkOpsRequestId&amp;quot;:&amp;quot;01HTE5RFRJTY1CP78K1XXX2DSA&amp;quot;}&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, nrfCloud UI simply shows. Failed with no feedback.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1712021257375v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Any idea what could be wrong here? Before we at least had some indication of what the issue was. It&amp;#39;s the same device previously discussed in this thread.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/467040?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 23:43:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee36b390-57f8-46d7-a037-506fe683aa76</guid><dc:creator>justin</dc:creator><description>[quote user="egood"]If this does happen is the only way to resolve to allow the device to connect to the cloud with JITP enabled firmware?&amp;nbsp;[/quote]
&lt;p&gt;if the device attempts to connect (initiating the JITP process) you will need to add the device to your account using either the nrfcloud.com UI (click the Add devices) button or using the REST API:&amp;nbsp;&lt;a href="https://api.nrfcloud.com/v1#tag/IP-Devices/operation/AssociateDevice"&gt;https://api.nrfcloud.com/v1#tag/IP-Devices/operation/AssociateDevice&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/467039?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 23:40:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eac97a7-36d8-4adc-b93d-82aad8516c05</guid><dc:creator>justin</dc:creator><description>[quote user="egood"]What would cause nrfCloud to think that we want to use JITP[/quote]
&lt;p&gt;You are downloading JITP certificates when using&amp;nbsp;&lt;a href="https://api.nrfcloud.com/v1#tag/IP-Devices/operation/CreateDeviceCertificate"&gt;https://api.nrfcloud.com/v1#tag/IP-Devices/operation/CreateDeviceCertificate&lt;br /&gt;&lt;/a&gt;The AWS JITP process occurs automatically when a device first attempts to make a connection to nRF Cloud.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="egood"]Does Nordic typically recommend JITP[/quote]
&lt;p&gt;No, JITP is not recommended for&amp;nbsp;production&amp;nbsp;products.&lt;br /&gt;See&amp;nbsp;&lt;a href="https://docs.nrfcloud.com/Devices/Associations/Provisioning.html"&gt;https://docs.nrfcloud.com/Devices/Associations/Provisioning.html &lt;/a&gt;for an overview.&lt;br /&gt;&lt;br /&gt;We have example python scripts for creating your own credentials:&amp;nbsp;&lt;a href="https://github.com/nRFCloud/utils/tree/master/python/modem-firmware-1.3%2B"&gt;https://github.com/nRFCloud/utils/tree/master/python/modem-firmware-1.3%2B&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;See&amp;nbsp;&lt;a title="create_device_credentials.py" href="https://github.com/nRFCloud/utils/blob/master/python/modem-firmware-1.3%2B/create_device_credentials.py"&gt;create_device_credentials.py&lt;/a&gt;&amp;nbsp;and/or&amp;nbsp;&lt;a title="device_credentials_installer.py" href="https://github.com/nRFCloud/utils/blob/master/python/modem-firmware-1.3%2B/device_credentials_installer.py"&gt;device_credentials_installer.py&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/466972?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 14:49:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8c5d44f-c8f1-4004-9663-1c13964c2d30</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;I just re-read your replay. Excuse my quick draw response, you answered my first question. It&amp;#39;s possible that the device connected to the cloud before the POST via the REST API was done, We do upload prod firmware after loading the certs, but before uploading the CSV, because as I mentioned we do the units in batches.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If this does happen is the only way to resolve to allow the device to connect to the cloud with JITP enabled firmware?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/466963?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 14:21:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e009035d-d3d9-4c99-b196-ddbb9e49cf3c</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;Thanks for deleting the device on your end, that worked! I have a few additional questions:&lt;/p&gt;
&lt;p&gt;1. What would cause nrfCloud to think that we want to use JITP as apposed to just creating the device on nrfCloud? I would like to understand this so we can track down why it happened to prevent it from happening again. Because we do not currently have JITP enabled in our firmware.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Does Nordic typically recommend JITP over the process of just adding the device to the cloud at the time of loading the certs during manufacturing?&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't Add Device to nrfCloud via REST API</title><link>https://devzone.nordicsemi.com/thread/466867?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 06:53:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebb9c158-2494-4a21-8f8b-26cc7dab7cd2</guid><dc:creator>Lincoln Thomas</dc:creator><description>&lt;p&gt;Hello Eric,&lt;/p&gt;
&lt;p&gt;That device is shown as provisioned but not associated with any team yet. This normally occurs if you flash JITP certs you obtained from &lt;span style="font-family:courier new, courier;"&gt;/devices/{&amp;#39; + IMEI + &amp;#39;}/certificates&lt;/span&gt;&amp;nbsp; onto the device, and then turn on the device, before calling your &lt;span style="font-family:courier new, courier;"&gt;POST &lt;a href="https://api.nrfcloud.com/v1/devices"&gt;api.nrfcloud.com/.../devices&lt;/a&gt;&lt;/span&gt;. The device connects to nRF Cloud via MQTT and waits to be associated to a team. Could you have done this?&lt;/p&gt;
&lt;p&gt;I have deleted the device from our database. Please try your process again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>