<?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>Correct to shutdown modem and reconnect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48200/correct-to-shutdown-modem-and-reconnect</link><description>Hi, 
 My application only needs to be connected to the network for a short period of time to deliver data to a server and then disconnect again. At first everything works as intended (connect/disconnect), but when it try to reconnect it throws an error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Jun 2019 07:26:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48200/correct-to-shutdown-modem-and-reconnect" /><item><title>RE: Correct to shutdown modem and reconnect</title><link>https://devzone.nordicsemi.com/thread/191241?ContentTypeID=1</link><pubDate>Thu, 06 Jun 2019 07:26:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b81da0ec-ac8d-41ef-9793-a8c8bb54568d</guid><dc:creator>men</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;When I need to access to GPS then I have to set it into &lt;strong&gt;offline&lt;/strong&gt; mode anyway, and make at full reconnect afterwards.&lt;/p&gt;
&lt;p&gt;It seems to work at first, but the second time I get the message &lt;strong&gt;&amp;quot;Err: 3&amp;quot;&lt;/strong&gt; and is stuck in &lt;strong&gt;lte_lc_init_and_connect()&lt;/strong&gt;.&lt;strong&gt; &lt;/strong&gt;Do you know what could cause this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct to shutdown modem and reconnect</title><link>https://devzone.nordicsemi.com/thread/191104?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 12:27:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65f18e82-142e-4e28-8c88-0f083efdd6f1</guid><dc:creator>men</dc:creator><description>&lt;p&gt;That sound great. I will give it a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct to shutdown modem and reconnect</title><link>https://devzone.nordicsemi.com/thread/191097?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 12:14:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:837fb399-d850-4f29-a1c0-5622aca448d0</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Yes, if you set the timer higher, and use the latest modem fw v0.7.0-29, which shall turn off the SIM completely in PSM.&lt;/p&gt;
&lt;p&gt;Its now set to&amp;nbsp;30 mins by default:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/Kconfig#L31"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/Kconfig#L31&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The tree upper bits sets the interval, and the lower 5 bits set the timer count.&lt;/p&gt;
&lt;p&gt;This is shown in the 3gpp TS 24.008 v15.5.0, chapter 10.5.7.4A, and I also copied this table into a PSM example here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/udp_with_psm/src/main.c#L97"&gt;https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/udp_with_psm/src/main.c#L97&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The PSM interval should match your expected &amp;quot;receive&amp;quot; window from the network. If you expect to receive/poll data every 2 hours, the PSM interval should be set to this value.&lt;/p&gt;
&lt;p&gt;If you only send data, via UDP (thus, never receive), you can set the PSM interval even higher.&lt;/p&gt;
&lt;p&gt;If you want to receive every 1 day (24 hours), you can set it to &amp;quot;00111000&amp;quot; (1 hour * 24 = 24h)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When PSM is set, you can send data at any time you&amp;#39;d like, just push data and the modem will do the rest for you.&lt;/p&gt;
&lt;p&gt;You will then be active for the default 1 minute after triggering a send (&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/Kconfig#L39"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/Kconfig#L39&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Note that the active time and the PSM interval use two different &amp;quot;GPRS timer&amp;quot;, so the bits set for active time will differ from the bits set for PSM interval.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct to shutdown modem and reconnect</title><link>https://devzone.nordicsemi.com/thread/191081?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 11:48:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f14229f-4798-4064-ab39-006c8801c59a</guid><dc:creator>men</dc:creator><description>&lt;p&gt;No I have not tried PSM. Would it be more power efficient when it only needs to connect once a day?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct to shutdown modem and reconnect</title><link>https://devzone.nordicsemi.com/thread/191070?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 11:41:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cebf24e-756e-44cc-bdc1-20a8902135e3</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]When connecting &lt;strong&gt;lte_lc_init_and_connect()&lt;/strong&gt; is used and when disconnection firstly &lt;strong&gt;lte_lc_offline()&lt;/strong&gt; and then &lt;strong&gt;lte_lc_power_off()&lt;/strong&gt; is used. If &lt;strong&gt;lte_lc_power_off()&lt;/strong&gt; is skipped the device is able to reconnect.[/quote]
&lt;p&gt;The lte_lc_offline() translates to CFUN=4, which is perfectly fine. You just need to enable the modem again afterwards.&lt;/p&gt;
&lt;p&gt;lte_lc_power_off() will translate to CFUN=0, which will require a power cycle, as stated in the note here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/mob_termination_ctrl_status/cfun.html?cp=2_1_3_0"&gt;https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/mob_termination_ctrl_status/cfun.html?cp=2_1_3_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to use PSM instead? This can be enabled via function &amp;quot;lte_lc_psm_req(true);&amp;quot;. Some networks might refuse the interval, so you need to check if the interval is accepted via AT command &amp;quot;AT+CEREG?&amp;quot;, but first you need to enable AT+CEREG=5 to get the &amp;quot;added&amp;quot; timers to be reported back when reading.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>