<?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>The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98919/the-at-cfun-0-take-long-time-sometimes</link><description>Hi, 
 I am developing a low-power device to periodically publish data. 
 I need to turn off the modem after the publishing task is completed. 
 And I found that sometimes the AT+CFUN=0 takes a long time to get response. 
 
 Below is the code piece for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 May 2023 03:31:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98919/the-at-cfun-0-take-long-time-sometimes" /><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/423643?ContentTypeID=1</link><pubDate>Thu, 04 May 2023 03:31:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29f4053f-2a7e-4ebc-bd15-ccae8e310d83</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;Got it, thanks.&lt;/p&gt;
&lt;p&gt;So it cause by the NBIoT signal is not stable in my test env.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/423561?ContentTypeID=1</link><pubDate>Wed, 03 May 2023 12:54:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01a0496f-a954-414b-a8af-2d280fbaa4fc</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;According to the modem team, &amp;quot;SI reception from first found cell fails and due to that cell selection takes time.&amp;quot;&lt;/p&gt;
&lt;p&gt;Before the modem can turn off, it has to send a detach message to the network. In NB-IoT, this process has a max timeout of 85 seconds (i.e. the modem will at most stay active for 85 seconds).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/422574?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2023 15:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:784a535b-8d3b-42e2-bcb0-7e74b4cd490c</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;In the case where the detach takes a long time, it seems like the modem is using that time to search for a cell. However, I don&amp;#39;t know why it does that, so I&amp;#39;ve asked the modem team to have a look at it.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll let you know when they have reached a conclusion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/422401?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2023 02:26:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b4b573e-a9bb-448b-bd04-785b68b03115</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;Hi Didrik,&lt;/p&gt;
&lt;p&gt;Modem trace attached.&lt;/p&gt;
&lt;p&gt;Tested with NRF9160DK with modem_shell, the latest modem power off take &amp;gt;32s.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/trace_2D00_2023_2D00_04_2D00_26T02_2D00_13_2D00_34.608Z.bin"&gt;devzone.nordicsemi.com/.../trace_2D00_2023_2D00_04_2D00_26T02_2D00_13_2D00_34.608Z.bin&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/422165?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2023 05:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b807b567-4704-4c9d-822d-453ccdb3bbcd</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;You are right. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I feel worried because that ticket.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s lucky that I meet the issue when developing. That will be a nightmare if the issue happen on other country after product launch. And it is not possible to ask end user to provide modem trace for us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/422107?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2023 14:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:476d257c-7da3-4b1c-85f5-3982d953a468</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;gt; If you have an Active-Time (i.e. it is not &amp;quot;1110000&amp;quot;), you have PSM,&lt;/p&gt;
&lt;p&gt;I guess, the doubts are based on the experience with eDRX and the &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/89982/enable-edrx-seems-not-work"&gt;Enable eDRX seems not work&lt;/a&gt; discussion.&lt;/p&gt;
&lt;p&gt;Yes,in my experience the assigned Active-Time indicates, the PSM is available in the network. But if the device goes to sleep or not is then signaled by the event LTE_LC_EVT_MODEM_SLEEP_ENTER. Overall, it&amp;#39;s in my opinion a good practice to check, whats actually happen. On &amp;quot;the desk&amp;quot; even with the PPK II. In &amp;quot;the wild&amp;quot; with the events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/422066?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2023 13:19:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd66cce2-ae87-43cc-9246-2e432fa052be</guid><dc:creator>Didrik Rokhaug</dc:creator><description>[quote user="Tim Chao"]&lt;p&gt;May I ask how you check if PSM is available?&lt;/p&gt;
&lt;p&gt;I am wondering if&amp;nbsp;check the &amp;lt;Active-Time&amp;gt; and &amp;lt;TAU&amp;gt; value in&amp;nbsp;+CEREG notification enough, or I need to monitor the &amp;quot;Enter sleep&amp;quot; event to make sure the PSM works.&lt;/p&gt;[/quote]
&lt;p&gt;If you have an Active-Time (i.e. it is not &amp;quot;1110000&amp;quot;), you have PSM, and you can see the sleep period in the TAU parameter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421867?ContentTypeID=1</link><pubDate>Sat, 22 Apr 2023 02:07:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dee3e899-f684-400f-b615-92c639350025</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;Many thanks.&lt;/p&gt;
&lt;p&gt;I really learn a lot from your sharing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421754?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 12:27:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75aa9696-e801-46de-ab05-b097d5d03b85</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;I record the most events to ensure, what actually happens. That includes the events RRC Connected, RRC Idle and Sleeping events. I also add the times and relate these event times with the time of the last sent or received data.&lt;/p&gt;
&lt;p&gt;Time &amp;quot;last data&amp;quot; to RRC Idle indicates the RRC Active Timer or effective RAI function.&lt;/p&gt;
&lt;p&gt;Time &amp;quot;RRC Idle&amp;quot; to &amp;quot;Sleeping&amp;quot; indicates in a couple of cases extra HPPLMN searches (among other cases, so this is not really that clear).&lt;/p&gt;
&lt;p&gt;In some other discussion I also requested more events, which reports the actual situation. Last week we tried to discus &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/98544/please-consolidate-nrf9160-documentation-about-cp-rai-and-as-rai"&gt;reporting about RAI&lt;/a&gt; . Unfortunately it seems the for Nordic the &amp;quot;best possible way&amp;quot; is to swallow requested functions and not to report the outcome. That is extremely time intensive on the user&amp;#39;s side. Especially, if you consider that from time to time Nordic &amp;quot;breaks&amp;quot; the behavior. The same happens for events about HPPLMN searches, for Nordic this is not required, and for users this extra drains the battery.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421746?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 12:17:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:147565a5-ada5-47cc-b1aa-1ce3f8c36de2</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;Thanks for your sharing.&lt;/p&gt;
&lt;p&gt;May I ask how you check if PSM is available?&lt;/p&gt;
&lt;p&gt;I am wondering if&amp;nbsp;check the &amp;lt;Active-Time&amp;gt; and &amp;lt;TAU&amp;gt; value in&amp;nbsp;+CEREG notification enough, or I need to monitor the &amp;quot;Enter sleep&amp;quot; event to make sure the PSM works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421728?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 11:54:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9fd1e97-e5d8-44e4-94be-2027111d1789</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;Thanks for reply.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have the signal strength value right now, around -10X dBm think. But normally the connect and publish (MQTT or HTTP) task can be done without error.&lt;/p&gt;
&lt;p&gt;In my current test result, increase the attach &amp;amp; detach interval did not change the result. But short interval may cause the modem stay in SEARCHING state for a long time. I will avoid it in final product.&lt;/p&gt;
&lt;p&gt;Cause I am develop on our customized board w/o uart1, I cannot get modem trace right now. I will try to make a test sample on DK next week to get the trace.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421722?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 11:34:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6949ffa-c7d8-46f8-8e98-3899d0537abc</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using LTE-M or NB-IoT, and how are the signal conditions?&lt;/p&gt;
&lt;p&gt;Detaching from the network involves some communication with the network, so it could be that there are some problems communicating with the network.&lt;/p&gt;
&lt;p&gt;Also, how often do you attach and detach to the network? Most network don&amp;#39;t like devices doing that too often, so it could be that the frequency of the tests themselves are causing a problem.&lt;/p&gt;
&lt;p&gt;But, as&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/achimkraus"&gt;Achim Kraus&lt;/a&gt;&amp;nbsp;said, a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_trace_collector/UG/trace_collector/intro.html"&gt;modem trace&lt;/a&gt; would be very helpful in finding the cause of the delay.&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: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421717?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 11:28:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99e2d1c2-2c35-4d5f-8ca5-c5a3c9b62716</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;In my experience PSM works with NB-IoT in many cases. Also RAI (either CP- or AS-RAI) works pretty well, maybe not perfect, but well.&lt;/p&gt;
&lt;p&gt;For LTE-M it isn&amp;#39;t that easy. First PSM without RAI is only &amp;quot;half the story&amp;quot; and for LTE-M RAI comes with Rel 14 AS-RAI. Second sometimes, in old infrastructure, you may get connected to LTE (not LTE-M) and then PSM is missing.&lt;/p&gt;
&lt;p&gt;Anyway, I go for PSM and in the left cases, where PSM isn&amp;#39;t available, a limited off/on approach as fallback.&lt;/p&gt;
&lt;p&gt;My experience with eDRX support isn&amp;#39;t that good, therefore I postponed to use it. (In my use-case the calculation doubles energy consumption, so it hasn&amp;#39;t that prio.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421706?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 11:02:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09470564-8b2c-428f-883e-3a5a43fcdaab</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;Thanks, you help me to clear another question.&lt;/p&gt;
&lt;p&gt;I did notice that short power on/off interval may cause the modem stay in SEARCHING state for a long time (&amp;gt;10 mins) sometime. I think it may be a limitation, but not sure is limited modem or operator. I will not allow such short interval in final product.&lt;/p&gt;
&lt;p&gt;The 1~2 minutes in previous log is just for getting more logs of this power-off time test. Increase the interval did not change result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421684?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 09:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a074bfd5-2d9a-4ec2-b1f1-ea8fa06453c5</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;And you&amp;#39;re sure, that switching the modem on/off every two minutes (at least your log shows that), works reliable?&lt;/p&gt;
&lt;p&gt;AFAIK some operators may limit that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421654?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 07:48:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9af0f807-80e5-4133-a83f-91a98bb5e66e</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;Thanks for your suggestion.&lt;/p&gt;
&lt;p&gt;The PSM/eDRX did supported in my application.&lt;/p&gt;
&lt;p&gt;But seems the feature is not so reliable (the eDRX communication reported success but did not actually work in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/89982/enable-edrx-seems-not-work"&gt;my testing&lt;/a&gt;). I still need to support modem power on/off for power saving.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421648?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 07:28:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:777dee69-fc3d-41f9-9624-768c7d6c7501</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Are you common with &lt;a href="https://www.gsma.com/iot/wp-content/uploads/2022/02/2022.03-GSMA-Energy-Efficiency-for-Mobile-IoT-1.pdf"&gt;PSM, page 17&lt;/a&gt;? Maybe that works better than CFUN=0/CFUN=1.&lt;/p&gt;
&lt;p&gt;I guess, to speed up an answer from Nordic about your question of that delay, you may try to provide some modem traces for cases, where the switching off takes longer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The AT+CFUN=0 take long time sometimes</title><link>https://devzone.nordicsemi.com/thread/421625?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 05:37:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c48c30a9-c4e8-442b-8c37-be223ac5e76d</guid><dc:creator>Tim Chao</dc:creator><description>&lt;p&gt;After further testing it seems to happen only on NBIoT.&lt;/p&gt;
&lt;p&gt;When using LTE-M, the execution times are always in 1500~3500 ms.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[03:20:39.264,190] &amp;lt;dbg&amp;gt; modem: modem_power_off: AT+CFUN=0 done ( 1560 ms)
[03:22:39.510,986] &amp;lt;dbg&amp;gt; modem: modem_power_off: AT+CFUN=0 done ( 1891 ms)
[03:24:41.365,783] &amp;lt;dbg&amp;gt; modem: modem_power_off: AT+CFUN=0 done ( 3195 ms)
[03:26:47.712,646] &amp;lt;dbg&amp;gt; modem: modem_power_off: AT+CFUN=0 done ( 3499 ms)
[03:28:39.362,091] &amp;lt;dbg&amp;gt; modem: modem_power_off: AT+CFUN=0 done ( 1588 ms)
[03:30:39.524,414] &amp;lt;dbg&amp;gt; modem: modem_power_off: AT+CFUN=0 done ( 1807 ms)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m wondering, whether the modem shutdown time will be affected by the network provider?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>