<?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>Sample  nRF9160: Azure IoT Hub</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66802/sample-nrf9160-azure-iot-hub</link><description>I created an Azure IOT Hub and simulated a X.509 device using C and device SDK for Azure . 
 No problems here. 
 
 Then I run sample nRF9160: Azure Iot Hub and receive the following error 
 
 
 
 Now I look for some guidance to troubleshot the mqtt_connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Oct 2020 14:30:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66802/sample-nrf9160-azure-iot-hub" /><item><title>RE: Sample  nRF9160: Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/274378?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 14:30:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39075c3f-d607-439b-a1b8-ab80a54cd8d8</guid><dc:creator>Apfelsine</dc:creator><description>&lt;p&gt;Here we go - Success!&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1602512962945v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the clarification. Sabine Urquhart&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sample  nRF9160: Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/274312?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 12:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da12f532-acf9-422e-83cb-4a39c10eb15f</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Sabine,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In our docs about Azure we point&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-security-x509-get-started" rel="noopener noreferrer" target="_blank"&gt;to this link&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;to get the certificates.&lt;/p&gt;
&lt;p&gt;In that page there is a link to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/Azure/azure-iot-sdk-c/blob/master/tools/CACertificates/CACertificateOverview.md"&gt;&amp;quot;Managing test CA certificates for samples and tutorials&amp;quot;&lt;/a&gt;&amp;nbsp;which has the scripts used and the explanations you are looking for.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;br /&gt;&lt;strong&gt;So the following is needed to get it to work with PowerShell-generated certs:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;CA certificate: Baltimore CyberTrust Root certificate&lt;/li&gt;
&lt;li&gt;Client certificate: &amp;lt;device name&amp;gt;-public.pem&lt;/li&gt;
&lt;li&gt;Private key: &amp;lt;device name&amp;gt;-private.pem&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;RootCA.pem&amp;quot;&amp;nbsp;&lt;/em&gt;has to be uploaded to the IoT Hub&amp;nbsp;&lt;span&gt;&lt;strong&gt;and&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;verified.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;For bash-generated certs, then the following is needed:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;CA certificate: Baltimore CyberTrust Root certificate&lt;/li&gt;
&lt;li&gt;Client certificate:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;certs/new-device.cert.pem&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Private key:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;private/new-device.key&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;em&gt;&amp;quot;certs/azure-iot-test-only.root.ca.cert.pem&amp;quot;&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;has to be uploaded to IoT Hub&amp;nbsp;&lt;span&gt;&lt;strong&gt;and&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;verified.&lt;/strong&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Martin L.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sample  nRF9160: Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/274057?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 13:46:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6f31631-a4d5-4cb1-8176-c0ed6d7048ee</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Apfelsine,&lt;br /&gt;Still looks like there some issues with the certificates unfortunately.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You can find the&amp;nbsp;Baltimore CyberTrust Root certificate by following &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/net/azure_iot_hub.html#prerequisites-for-connecting-to-azure-iot-hub" rel="noopener noreferrer" target="_blank"&gt;the link in the instructions here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem" rel="noopener noreferrer" target="_blank"&gt;Server-certificate is this.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The RootCA.pem that you mention is probably the generated certificate, that should be uploaded to the IoT Hub.&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&amp;quot;Does &lt;/span&gt;&lt;span&gt;&lt;strong&gt;&lt;b&gt;Private key&lt;/b&gt;&lt;/strong&gt; &lt;/span&gt;&lt;span&gt;equate to file &lt;/span&gt;&lt;span&gt;mydevice-private.pem&lt;/span&gt;&lt;span&gt;&lt;span&gt;?&amp;quot; - Yes&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;&amp;quot;Does &lt;/span&gt;&lt;strong&gt;&lt;span&gt;&lt;b&gt;Device certificate&lt;/b&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; equate to file &lt;/span&gt;&lt;span&gt;mydevice-public.pem&lt;/span&gt;&lt;span&gt;&lt;span&gt;?&amp;quot; - I think this needs to be chained with the intermediate-certificate.e.g.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-----BEGIN CERTIFICATE-----
&amp;lt;Device cert&amp;gt;
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
&amp;lt;Intermediate cert&amp;gt;
-----END CERTIFICATE-----&lt;/pre&gt;&lt;/p&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sample  nRF9160: Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/273577?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 16:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be72e77e-8144-4427-8c5b-fde99438ef99</guid><dc:creator>Apfelsine</dc:creator><description>&lt;p&gt;Here is another thought. Could you please have a look at my Kconfig file. Maybe I am doing something wrong there?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zz_5F00_azure_5F00_iot_5F00_hub.zip"&gt;devzone.nordicsemi.com/.../zz_5F00_azure_5F00_iot_5F00_hub.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sample  nRF9160: Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/273571?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 16:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b84e5809-aafd-412c-82e7-a5f4b962d2f9</guid><dc:creator>Apfelsine</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;thank you for looking into this. I did as you suggested I uncommented CONFIG_AZURE_IOT_HUB_LOG_LEVEL_DBG=y in proj.conf and I followed all the steps to provision the certificate more than once. I still receive the same error. I attached the latest log file. What else can I do to troubleshoot?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2020_2D00_10_2D00_06T16_5F00_35_5F00_55.766Z_2D00_log.txt"&gt;devzone.nordicsemi.com/.../2020_2D00_10_2D00_06T16_5F00_35_5F00_55.766Z_2D00_log.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sample  nRF9160: Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/273426?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 09:50:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c71e35b-6d77-4eee-8133-c42fc6c89770</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Sabine,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span&gt;A project that has the following in prj.conf:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NEWLIB_LIBC=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Will use the&lt;a href="https://github.com/eblot/newlib/blob/master/newlib/libc/include/sys/errno.h" rel="noopener noreferrer" target="_blank"&gt; errno table according to newlib.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So the error you are seeing is &lt;a href="https://github.com/eblot/newlib/blob/master/newlib/libc/include/sys/errno.h#L131" rel="noopener noreferrer" target="_blank"&gt;EOPNOTUPP&lt;/a&gt;:&amp;nbsp;&lt;strong&gt;&amp;quot;Operation not supported on transport endpoint &amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I would also recommend that you enable some debug flags to get some extra Log output messages that could give more descriptive information about issues like this.&lt;br /&gt;&lt;br /&gt;Add this in the prj.conf file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG=y
CONFIG_AZURE_IOT_HUB_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;This is most likely a certificate issue.&lt;br /&gt;Have you followed all the steps &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/net/azure_iot_hub.html#prerequisites-for-connecting-to-azure-iot-hub" rel="noopener noreferrer" target="_blank"&gt;to provision the certificates?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Martin L.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>