<?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>nRF Cloud CoAP connection fails with err -111 (self-signed CA certificate)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127576/nrf-cloud-coap-connection-fails-with-err--111-self-signed-ca-certificate</link><description>Hi, 
 
 
 
 
 
 I&amp;#39;m developing a custom board based on nRF9151 (similar to Thingy:91X) and trying to connect to nRF Cloud for location services (A-GNSS, Wi-Fi location, Cellular location). 
 
 
 
 
 
 ## Environment 
 
 
 - nRF Connect SDK: v3.1.1 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Apr 2026 08:09:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127576/nrf-cloud-coap-connection-fails-with-err--111-self-signed-ca-certificate" /><item><title>RE: nRF Cloud CoAP connection fails with err -111 (self-signed CA certificate)</title><link>https://devzone.nordicsemi.com/thread/564588?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2026 08:09:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c41f2606-ca0c-4caa-a23e-1403e1c17d2b</guid><dc:creator>Pascal Hdz</dc:creator><description>&lt;p&gt;Hello Min Kim,&lt;/p&gt;
&lt;p&gt;Do you still need help on this or can we close this ticket?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Pascal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Cloud CoAP connection fails with err -111 (self-signed CA certificate)</title><link>https://devzone.nordicsemi.com/thread/564165?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2026 09:40:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61c31134-1e9e-4781-8b3b-96f8598e139c</guid><dc:creator>Pascal Hdz</dc:creator><description>&lt;p&gt;Hello Min Kim,&lt;/p&gt;
&lt;p&gt;You don&amp;#39;t need to do the step 3 and 4 that you mention in your ticket description. The auto-onboarding will handle a remote provisioning of your device so please avoid doing it locally.&lt;/p&gt;
&lt;p&gt;Please follow the next steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Select and unclaim the device from the claimed devices list:&amp;nbsp;&lt;a href="https://app.nrfcloud.com/#/claimed-devices"&gt;https://app.nrfcloud.com/#/claimed-devices&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Install &lt;a href="https://github.com/nRFCloud/utils"&gt;nRF Cloud Utils&lt;/a&gt;&amp;nbsp;and delete the provisioned certificates with the next command:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;nrfcredstore&amp;nbsp;&amp;lt;YOUR_PORT&amp;gt;&amp;nbsp;deleteall&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Repeat the auto-onboarding process. You could repeat the process you did before or use&amp;nbsp;nRF Cloud Utils as described in our documentation:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/nrf-cloud/page/GettingStarted.html#provision-one-device-using-provisioning-service"&gt;https://docs.nordicsemi.com/bundle/nrf-cloud/page/GettingStarted.html#provision-one-device-using-provisioning-service&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Pascal.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Cloud CoAP connection fails with err -111 (self-signed CA certificate)</title><link>https://devzone.nordicsemi.com/thread/564131?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2026 20:21:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d492e554-3cdf-4b1d-974a-6a253b4afb51</guid><dc:creator>mincom</dc:creator><description>&lt;p&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;Update: Still getting -111 error after nRF Cloud auto-onboarding&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I tried a different approach using the attestation token and &amp;quot;Create new rule for onboarding to nRF Cloud&amp;quot; option as described in the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://wiki.makerdiary.com/nrf9151-connectkit/guides/ncs/samples/nrf_provisioning/" rel="noopener noreferrer" target="_blank"&gt;nRF9151 Connect Kit guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;Steps I followed:&lt;/span&gt;&lt;/p&gt;
&lt;ol data-streamdown="ordered-list"&gt;
&lt;li data-streamdown="list-item"&gt;Flashed&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class="md-inline-variable-like"&gt;nrf_provisioning&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;sample to custom board&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;Got attestation token using&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class=""&gt;nrf_provisioning token&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;command&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;In nRF Cloud UI: Claim Device &amp;rarr; pasted attestation token &amp;rarr; enabled &amp;quot;Create new rule for onboarding to nRF Cloud&amp;quot; &amp;rarr; Create Rule and Claim Device&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;Rebooted device - provisioning completed successfully&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;nRF Cloud UI shows device status as&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;READY&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;with:
&lt;ul data-streamdown="unordered-list"&gt;
&lt;li data-streamdown="list-item"&gt;Cloud Access Key Generation: Succeeded&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;Server Certificate: Succeeded (Generated for nRF Cloud auto-onboarding)&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;Client Certificate: Succeeded (Generated for nRF Cloud auto-onboarding)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;Verification:&lt;/span&gt;&lt;/p&gt;
&lt;div class="composer-message-codeblock"&gt;
&lt;div class="ui-code-block"&gt;
&lt;div class="ui-code-block-content"&gt;
&lt;div class="ui-scroll-area" data-visibility="hover" data-direction="horizontal"&gt;
&lt;div class="ui-scroll-area__viewport"&gt;
&lt;div class="ui-scroll-area__content"&gt;
&lt;div class="ui-default-code ui-code-block-default-code"&gt;
&lt;div class="ui-default-code__content"&gt;
&lt;div class="ui-default-code__line"&gt;
&lt;div class="ui-default-code__line-content"&gt;&lt;span&gt;AT%CMNG=1,16842753&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ui-default-code__line"&gt;
&lt;div class="ui-default-code__line-content"&gt;&lt;span&gt;%CMNG: 16842753,0,&amp;quot;F6EEF665B61C4F9852AC3C84747D0EE92D0E79B24C187ABB7CEEF7A85E173534&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ui-default-code__line"&gt;
&lt;div class="ui-default-code__line-content"&gt;&lt;span&gt;%CMNG: 16842753,1,&amp;quot;E882E67370D8457A30341D0FC89E1E0E5D95F517263578A1DE547A459E0F1662&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ui-default-code__line"&gt;
&lt;div class="ui-default-code__line-content"&gt;&lt;span&gt;%CMNG: 16842753,2,&amp;quot;79EB6167AACF3A9333FFA8CF9F15EC351AF898F637499264B94F4F77444D59A0&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Server CA (Type 0) content is&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;identical&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to factory-provisioned Thingy:91 X (SEC_TAG 4242):&lt;/p&gt;
&lt;ul data-streamdown="unordered-list"&gt;
&lt;li data-streamdown="list-item"&gt;Amazon Root CA 1&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;nRF Cloud CoAP CA&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;But still getting -111 error:&lt;/span&gt;&lt;/p&gt;
&lt;div class="composer-message-codeblock"&gt;
&lt;div class="ui-code-block"&gt;
&lt;div class="ui-code-block-content"&gt;
&lt;div class="ui-scroll-area" data-visibility="hover" data-direction="horizontal"&gt;
&lt;div class="ui-scroll-area__viewport"&gt;
&lt;div class="ui-scroll-area__content"&gt;
&lt;div class="ui-default-code ui-code-block-default-code"&gt;
&lt;div class="ui-default-code__content"&gt;
&lt;div class="ui-default-code__line"&gt;
&lt;div class="ui-default-code__line-content"&gt;&lt;span&gt;nrf_cloud_coap_transport: Could not connect to nRF Cloud CoAP server coap.nrfcloud.com, port: 13334. err: -111&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ui-scroll-area__scrollbar" data-scrollable="true"&gt;
&lt;div class="ui-scroll-area__thumb"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;Additional observation:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-streamdown="unordered-list"&gt;
&lt;li data-streamdown="list-item"&gt;Factory Thingy:91 X with SEC_TAG=4242 &amp;rarr; Works ✓&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;Factory Thingy:91 X with SEC_TAG=16842753 (auto-onboarded) &amp;rarr; Does NOT work ✗&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;Custom board with SEC_TAG=16842753 (auto-onboarded) &amp;rarr; Does NOT work ✗&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It seems like the Client Certificate signed by nRF Cloud auto-onboarding is being rejected during TLS handshake, even though the Server CA is correct.&lt;/p&gt;
&lt;p&gt;&lt;span class="font-semibold" data-streamdown="strong"&gt;Questions:&lt;/span&gt;&lt;/p&gt;
&lt;ol data-streamdown="ordered-list"&gt;
&lt;li data-streamdown="list-item"&gt;Is there a difference between factory-provisioned certificates (SEC_TAG 4242) and auto-onboarded certificates (SEC_TAG 16842753)?&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;Is there any additional configuration needed for auto-onboarded devices to use CoAP?&lt;/li&gt;
&lt;li data-streamdown="list-item"&gt;How can I verify that the Client Certificate is correctly signed and trusted by nRF Cloud?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>