<?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>Thingy91: Serial Timeout  when running Claiming and Provisioning python script</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114553/thingy91-serial-timeout-when-running-claiming-and-provisioning-python-script</link><description>Hi Dev Team, 
 I am trying reprovision my Thingy91 so that I may generate a JWT signed with a device key to use A-GNSS and REST FOTA. 
 I have been following the guide for nRF Cloud Device Provisioning . All steps were successful up until I tried to run</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Sep 2024 16:16:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114553/thingy91-serial-timeout-when-running-claiming-and-provisioning-python-script" /><item><title>RE: Thingy91: Serial Timeout  when running Claiming and Provisioning python script</title><link>https://devzone.nordicsemi.com/thread/502174?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2024 16:16:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ee9fedc-1acb-48ed-9b6d-758b17efa01f</guid><dc:creator>Pete Skeggs</dc:creator><description>&lt;p&gt;I think you are good to go. Glad to help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Serial Timeout  when running Claiming and Provisioning python script</title><link>https://devzone.nordicsemi.com/thread/502021?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2024 03:28:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d79e7f17-78a3-4051-81ba-58f2b65557f6</guid><dc:creator>nobuddy</dc:creator><description>[quote userid="87454" url="~/f/nordic-q-a/114553/thingy91-serial-timeout-when-running-claiming-and-provisioning-python-script/501990"]What application was installed on your Thingy:91 when you ran this script?[/quote]
&lt;p&gt;The nRF Provision sample, as mentioned in step 3 of my previous comment.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="87454" url="~/f/nordic-q-a/114553/thingy91-serial-timeout-when-running-claiming-and-provisioning-python-script/501990"]you should see your device listed again in your nRF Cloud account. Do you?&amp;nbsp;I suspect they failed,[/quote]
&lt;p&gt;I do see it, but many fields are clear or unknown, not sure if this is considered failed or not.&amp;nbsp;At the time of my previous message when the &lt;span&gt;device_credential_installer.py&amp;nbsp;&lt;/span&gt;script was ran, the script outputted Credential verification: PASS. The&amp;nbsp;Onboarding python script showed&amp;nbsp;onboard API call request: 202 - Accepted, and Status SUCCEEDED, Error Count 0, and nrf-&amp;quot;&amp;quot;, OK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Preprovisioned.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Nonetheless, I will start again, remove the device from my nrf Cloud, install the at_client sample, and rerun the device_credential_installer.py. Below is the output of the script with redactions:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Loading CA and key...
Creating device certificate...
Writing CA cert(s) to device...
&amp;lt;- OK

Writing dev cert to device...
&amp;lt;- OK

Verifying credentials...
&amp;lt;- OK

Verifying Client Cert
&amp;lt;- OK

Verifying Private Key
&amp;lt;- OK

Private Key exists, SHA not verified
Credential verification: PASS
Saving nRF Cloud device onboarding CSV file onboard.csv...
--- File onboard.csv exists; overwrite, append, or quit (y,a,n)? y
Onboarding CSV file saved, row count: 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I then reran the onboarding script, outputs with redaction:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Devices to be onboarded: 1
Onboarding API call result: 202 - Accepted
Response: {&amp;quot;bulkOpsRequestId&amp;quot;:&amp;quot;&amp;quot;}
Fetching results for bulkOpsRequestId: 
Waiting 5s...
Onboarding status: SUCCEEDED

CSV-formatted results:
bulkOpsRequestId,
status,SUCCEEDED
endpoint,ONBOARD_DEVICES
requestedAt,2024-09-11T02:11:55.686Z
completedAt,2024-09-11T02:11:57.551Z
uploadedDataUrl,https://bulk-ops-requests.nrfcloud.com/
Error count,0

