<?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>mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65576/mqtt_connect-fails-with-error--95-aws_fota</link><description>Hi ! 
 
 
 
 
 
 
 
 I am working on aws_fota, with a nrf9160 dk, sdk 1.3.0. When I try to connect in mqtt, I get my IPv4 address I get the following message: ERROR - mqtt_connect -95. When I try to debug myself, I notice that my error appears on line</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Sep 2020 08:05:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65576/mqtt_connect-fails-with-error--95-aws_fota" /><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268210?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2020 08:05:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7386240-0512-43fb-a8e2-a4c9f3a0dc50</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;My pleasure! Glad I could help!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268099?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 14:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e1ab965-862d-433c-a8a4-741e457f5875</guid><dc:creator>lecozahu</dc:creator><description>&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;Indeed, I did not take the correct amazon root certificate.&lt;/span&gt; &lt;span title=""&gt;I can now connect.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt; &lt;span class="" title=""&gt;thanks a lot for your help!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;Lecozahu&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268096?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 14:00:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c5cd491-4933-44c7-ab93-1b19ea22b04c</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;That should not be the problem, as I did not modify it either and successfully established a connection.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;However, I managed to get the -95 error by using the wrong certificates (as you did previously), so I just want to ensure that your certificates are correct:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CLOUD_CLIENT_PRIVATE_KEY contains the &lt;strong&gt;&amp;lt;unique_id&amp;gt;-private.pem&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CLOUD_CLIENT_PUBLIC_CERTIFICATE contains the&amp;nbsp; &lt;strong&gt;&amp;lt;unique_id&amp;gt;-certificate.pem&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CLOUD_CA_CERTIFICATE contains&lt;strong&gt; AmazonRootCA1.pem&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Is this your current certificates.h configuration?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You have probably followed the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/aws_fota/README.html"&gt;readme for the sample&lt;/a&gt;, but make sure that every step is correct.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards&lt;br /&gt;Carl Richard&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268087?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 13:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c220e7b-1cd1-4944-b4ad-871e1da80820</guid><dc:creator>lecozahu</dc:creator><description>&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span title=""&gt;I did not modify the variable: CONFIG_CLOUD_CERT_SEC_TAG.&lt;/span&gt; &lt;span class="" title=""&gt;Could this be the explanation?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;Best regards, &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;Lecozahu&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268079?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 12:54:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:310012d5-4c91-4bb3-9a20-0886e9e9cae3</guid><dc:creator>lecozahu</dc:creator><description>&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;I took the first RSA 2048 certificate (I&amp;#39;m not sure which one exactly to take) but it still doesn&amp;#39;t work.&lt;/span&gt; &lt;span class="" title=""&gt;I still get the same error... &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;best regards, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;Lecozahu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268065?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 12:30:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:169dd7f3-c86a-4ab3-ae6f-1c42870e0b0f</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;That could be your error, yes.&lt;br /&gt;&lt;br /&gt;The&amp;nbsp;&lt;span&gt;CLOUD_CLIENT_PUBLIC_CERTIFICATE should contain the .cert.perm you received. The&amp;nbsp;CLOUD_CA_CERTIFICATE should contain the AWS root certificate which is found&amp;nbsp;&lt;a href="https://docs.aws.amazon.com/iot/latest/developerguide/server-authentication.html?icmpid=docs_iot_console#server-authentication-certs"&gt;here&lt;/a&gt;. Hope this helps!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268059?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 12:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a262f1e0-fe42-4cb1-8232-81f475807e12</guid><dc:creator>lecozahu</dc:creator><description>&lt;div class="result-shield-container tlid-copy-target"&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span title=""&gt;Hello again!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span title=""&gt;Yes, I have &amp;quot;... \ n&amp;quot; \ on each line.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span title=""&gt;For certificates, I have two non-private keys provided by AWS.&lt;/span&gt;&lt;br /&gt;&lt;span title=""&gt;A file: .cert.perm that I put in the zone: CLOUD_CA_CERTIFICATE&lt;/span&gt;&lt;br /&gt;&lt;span title=""&gt;an another file :&amp;nbsp; .public.key file that I put in the zone: CLOUD_CLIENT_PUBLIC_CERTIFICATE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="" title=""&gt;Could my error come from there?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span title=""&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268053?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 12:02:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58a90638-c572-46ff-bbcb-64523637da52</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello again!&lt;br /&gt;&lt;br /&gt;I&amp;#39;m trying to reproduce the issue myself now. While I&amp;#39;m at it, did you make sure to add the three certificates correctly with &amp;lt;&amp;nbsp;&lt;strong&gt;&amp;quot;(...)\n&amp;quot;\ &lt;/strong&gt;&amp;gt;&amp;nbsp;at every line?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Note aswell that you must add the&lt;strong&gt; public certificate&lt;/strong&gt;, not the public key.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268023?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 10:51:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1ad10e1-b6b0-46ef-ad19-9c94f5a86399</guid><dc:creator>lecozahu</dc:creator><description>&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span title=""&gt;Carl Richard,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="" title=""&gt;I was based on the aws_fota project, I did not touch the main, it is during the initialization of the client that the error appears.&lt;/span&gt;&lt;br /&gt;&lt;span class="" title=""&gt;I modified several things:&lt;/span&gt;&lt;br /&gt;&lt;span class="" title=""&gt;- I have defined CONFIG_PROVISION_CERTIFICATES&lt;/span&gt;&lt;br /&gt;&lt;span class="" title=""&gt;-I modified the certificate with the private, public and CA keys&lt;/span&gt;&lt;br /&gt;&lt;span class="" title=""&gt;-I modified in Kconf the address of the broker ending with amazonaws.com&lt;/span&gt;&lt;br /&gt;&lt;span class="" title=""&gt;- I modified CONFIG_CLOUD_CLIENT_ID and put it in the name of the object created on aws.&lt;/span&gt;&lt;br /&gt;&lt;span class="" title=""&gt;-I kept port 8883&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;Best regards, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;lecozahu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect fails with error -95 aws_fota</title><link>https://devzone.nordicsemi.com/thread/268017?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 10:38:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05052ddc-8686-435a-bb70-3dc6c64fdc2c</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello, lecozahu!&lt;br /&gt;&lt;br /&gt;What sample have you based your project on and what amendments have you made?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Error -95 is probably&amp;nbsp;EOPNOTSUPP, meaning that the requested operation is not supported on the socket.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>