<?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>Trouble connecting https socket second time in nrf9160. And connecting debugger issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58442/trouble-connecting-https-socket-second-time-in-nrf9160-and-connecting-debugger-issue</link><description>We are developing an application that requires the https connection to the server. I am using SDK v1.2.0 and https_client as a sample example. The trouble I am having is that the socket connects the first time and exchanges the data with the server. But</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Mar 2020 16:26:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58442/trouble-connecting-https-socket-second-time-in-nrf9160-and-connecting-debugger-issue" /><item><title>RE: Trouble connecting https socket second time in nrf9160. And connecting debugger issue</title><link>https://devzone.nordicsemi.com/thread/238112?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 16:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e565250e-5981-44d6-8a10-451cbbf6655b</guid><dc:creator>Amritpal</dc:creator><description>&lt;p&gt;Thanks Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble connecting https socket second time in nrf9160. And connecting debugger issue</title><link>https://devzone.nordicsemi.com/thread/238111?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 16:24:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a964cc3-a86e-4623-9376-5b5634d8ab90</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Thanks for the traces and the code.&lt;/p&gt;
&lt;p&gt;We are still working on identifying the source of the problem, but it seems like it was introduced in bsdlib v6.1.&lt;/p&gt;
&lt;p&gt;If I use v6.0 instead, the problem does not occur for me.&lt;/p&gt;
&lt;p&gt;You can revert to v6.0 by replacing the 1.2.0 revision of nrfxlib on line 72 in &amp;lt;ncs&amp;gt;/nrf/west.yml with 3e381d09f1d305e230435f5b6e4c9ef928b6a697, and running &amp;quot;west update&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble connecting https socket second time in nrf9160. And connecting debugger issue</title><link>https://devzone.nordicsemi.com/thread/237880?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 18:22:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c9b153a-a41b-434f-9dbc-c82312165d74</guid><dc:creator>Amritpal</dc:creator><description>&lt;p&gt;Thanks Didrik,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sorry for the delay was busy in other stuff&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I was able to fix my SES with your files, thanks for that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the source code with the workaround. It is based on https_client example. The workaround is&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;//Work around for socekt
        if(fd!=2)
        {
          printk(&amp;quot;closing socket: %d\n&amp;quot;, fd);
          (void)close(fd);
        }
        else
        {
          printk(&amp;quot;skipping closing socket: %d\n&amp;quot;, fd);
        }&lt;/pre&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2626.main.c"&gt;devzone.nordicsemi.com/.../2626.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;to disable workaround just change&amp;nbsp;the if condition to be always true in close&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am also attaching the modem trace files one in which socket is unresponsive and one with the work around&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/code-stuck.bin"&gt;devzone.nordicsemi.com/.../code-stuck.bin&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/with_2D00_workaround.bin"&gt;devzone.nordicsemi.com/.../with_2D00_workaround.bin&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trouble connecting https socket second time in nrf9160. And connecting debugger issue</title><link>https://devzone.nordicsemi.com/thread/237853?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 16:01:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc88b7ad-1dff-4408-94a1-328b8b1ce8a1</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I have been able to provoke behavior similar to what you are seeing using the cloud_client sample. I have not yet been able to recreate your workaround (simply opening another socket does not work), but I will keep working on it tomorrow. I have captured a modem trace and forwarded it to our R&amp;amp;D team for deeper analysis. However, I would still like a modem trace from you to confirm that we are seeing the same problem.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll keep you updated when I know more.&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: Trouble connecting https socket second time in nrf9160. And connecting debugger issue</title><link>https://devzone.nordicsemi.com/thread/237205?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 15:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6717371-50d6-43d5-8e98-712acd0bfd71</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;We are seeing some issues with SES v4.42. They are reported internally, and we are working on fixing them.&lt;/p&gt;
&lt;p&gt;As a workaround, you can downgrade the J-Link version used by SES to v6.50 by copying the files in JLink=6.50.zip to the bin folder in your SES install directory (replacing any previous versions that might be there).&lt;/p&gt;
&lt;p&gt;You must also ensure that SES loads the elf files that your application consists of in the correct order (MCUBoot first, then SPM, finally your application). If your application does not use MCUBoot, SPM would be first, then your application.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-f15d7d25f9f84e2c9fa50ba62d038e94/ses_5F00_project_5F00_options1.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-f15d7d25f9f84e2c9fa50ba62d038e94/ses_5F00_project_5F00_options2.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-f15d7d25f9f84e2c9fa50ba62d038e94/JLink_5F00_6.50.zip"&gt;devzone.nordicsemi.com/.../JLink_5F00_6.50.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How do you close, then re-open the socket?&lt;/p&gt;
&lt;p&gt;Can you share some code that reproduces the problem?&lt;/p&gt;
&lt;p&gt;Can you take a modem trace that captures the problem?&lt;/p&gt;
&lt;p&gt;A trace that shows your workaround to compare with would also be useful.&lt;/p&gt;
&lt;p&gt;You can follow this guide to learn how to take modem traces: &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></channel></rss>