<?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>nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45544/nrf9160-dk-psm-current-too-high-after-opening-and-closing-a-tcp-socket</link><description>Hi, 
 I tried the following AT settings on the nRF9160 DK board: 
 AT+CPSMS=1,,,&amp;quot;00111000&amp;quot;,&amp;quot;00011110&amp;quot; 
 AT+CFUN=1 
 After this the modem enters PSM mode and the current is about 6uA. So far so good. 
 
 When I do the same, but open a (valid) TCP socket</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Jul 2020 05:52:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45544/nrf9160-dk-psm-current-too-high-after-opening-and-closing-a-tcp-socket" /><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/260266?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 05:52:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47fe8b80-9d1c-408f-9800-9c823538faef</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;That is doubtful as I can replicate it in a single thread, but I have made a new case anyway:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/63835/nrf9160-dk-sleep-current-too-high-after-opening-and-closing-a-tcp-socket"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/63835/nrf9160-dk-sleep-current-too-high-after-opening-and-closing-a-tcp-socket&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/260068?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 08:36:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89237dbc-a6f8-4a54-9568-173020e6da9b</guid><dc:creator>Sigurd</dc:creator><description>[quote user="Thomas2197"]Is this issue fixed in version 1.2 of the modem firmware?[/quote]
&lt;p&gt;&amp;nbsp;Yes&lt;/p&gt;
[quote user="Thomas2197"]I&amp;#39;m seeing the same 1 second wake ups after closing the socket and powering down the modem (AT+CFUN=0).[/quote]
&lt;p&gt;This is most likely not related to the modem firmware then, but a thread used in your application code.&lt;/p&gt;
&lt;p&gt;Please create a new case for your issue:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/support/add"&gt;https://devzone.nordicsemi.com/support/add&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/260026?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 05:26:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:322e1f5d-2f37-44d4-a15c-0eb2e3ff7033</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;Is this issue fixed in version 1.2 of the modem firmware? I&amp;#39;m seeing the same 1 second wake ups after closing the socket and powering down the modem (AT+CFUN=0).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/181088?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 13:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dce1a40-06f1-4397-962d-21d68bde2472</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the example. We have reproduced the issue with the unexpected 1s interval wakeups. We will fix this issue in a future release of the modem fw.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Sigurd&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/180823?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 14:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e6ccc56-5308-4a68-8dda-cef2ca1ea0e2</guid><dc:creator>Houwer de Geus</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Hereby I send you the example. The order is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AT+CPSMS=1,,,&amp;quot;00111000&amp;quot;,&amp;quot;00011110&amp;quot;&lt;/li&gt;
&lt;li&gt;AT+CFUN=1&lt;/li&gt;
&lt;li&gt;Wait for registration using the iBasis SIM. It indicates roaming&lt;/li&gt;
&lt;li&gt;Open TCP socket: socket_fd&amp;nbsp;=&amp;nbsp;&lt;span style="color:maroon;"&gt;nrf_socket&lt;/span&gt;(&lt;span style="color:purple;"&gt;NRF_AF_INET&lt;/span&gt;,&amp;nbsp;&lt;span style="color:purple;"&gt;NRF_SOCK_STREAM&lt;/span&gt;,&amp;nbsp;&lt;span style="color:purple;"&gt;NRF_IPPROTO_TCP&lt;/span&gt;);&lt;/li&gt;
&lt;li&gt;use nrf_getaddrinfo() to retrieve the IP adress.&lt;/li&gt;
&lt;li&gt;
&lt;pre style="background:white;color:black;font-family:Consolas;font-size:13px;"&gt;&lt;span style="color:maroon;"&gt;Perform TCP connect: nrf_connect&lt;/span&gt;(socket_fd,&amp;nbsp;&amp;amp;ipv4Address,&amp;nbsp;&lt;span style="color:blue;"&gt;sizeof&lt;/span&gt;(&lt;span style="color:teal;"&gt;nrf_sockaddr_in_t&lt;/span&gt;))
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Close the Socket: ret&amp;nbsp;=&amp;nbsp;&lt;span style="color:maroon;"&gt;nrf_close&lt;/span&gt;(pContext-&amp;gt;socket_fd);&lt;/li&gt;
&lt;li&gt;And wait until PSM mode is activated after about 60 seconds active time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF91NordicExample.zip"&gt;devzone.nordicsemi.com/.../nRF91NordicExample.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Houwer de Geus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/180785?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 13:19:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46d12752-9b5d-4494-aa70-d3c09e099f43</guid><dc:creator>Houwer de Geus</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;1) I will prepare this example. This will take some time. I will inform you when ready&lt;/p&gt;
&lt;p&gt;2) No, with UDP I see the same 74 seconds active time (average current about 3mA) followed by PSM mode of 6uA. One time I did see the 125uA active current for a few seconds after active time, but it ended in PSM mode with 6uA active current.&lt;/p&gt;
&lt;p&gt;3) With AT+CPSMS? I get the same values as requested (after registration succeeded, before opening the socket):&lt;/p&gt;
&lt;p&gt;+CPSMS: 1,,,&amp;quot;00111000&amp;quot;,&amp;quot;00011110&amp;quot;&lt;/p&gt;
&lt;p&gt;4) With AT+CGMR I get:&lt;/p&gt;
&lt;p&gt;mfw-m1_nrf9160_0.6.8-30.alpha&lt;/p&gt;
&lt;p&gt;I checked TCP again and I noticed once that the PSM mode was reached after 30 minutes, but&amp;nbsp; most of the time it did not get into PSM mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/180660?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 08:19:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dc9df51-8baa-4ac9-8f41-f6b4cddd19d5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&lt;/span&gt;&lt;/p&gt;
[quote userid="78529" url="~/f/nordic-q-a/45544/nrf9160-dk-psm-current-too-high-after-opening-and-closing-a-tcp-socket/180519"]It looks like&amp;nbsp;the device is polling every second for something. Can you tell me what happens during the polling?[/quote]
&lt;p&gt;&lt;span&gt;This is the TCP stack,&amp;nbsp;it&amp;#39;s waking up every second.From your description it seems like the socket it not closed&amp;nbsp;properly.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1) Could you provide a minimal working example that shows the issue ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) Do you see the same issue if you test with&amp;nbsp;UDP ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3) Could you check the PSM/DRX status when this happens ? (AT+CPSMS?)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4) What version of the modem fw are you using ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;5)&amp;nbsp;Could you check the return code from the close function?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/180519?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 13:27:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a59b0b5b-be6f-44f0-bace-96ab49e01409</guid><dc:creator>Houwer de Geus</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;To be more specific, the T3324 active timer is set to 60 seconds, the T3412 timer is set to&amp;nbsp;24 hours. After performing AT+CFUN=1, the device enters PSM mode (6uA) after 74 seconds, so slightly more than the 60 seconds active time. This is ok.&lt;/p&gt;
&lt;p&gt;After performing AT+CFUN=1 and opening a valid TCP socket (valid URL,port) and after closing that port without exchanging data, the device enters a state after 74 seconds in which it draws an average current of 580uA. 51 seconds&amp;nbsp;later the average current drops to 125uA average, see my picture. So I waited even longer, about 30 minutes and the average current remains the same 125uA. It does not enter PSM mode with the expected 6uA. So my conclusion is, that I never reach the PSM mode.&lt;/p&gt;
&lt;p&gt;So a single TCP open and close is enough to NOT enter PSM mode.It looks like&amp;nbsp;the device is polling every second for something. Can you tell me what happens during the polling? And how I can reach PSM mode without polling?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Houwer de Geus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK PSM current too high after opening and closing a TCP socket</title><link>https://devzone.nordicsemi.com/thread/180066?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2019 15:03:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2f58146-cd98-49b2-b12d-ffc0e433b929</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="78529" url="~/f/nordic-q-a/45544/nrf9160-dk-psm-current-too-high-after-opening-and-closing-a-tcp-socket"]At a one second interval, the current increases to 14mA for a short time and falls back to 6uA. [/quote]
&lt;p&gt;I think it could be the idle time after the PSM TAU you are seeing. Before entering PSM, the device will be in&amp;nbsp;idle mode DRX for a short while. See the images &lt;a href="https://www.eletimes.com/wp-content/uploads/2017/02/Grafik_1.jpg"&gt;here&lt;/a&gt;, &lt;a href="https://www.electronic.nu/files/2016/09/skaxxrmavbild-2016-09-19-kl.-16.48.02.png"&gt;here &lt;/a&gt;and &lt;a href="http://blogs.univ-poitiers.fr/f-launay/files/2016/11/Fig11.png"&gt;here&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1554303563779v1.jpeg" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1554303634672v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1554303628920v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>