<?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>GPS/LTE application freezes after approx. 1h</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75981/gps-lte-application-freezes-after-approx-1h</link><description>Hi, I am using nRF Connect SDK 1.5.1 with the nRF9160 Modem Firmware 1.3.0 
 I have implemented an application on the thingy91 with the gps driver (continuous mode) and the lte link controller (LTE-M). 
 I send approx. every 5th position-data (together</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Jun 2021 10:20:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75981/gps-lte-application-freezes-after-approx-1h" /><item><title>RE: GPS/LTE application freezes after approx. 1h</title><link>https://devzone.nordicsemi.com/thread/314423?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 10:20:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cb02231-7050-431b-927a-2caacd20a465</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;
[quote user="visu"]I tried it yesterday with NB-IoT and it ran without problems (7h). So I guess it can&amp;#39;t be a bug in my application?[/quote]
&lt;p&gt;Have you checked the signal strength for LTE M in your area?&lt;/p&gt;
&lt;p&gt;If you keep the socket open, and the LTE network changes (mobility in LTE-M, where you can be handed over to a new cell tower), this can be problematic in the application.&lt;/p&gt;
&lt;p&gt;You can try to add AT host library to your application and&amp;nbsp;issue &amp;quot;AT+CEREG=5&amp;quot; to see if there&amp;#39;s anything network-wise that happens:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# AT host library
CONFIG_AT_HOST_LIBRARY=y
CONFIG_UART_INTERRUPT_DRIVEN=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&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: GPS/LTE application freezes after approx. 1h</title><link>https://devzone.nordicsemi.com/thread/314098?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 07:51:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78c14d16-b80d-410f-8b13-94a8b5b5f80d</guid><dc:creator>visu</dc:creator><description>[quote userid="2115" url="~/f/nordic-q-a/75981/gps-lte-application-freezes-after-approx-1h/313916#313916"]Does your log have any &amp;quot;failed to transmit&amp;quot; prints?[/quote]
&lt;p&gt;No it doesn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;Increasing the heap size didn&amp;#39;t help.&lt;/p&gt;
&lt;p&gt;I tried it yesterday with NB-IoT and it ran without problems (7h). So I guess it can&amp;#39;t be a bug in my application?&lt;/p&gt;
&lt;p&gt;I may try to get modem trace logs today when running with LTE-M, maybe you can have a look then&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPS/LTE application freezes after approx. 1h</title><link>https://devzone.nordicsemi.com/thread/313916?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 12:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e70b6fbf-1e02-425d-915f-eccad8b74ec1</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;
[quote user="visu"]right now I am sending like this:[/quote]
&lt;p&gt;You should close the socket when err &amp;lt; 0, if not; you will get into a scenario where you&amp;#39;re&amp;nbsp;not allowed to allocate more sockets.&lt;/p&gt;
&lt;p&gt;Does your log have any &amp;quot;failed to transmit&amp;quot; prints?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="visu"]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But I think it would be better to just leave the socket open. so I have to give the RAI indication.&lt;br /&gt;How is this done? I saw in Case 270301 that this can be done with nrf_setsockopt(), but that didn&amp;#39;t work for me.&lt;/p&gt;[/quote]
&lt;p&gt;Closing the socket after you&amp;#39;re done is usually the recommended fashion.&lt;/p&gt;
&lt;p&gt;As mentioned in the case you linked to, RAI support needs to be verified on a network level, ie: you cannot (at this time atleast) read the support dynamically in firmware.&lt;/p&gt;
[quote user="visu"]I&amp;#39;ll try to increase the heap and give it a try.[/quote]
&lt;p&gt;Please let me know if this helps on stability!&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;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPS/LTE application freezes after approx. 1h</title><link>https://devzone.nordicsemi.com/thread/313846?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 09:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:524a821b-dc30-4d82-a55f-258f9320d766</guid><dc:creator>visu</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;thanks for your reply.&lt;/p&gt;
&lt;p&gt;I am using the A-GPS Sample (but with SUPL), combined with the udp-sample.&lt;/p&gt;
&lt;p&gt;With CONFIG_LOG_OVERRIDE_LEVEL=4 it really creates a lot of log, that I can&amp;#39;t do much with..&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try to increase the heap and give it a try.&lt;/p&gt;
&lt;p&gt;I also have another question: &lt;br /&gt;&lt;br /&gt;right now I am sending like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        server_connect(); //connects like in udp-sample
        
        int err = send(client_fd, buf, sizeof(buf), 0);
        if (err &amp;lt; 0) {
                printk(&amp;quot;Failed to transmit UDP packet, %d\n&amp;quot;, errno);
                return;
        }
        LOG_INF(&amp;quot;GPS position successfully sent to cloud&amp;quot;);
        server_disconnect(); //disconnects like in udp-sample&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In this way the RRC changes faster to RRC idle.&lt;/p&gt;
&lt;p&gt;But I think it would be better to just leave the socket open. so I have to give the RAI indication.&lt;br /&gt;How is this done? I saw in Case 270301 that this can be done with nrf_setsockopt(), but that didn&amp;#39;t work for me.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPS/LTE application freezes after approx. 1h</title><link>https://devzone.nordicsemi.com/thread/313833?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 08:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05f0cf26-d735-4c7e-92e8-7f3b89fbf0b5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user=""]D: NMEA: Position fix&lt;br /&gt;I: connected to udp server&lt;br /&gt;I: GPS position successfully sent to cloud&lt;br /&gt;I: disconnected from server[/quote]
&lt;p&gt;These prints seems to come from your application. Have you based this upon a application present in NCS? If so, which one?&lt;/p&gt;
[quote user=""]It looks like the udp-socket thing worked, but it doesn&amp;#39;t connect with RRC connected?&lt;br /&gt;Is there a way to see where the applications get stuck? I tried it in the debug-mode in segger embedded studio, but I only see it is hanging around cpu_idle..&lt;br /&gt;Are there any options I can turn on to see more in the uart output?[/quote]
&lt;p&gt;&amp;nbsp;You could force all logging to be info/debug:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG=y
CONFIG_LOG_MINIMAL=y
CONFIG_LOG_DEFAULT_LEVEL=4 # You can set this lower
CONFIG_LOG_OVERRIDE_LEVEL=4&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This will produce quite alot of logging.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you can also try is to increase the heap size given to modemlib:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NRF_MODEM_LIB_HEAP_SIZE=2048&lt;/pre&gt;&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>