<?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>Re-connect to the AWS IoT Cloud with nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63161/re-connect-to-the-aws-iot-cloud-with-nrf9160</link><description>Hello, guys. 
 We have nRF9160DK and nRF Connect SDK v1.3.0. The version of the LTE modem firmware is the latest (v.1.2.0). 
 In our design, we are able to initially connect to AWS IoT and exchange the data with the Cloud by using cloud_client example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jul 2020 10:05:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63161/re-connect-to-the-aws-iot-cloud-with-nrf9160" /><item><title>RE: Re-connect to the AWS IoT Cloud with nRF9160</title><link>https://devzone.nordicsemi.com/thread/258565?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 10:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:603d8ca9-9203-45a4-8210-064bbf73e40d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;If I am not mistaken, these sim cards have a minimum shut down time of ~10 minutes. Just for testing purposes, can you try to set a timer for 11 or 12 minutes, and then try to reconnect? Does it behave the same, or are you able to successfully reconnect? I am not sure how the different network distributers handle trying to break this specification.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-connect to the AWS IoT Cloud with nRF9160</title><link>https://devzone.nordicsemi.com/thread/258172?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 15:19:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f883460b-24bf-4392-8abd-40a5add6e1d3</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Thanks for your reply. We get the following error when we try to re-connect:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;E: Modem could not be configured, error: -120&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is when we try to completely disconnect from the network and turn off the modem with the following lines:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cloud_disconnect(cloud_backend);
lte_lc_offline();
lte_lc_power_off();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and when we try to re-connect after 10 seconds starting with the &lt;strong&gt;&lt;em&gt;&lt;span style="background-color:#ccffff;font-family:courier new, courier;"&gt;modem_configure()&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt; function call.&lt;/p&gt;
&lt;p&gt;It might be that 10 seconds is too short period. We did not check SIM Card&amp;#39;s minimum shut down time, we will pay attention to that (we are using iBASIS eSIM that comes with the nRF9160-DK board)! Thanks for pointing that out for us!&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-connect to the AWS IoT Cloud with nRF9160</title><link>https://devzone.nordicsemi.com/thread/257758?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 09:10:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ec4785c-429b-4924-872d-a88101ec0d1a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Bojan,&lt;/p&gt;
&lt;p&gt;What is the behavior when you try to re-connect after the disconnect? And how long is it between your disconnect and the re-connect? Have you checked your SIM Card&amp;#39;s minimum shut down time?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-connect to the AWS IoT Cloud with nRF9160</title><link>https://devzone.nordicsemi.com/thread/257676?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2020 21:38:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0621e655-ed4c-467b-b10f-d1544a0358ed</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hi guys!&lt;/p&gt;
&lt;p&gt;Things are a little bit clearer now.&lt;/p&gt;
&lt;p&gt;1) It seems that there is no &lt;strong&gt;&lt;span style="background-color:#ccffff;font-family:courier new, courier;"&gt;&lt;em&gt;cloud_uninit(cloud_backend)&lt;/em&gt;&lt;/span&gt;&lt;/strong&gt;function in AWS_IoT library so we can delete that line of the code.&lt;/p&gt;
&lt;p&gt;2) &lt;a href="https://github.com/eblot/newlib/blob/master/newlib/libc/include/sys/errno.h#L151" rel="noopener noreferrer" target="_blank"&gt;error 120&lt;/a&gt; when we call &lt;span style="background-color:#ccffff;font-family:courier new, courier;"&gt;&lt;strong&gt;&lt;em&gt;modem_configure()&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt; function means the socket is already connected so there is no need to call &lt;span style="background-color:#ccffff;font-family:courier new, courier;"&gt;&lt;strong&gt;&lt;em&gt;modem_configure()&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt; when we want to re-connect.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s all sweet!&lt;/p&gt;
&lt;p&gt;However, in our system, the modem should be normally off and active only during the rare periods when we want to upload data. If we keep the socket connected, that would suck the juice from our battery so there is a need to completely turn off the modem between connection periods.&lt;/p&gt;
&lt;p&gt;I tried to include two more functions that would turn off the modem after disconnection from the cloud:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cloud_disconnect(cloud_backend);
lte_lc_offline();
lte_lc_power_off();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However, with those two functions included, we were unable to re-connect (with and without &lt;strong&gt;&lt;em&gt;&lt;span style="background-color:#ccffff;font-family:courier new, courier;"&gt;modem_configure()&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt; function included)!&lt;/p&gt;
&lt;p&gt;What would be the steps to completely turn off the modem and re-activate it again when we need it?&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>