Device ID,Result
nrf-&amp;quot;&amp;quot;,OK&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The device is listed on my account, similar to yesterday.&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Preprovisioned_5F00_today.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;If this is expected, then I&amp;#39;m good to go and can review the attached links you provided.&lt;/p&gt;
&lt;p&gt;I really appreciate the help and guidance, &lt;a href="https://devzone.nordicsemi.com/members/pete-skeggs"&gt;Pete Skeggs&lt;/a&gt;&amp;nbsp;!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Serial Timeout  when running Claiming and Provisioning python script</title><link>https://devzone.nordicsemi.com/thread/501990?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 18:06:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11ab762d-0693-4bf6-9ce8-7b2fffbde45b</guid><dc:creator>Pete Skeggs</dc:creator><description>&lt;p&gt;Hello. I did not realize you were following that Miro diagram and &amp;quot;JWT authentication&amp;quot; document. These are unnecessary to follow to accomplish your goal. They are only provided to give a curious user a&amp;nbsp;deep explanation into all the options for provisioning and how JWTs work in a general sense with nRF Cloud. In fact, the note on the &amp;quot;JWT authentication&amp;quot; document states:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;Note:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;This guide is not a tutorial, and does not model real-world use cases with specific hardware.&lt;br /&gt;Instead, this guide provides a conceptual understanding of JWT authentication on nRF Cloud using tokens that you generate using an online tool.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The device provisioning service is&amp;nbsp;definitely not required to use JWTs. You do not need to run the nRF provisioning sample.&amp;nbsp;You do not need to use a script to generate a JWT to use with your Thingy:91. You only need to have ES256 certificates and&amp;nbsp; modem firmware &amp;gt;= 1.3.0 installed in the device. The &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;device_credentials_installer.py&lt;/span&gt;&amp;nbsp;script will install ES256 certificates for you.&lt;br /&gt;&lt;br /&gt;Note that&amp;nbsp;in your new screenshot of the terminal output, it is still having serial communication issue -- it says &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;quot;Serial timeout&amp;quot;&lt;/span&gt;. What application was installed on your Thingy:91 when you ran this script?&lt;br /&gt;&lt;br /&gt;After you used the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;device_credentials_installer.py&lt;/span&gt; and ran &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_cloud_onboard.py&lt;/span&gt;, you should see your device listed again in your nRF Cloud account. Do you?&amp;nbsp;I suspect they failed, because you likely had the nRF provisioning sample present. The interactive shell is not supported by &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;device_credentials_installer.py&lt;/span&gt; -- it sends raw modem AT commands, not shell commands, to the device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;your device&amp;nbsp;is not listed in your account, please first install the AT client sample which the&amp;nbsp;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;device_credentials_installer.py &lt;/span&gt;script needs for it to run properly. A precompiled copy of the AT client sample is available in the Thingy:91 downloads .zip file here: &lt;a href="https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-91/Download#infotabs"&gt;https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-91/Download#infotabs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please rerun those two scripts and share the full output of each. Also tell me if you now see your device listed again in your account.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Once your device is listed, your device is fully ready to use JWTs. The nrf_cloud_jwt library does this for you. This library is automatically used in our sample applications for REST: &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_cloud_rest_fota, nrf_cloud_rest_device_message,&lt;span style="font-family:arial, helvetica, sans-serif;"&gt; and&lt;/span&gt; nrf_cloud_rest_cell_location,&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;location&lt;/span&gt;&lt;/span&gt; samples. You only need to compile and flash one of these samples to try it out.&lt;br /&gt;&lt;br /&gt;Please see this more-relevant documentation:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/external_comp/nrf_cloud.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/external_comp/nrf_cloud.html&lt;/a&gt;&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/networking/nrf_cloud_rest.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/networking/nrf_cloud_rest.html&lt;/a&gt;&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/cellular/nrf_cloud_rest_fota/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/cellular/nrf_cloud_rest_fota/README.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Serial Timeout  when running Claiming and Provisioning python script</title><link>https://devzone.nordicsemi.com/thread/501819?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 03:15:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d35b110-49db-4dac-b049-9da81df041e4</guid><dc:creator>nobuddy</dc:creator><description>&lt;p&gt;That was me -- I also posted on the github repo in case it was an issue. The&amp;nbsp;&lt;a href="https://miro.com/app/board/uXjVPfcfAd8=/"&gt;Decision flow for nRF Cloud Provisioning&lt;/a&gt;&amp;nbsp;JWT mentions&amp;nbsp;&amp;quot;nRF9160 DK and Thingy:91 shipped with RSA256 must be reprovisioned to get ES256 certificate&amp;quot; so I thought the script supported it.&lt;/p&gt;
&lt;p&gt;I confirmed I have no issues communicating with the Thingy:91 on COM8&amp;nbsp;and updated the firmware on the nRF52840, see images below.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Thingy91Serial.JPG" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Thingy91_5F00_52_5F00_ConnectivityBridge.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;I then:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;removed both devices listed in my nRF cloud,&lt;/li&gt;
&lt;li&gt;reran the device_credentials_installer.py and nrf_cloud_onboard.py,&lt;/li&gt;
&lt;li&gt;rebuilt the Thingy91 with the nRF provisioning sample,&lt;/li&gt;
&lt;li&gt;ensured I still could communicate through serial via nRF Serial Terminal,&lt;/li&gt;
&lt;li&gt;disconnected the device, and&lt;/li&gt;
&lt;li&gt;ran the nrf_claim_and_provision_device.py with the same error, see image below&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/thing91final2.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;This seems to confirm nRF9160 isn&amp;#39;t supported.&lt;/p&gt;
&lt;p&gt;If it isn&amp;#39;t supported but the script can generate a JWT for private keys, what is the next step to get JWT authentication working? Can I continue following the flow chart and try one of the JWT samples for authorization? Or should I continue with the &lt;a href="https://docs.nordicsemi.com/bundle/nrf-cloud/page/Devices/Security/JWT.html"&gt;JWT authentication for nRF Cloud&lt;/a&gt;? Or&amp;nbsp;are there other steps I need to take specific for the nRF9160?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Serial Timeout  when running Claiming and Provisioning python script</title><link>https://devzone.nordicsemi.com/thread/501802?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2024 20:10:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dffec6eb-c194-4aed-875b-c224cd516b29</guid><dc:creator>Pete Skeggs</dc:creator><description>&lt;p dir="auto"&gt;Addendum:&lt;br /&gt;A colleague pointed out the most obvious problem, however. The nRF Cloud device provisioning service does not support the nRF9160, but only the nRF9151 and nRF9161. See:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/cellular/nrf_provisioning/README.html#requirements."&gt;docs.nordicsemi.com/.../README.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But, the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class="notranslate"&gt;device_credentials_installer.py&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;script does support all nRF91 families running modem firmware &amp;gt;= 1.3.0, and will use a securely generated device private key which is locked inside the modem and is not vulnerable to extraction. The JWT will then be signed by the private key.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Serial Timeout  when running Claiming and Provisioning python script</title><link>https://devzone.nordicsemi.com/thread/501800?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2024 18:41:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8015b213-fadc-498b-b719-d577ae71d1a7</guid><dc:creator>Pete Skeggs</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/nobuddy"&gt;nobuddy&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I saw a nearly identical issue raised in the github repository for this script, and I answered it there:&lt;br /&gt;&lt;a href="https://github.com/nRFCloud/utils/issues/42#issuecomment-2338809075"&gt;https://github.com/nRFCloud/utils/issues/42#issuecomment-2338809075&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The issues 1 and 2 you mention are unrelated. You have a serial communications issue so none of those options matter.&lt;br /&gt;&lt;br /&gt;Regarding having the device listed twice, I recommend removing both devices listed before running the script again, once you resolve the serial communications issue. The certificates needed for the old device ID will be overwritten in the device, so that old ID will no longer work.&lt;br /&gt;&lt;br /&gt;Make sure you consider what kind of device ID you want the device to use with nRF Cloud. By default, the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;claim_and_provision_device.py&lt;/span&gt; script assumes it will use a UUID-style device ID. In order to use an nrf-IMEI style ID,&amp;nbsp;the the options:&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;--id_imei --id_str nrf-&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>