<?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 lte send data in gps continuous mode immediately</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71091/nrf9160-lte-send-data-in-gps-continuous-mode-immediately</link><description>Hi, with my nrf9160 I need to send a gps location every 3 sec to azure, so I combined the agps and the azure iot hub sample. It&amp;#39;s working pretty good but 10 sec as a periodic interval for the gps samples is to high (especially since it&amp;#39;s more like 14</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Feb 2021 13:46:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71091/nrf9160-lte-send-data-in-gps-continuous-mode-immediately" /><item><title>RE: nrf9160 lte send data in gps continuous mode immediately</title><link>https://devzone.nordicsemi.com/thread/293353?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 13:46:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f761006-97f4-4fa1-979e-7a1848389088</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi, and sorry for the very late answer.&lt;/p&gt;
&lt;p&gt;How did you integrate GPS into the Azure sample?&lt;/p&gt;
&lt;p&gt;Do you have any logs or a &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect"&gt;modem trace&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you could get a log which is also showing &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/packet_domain/cscon_set.html"&gt;AT+CSCON&lt;/a&gt; notifications, that would be very helpful.&lt;/p&gt;
[quote user=""]but it seems to be slower since it needs to reconnect every time I call activate_lte[/quote]
&lt;p&gt;&amp;nbsp;The GPS sample is made to test the GPS, and the GPS works best when LTE is disabled. The LTE stack has priority over the GPS stack, so if LTE is enabled, the GPS stack might not get enough time to run in order to download all the necessary data from the satellites.&lt;/p&gt;
&lt;p&gt;This can be somewhat helped by AGPS, or by using eDRX or PSM to give the GPS more time to run.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]besides, after 8 to 15 calls it hangs at&amp;nbsp;&amp;nbsp;&lt;span&gt;k_sem_take&lt;/span&gt;&lt;span&gt;(&amp;amp;lte_ready,&amp;nbsp;K_FOREVER); for 1 hour then the CERREG: 5 finnaly comes. Could this be that my provider blocks me since I connect and disconenct so often?&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;Yes, e.g. there is a limit of only 30 connection requests per hour.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;span&gt;I tried to also set PSM mode by calling&amp;nbsp;&lt;/span&gt;&lt;span&gt;t_cmd_write&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;AT+CPSMS=1,,,&lt;/span&gt;&lt;span&gt;\&amp;quot;&lt;/span&gt;&lt;span&gt;00000110&lt;/span&gt;&lt;span&gt;\&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;\&amp;quot;&lt;/span&gt;&lt;span&gt;00000001&lt;/span&gt;&lt;span&gt;\&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;); in activate_lte, but now when i leave LTE and GPS activated it just crashes when sending the position through LTE.&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;That sounds strange. Do you have any logs to indicate where the crash occurs?&lt;/p&gt;
&lt;p&gt;Also, a better way would be to set CONFIG_LTE_PSM_REQ_RAT and CONFIG_LTE_PSM_REQ_RPTAU.&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></channel></rss>