<?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>https client connection problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59012/https-client-connection-problem</link><description>Hi , 
 I am using nrf connect 1.2.0 dk. I am now testing the https client example. 
 However, I always get the connection fail error as belows. 
 
 Provisioning certificate 
 
 
 Waiting for network.. OK 
 
 
 Connecting to google.com 
 
 
 connect()</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Mar 2020 10:28:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59012/https-client-connection-problem" /><item><title>RE: https client connection problem</title><link>https://devzone.nordicsemi.com/thread/241077?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 10:28:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec1e0743-bfcc-4889-b5e7-367e23faed78</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;No, the nRF Cloud CA certificate should not be necessary to run the https_client sample.&lt;/p&gt;
&lt;p&gt;However, I can imagine that if the nRF Cloud certificate somehow got corrupted, and thereby corrupted the filesystem used to store the certificates, that might explain why re-writing the nRF Cloud certificate lets you run the https_client sample.&lt;/p&gt;
&lt;p&gt;Anyway, good to hear that it is now working!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: https client connection problem</title><link>https://devzone.nordicsemi.com/thread/241016?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 02:05:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89302afa-5522-449e-8faf-8c7aafe5273e</guid><dc:creator>chapman</dc:creator><description>&lt;p&gt;After I reload the certificate which is downloaded from nrf cloud. It can run properly in asset tracker example and https_client example.&amp;nbsp; Does it mean that the nrf cloud certificate is required for https_client example?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: https client connection problem</title><link>https://devzone.nordicsemi.com/thread/240399?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2020 10:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0289b93b-2bd1-4c02-bfc3-93bd0a3fb0fa</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;The problem seems to be related to the network.&lt;/p&gt;
&lt;p&gt;Your trace shows that the connection gets reset during the TLS handshake, which in turn causes the connect to fail.&lt;/p&gt;
&lt;p&gt;When looking further into the trace, I find several lines where the modem reports &amp;quot;No PLMN action allowed&amp;quot;.&lt;/p&gt;
&lt;p&gt;Can you try to read out the certificate that is written to the modem?&lt;/p&gt;
&lt;p&gt;The AT command would be: AT%CMNG=2,42,0&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: Note that the modem must be disabled (CFUN=4) when sending the command&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The output should match the CA certificate of google.com. If it does not, that would explain the error.&lt;/p&gt;
&lt;p&gt;What SIM card are you using?&lt;/p&gt;
&lt;p&gt;Are you using the same network (NB-IoT, and legacy PCO) and SIM card when running the asset_tracker sample?&lt;/p&gt;
&lt;p&gt;Could you take a modem trace of that as well for me to compare?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: https client connection problem</title><link>https://devzone.nordicsemi.com/thread/240183?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 09:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c7000a3-2fd0-4ec3-bc41-edd0c9429162</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Looking at the trace, there is something going wrong during the TLS handshake. I am working with the modem team to figure out exactly what.&lt;/p&gt;
&lt;p&gt;I will let you know when I have more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: https client connection problem</title><link>https://devzone.nordicsemi.com/thread/239630?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 02:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68732ef5-e921-4974-b89f-12f80491dbde</guid><dc:creator>chapman</dc:creator><description>&lt;p&gt;I have tried again with original certificate but it still got the same result.&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;connect() failed, err: 45&lt;/pre&gt;
&lt;p&gt;I am using NB-IoT with modem firmware version:&amp;nbsp;&lt;span&gt;mfw_nrf9160_1.1.1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Asset tracker is workable in our network.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; I have set two things in project configuration: NB-Iot and Legacy PCO.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Modem trace is attached. Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/trace_2D00_2020_2D00_03_2D00_13T02_2D00_39_2D00_26.454Z.bin"&gt;devzone.nordicsemi.com/.../trace_2D00_2020_2D00_03_2D00_13T02_2D00_39_2D00_26.454Z.bin&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: https client connection problem</title><link>https://devzone.nordicsemi.com/thread/239523?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 12:28:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06b6f4d3-7f26-485d-a36c-88007f540231</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The sample works for me without any modifications. As the sample comes with the necessary certificate, it should not be necessary to download a new certificate.&lt;/p&gt;
&lt;p&gt;One check you can do is to see if the certificate you downloaded matches the one used by the sample by default.&lt;/p&gt;
&lt;p&gt;Are you using LTE-M or NB-IoT?&lt;/p&gt;
&lt;p&gt;What verion on the modem firmware are you using?&lt;/p&gt;
&lt;p&gt;Have you been able to use other samples that use TCP/TLS on your network (e.g. the asset_tracker sample)?&lt;/p&gt;
&lt;p&gt;Can you take a modem trace, to help me identify the problem?&lt;/p&gt;
&lt;p&gt;If you do not know how to take a modem trace, you can follow this guide:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: https client connection problem</title><link>https://devzone.nordicsemi.com/thread/239488?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 10:12:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4d73fa0-49e5-4c21-8001-a43475ab8556</guid><dc:creator>chapman</dc:creator><description>&lt;p&gt;Hi ,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also try download the cert from chrome browser at google.com which is saved as a .cer files. &amp;#39;&lt;/p&gt;
&lt;p&gt;Then I convert&amp;nbsp; it by openssl:&lt;/p&gt;
&lt;p&gt;openssl x509 -in google.cer -inform der -outform pem -out google.pem&lt;/p&gt;
&lt;p&gt;Then I add back double quotation and newline symbol for each line.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, the result is same:&lt;/p&gt;
&lt;pre&gt;&lt;br /&gt;connect() failed, err: 45&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>