<?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 + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88863/nrf9160-lte-gps-mqtt---gps-blocked</link><description>Hi, 
 I am trying to understand either the timing or feature I am missing with respect to LTE, GPS and MQTT. I have read a number of posts and questions on a similar topic, but didnt find what I was doing wrong. 
 I have a 9160DK which connects fine to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Jun 2022 12:55:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88863/nrf9160-lte-gps-mqtt---gps-blocked" /><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/374544?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 12:55:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdf226da-89b8-4b9d-bec8-2124d0734e99</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Brett,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Brett"]The&amp;nbsp;&lt;span&gt;CONFIG_MQTT_KEEPALIVE&lt;/span&gt; is set to 1200, so its a bit different.&amp;nbsp; The more confusing part is that there are no GNSS events at all.&amp;nbsp; Usually when its in a BLOCKED state, I still get some events come in - even if its not a FIX.[/quote]
&lt;p&gt;Do you have any asynchronous threads / interrupts that trigger a send() from the application? That will cause the modem to immediately start sending, thus blocking the GNSS from running until you&amp;#39;re in idle again.&lt;/p&gt;
&lt;p&gt;Do you print the CSCON notification? If so, you should see that the link becomes active if this is the case.&lt;/p&gt;
[quote user="Brett"]I have another issue in this project where the mqtt_publish is blocking (it hits the mutex_lock and never comes out), it looks the same as caseID&amp;nbsp;&lt;span&gt;232209, which you also worked on.&amp;nbsp; Am I best to open a new case to keep the topic of this&amp;nbsp;case consistent, or is it ok to ask that question in here, since it still kind of related ?&lt;/span&gt;[/quote]
&lt;p&gt;If this is related to the above scenario, the modem might be trying to send data (if the link quality is bad for instance).&lt;/p&gt;
&lt;p&gt;If this is an issue that you are able to reproduce, I would recommend that you open a new case, and attach a application log output + a modem trace showing the issue.&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: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/374525?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 11:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb29f9d5-da05-444c-a18f-299ceb709070</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon&lt;/span&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/88863/nrf9160-lte-gps-mqtt---gps-blocked/374299"]Could this be because of the mqtt keep-alive going active? This is a &amp;quot;ping&amp;quot; to the server to maintain the mqtt connection, which happens every &amp;quot;CONFIG_MQTT_KEEPALIVE&amp;quot;.[/quote]
&lt;p&gt;The&amp;nbsp;&lt;span&gt;CONFIG_MQTT_KEEPALIVE&lt;/span&gt; is set to 1200, so its a bit different.&amp;nbsp; The more confusing part is that there are no GNSS events at all.&amp;nbsp; Usually when its in a BLOCKED state, I still get some events come in - even if its not a FIX.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have another issue in this project where the mqtt_publish is blocking (it hits the mutex_lock and never comes out), it looks the same as caseID&amp;nbsp;&lt;span&gt;232209, which you also worked on.&amp;nbsp; Am I best to open a new case to keep the topic of this&amp;nbsp;case consistent, or is it ok to ask that question in here, since it still kind of related ?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;br /&gt;-brett&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/374299?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 09:11:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:181f05ab-542b-4bd0-8150-d0b838e18533</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Brett,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Brett"]I have most of this working now, or well enough.&amp;nbsp; The transition times between BlOCKED, UNBLOCKED and transfer are manageable for this testing.[/quote]
&lt;p&gt;I&amp;#39;m glad to hear of this progress!&lt;/p&gt;
[quote user="Brett"]However, after about 200-&amp;gt;300 seconds it varies, I stop getting any GNSS events. I know, the system is still running as I have a poll on 5seconds and it keeps counting up.&lt;br /&gt;&lt;br /&gt;The unit is not moving whilst I am testing, but is there any reason it would go to sleep after X period ?[/quote]
&lt;p&gt;Could this be because of the mqtt keep-alive going active? This is a &amp;quot;ping&amp;quot; to the server to maintain the mqtt connection, which happens every &amp;quot;CONFIG_MQTT_KEEPALIVE&amp;quot;.&lt;/p&gt;
&lt;p&gt;Depending on the network you&amp;#39;re connected to, and its overall routing/firewall rules etc, this can be in the range of 1 minute to tens of minutes. Each network has its own individual limitations on this.&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: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/374215?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 20:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3f1b383-36bb-4885-8c73-d332e8229272</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;br /&gt;&lt;br /&gt;I have most of this working now, or well enough.&amp;nbsp; The transition times between BlOCKED, UNBLOCKED and transfer are manageable for this testing.&lt;br /&gt;&lt;br /&gt;However, after about 200-&amp;gt;300 seconds it varies, I stop getting any GNSS events. I know, the system is still running as I have a poll on 5seconds and it keeps counting up.&lt;br /&gt;&lt;br /&gt;The unit is not moving whilst I am testing, but is there any reason it would go to sleep after X period ?&lt;br /&gt;&lt;br /&gt;I dont have any timers or sleep intervals in my configuration.&lt;br /&gt;&lt;br /&gt;regards&lt;br /&gt;-brett&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/373491?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 14:08:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c613ec1d-0572-49df-825d-14d8aa39ba02</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;You cannot be in two modes at the same time, there must be a transition in between.&lt;/p&gt;
&lt;p&gt;You can&amp;nbsp;be in PSM, break it to enter eDRX for a given time period, and then go back to PSM, but you cannot request both at once.&lt;/p&gt;
&lt;p&gt;&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: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/373465?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 13:19:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de55e5d2-6e4a-4676-914e-23956338ec35</guid><dc:creator>Torje</dc:creator><description>&lt;p&gt;Hey H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;Reading this thread I noticed this:&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/88863/nrf9160-lte-gps-mqtt---gps-blocked/372132"]You should only request either eDRX or PSM.[/quote]
&lt;p&gt;Would you kindly elaborate on this? I recall having read that both can be used, but I might be mistaken. I would greatly appreciate a thorough explanation, thank you!&lt;/p&gt;
&lt;p&gt;- Torje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/373006?ContentTypeID=1</link><pubDate>Fri, 17 Jun 2022 11:44:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bfc63c5-779f-4b0c-b718-6906b457950b</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="Brett"]&lt;p&gt;OK I think I get it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Even when you query with AT+CPSMS?, the response is not from the network, its what you requested.&amp;nbsp; The actual value is retrieved only by use the XMONITOR command.&amp;nbsp; Is that correct ?&lt;br /&gt;A little confusing for me after reading the docs, but no problems.&lt;/p&gt;[/quote]
&lt;p&gt;Yes, this is correct. The timing parameters read out with XMONITOR is your current link parameters.&lt;/p&gt;
[quote user="Brett"]&lt;p&gt;Thats really the question from me to you :) What should I be setting them to, or what is the best practice ?&lt;br /&gt;&lt;br /&gt;A little background might help give some context.&lt;br /&gt;&lt;br /&gt;Although testing on the 9160DK, I will be deploying on the thingy91.&lt;/p&gt;
&lt;p&gt;I am building a unit that will receive&amp;nbsp; bicycle power data on the 52840 (ANT+), transfer over UART to the 9160&amp;nbsp; and then transmit to an MQTT broker. At the same time the 9160 will capture GPS data and transmit to the same broker. This doesnt have to be real time, but near real-time would be nice - a delay in transmission of up to 60 seconds is ok, but shorter is better. I plan on caching the data in a queue until its time to send and will then batch transmit.&lt;br /&gt;&lt;br /&gt;Therefore, I am not sure what timers to set, do I go with an active of 2 seconds it will go into PSM mode faster, then GPS get more bandwidth?&amp;nbsp; I am assuming the data transfer will be pretty small, its basic telemetry data so transmission should be a second or 2.&amp;nbsp; Therefore, once sent, PSM mode should kick in pretty quick - and repeat.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Or is there something that I am completely missing here?&lt;br /&gt;&lt;br /&gt;MQTT keepalive is set to 1200, but I dont see keepalive as an issue, because there will be enough data being sent, so it should never drop out - if it does, I have a poll/input/ping setup when time gets close.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;The required paging period before you enter PSM is a set value, depending on what network you&amp;#39;re connected to. In one of my local network it is 10 seconds of paging, but in the other its 60 seconds. This means that you&amp;#39;re in RRC idle for this amount of time before the link enters PSM mode.&lt;/p&gt;
&lt;p&gt;Once you then enter PSM mode, the active time for the PSM will start.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;Paging, also named RRC idle: 60 seconds (Note that this varies from network to network!)&lt;/p&gt;
&lt;p&gt;PSM Active Timer: 16 seconds&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This means that after a successful MQTT send/receive (actually a TCP transaction), you&amp;#39;ll have to wait in total 60+16=76 seconds before you have successfully entered PSM TAU (ie. the lte link is completely idle).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What modem firmware do you use? Newer v1.3.x modems can use the GPS in other idle modes, as described in the modem firmware .zip release notes:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;- Improvement for GNSS tracking and satellite search functionality during LTE mode. GNSS is now able
  to search and track satellites while modem is searching LTE network and cells.&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><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/372979?ContentTypeID=1</link><pubDate>Fri, 17 Jun 2022 10:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57dc5ae4-0100-4b54-93b0-6b11d9034622</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/88863/nrf9160-lte-gps-mqtt---gps-blocked/372931#372931"]&lt;p&gt;You have to remember that it is the network that takes all the decisions here.&lt;/p&gt;
&lt;p&gt;AT+CPSMS is what you, as the nRF, request to the network (ie. your wanted configuration).&lt;/p&gt;
&lt;p&gt;XMONITOR reports back what the network sets.&lt;/p&gt;[/quote]
&lt;p&gt;OK I think I get it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Even when you query with AT+CPSMS?, the response is not from the network, its what you requested.&amp;nbsp; The actual value is retrieved only by use the XMONITOR command.&amp;nbsp; Is that correct ?&lt;br /&gt;A little confusing for me after reading the docs, but no problems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/88863/nrf9160-lte-gps-mqtt---gps-blocked/372931#372931"]&lt;p&gt;Can you please verify your timing of the MQTT link?&lt;/p&gt;
&lt;p&gt;As per your example: If you send every 30 seconds, the GPS will highly likely always be blocked by the LTE network, as it takes a bit of time before you enter PSM again. Each network has a&amp;nbsp;required paging period, usually in the order of seconds to minute, to ensure that services like SMS etc. is polled.&lt;/p&gt;[/quote]
&lt;p&gt;Thats really the question from me to you :) What should I be setting them to, or what is the best practice ?&lt;br /&gt;&lt;br /&gt;A little background might help give some context.&lt;br /&gt;&lt;br /&gt;Although testing on the 9160DK, I will be deploying on the thingy91.&lt;/p&gt;
&lt;p&gt;I am building a unit that will receive&amp;nbsp; bicycle power data on the 52840 (ANT+), transfer over UART to the 9160&amp;nbsp; and then transmit to an MQTT broker. At the same time the 9160 will capture GPS data and transmit to the same broker. This doesnt have to be real time, but near real-time would be nice - a delay in transmission of up to 60 seconds is ok, but shorter is better. I plan on caching the data in a queue until its time to send and will then batch transmit.&lt;br /&gt;&lt;br /&gt;Therefore, I am not sure what timers to set, do I go with an active of 2 seconds it will go into PSM mode faster, then GPS get more bandwidth?&amp;nbsp; I am assuming the data transfer will be pretty small, its basic telemetry data so transmission should be a second or 2.&amp;nbsp; Therefore, once sent, PSM mode should kick in pretty quick - and repeat.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Or is there something that I am completely missing here?&lt;br /&gt;&lt;br /&gt;MQTT keepalive is set to 1200, but I dont see keepalive as an issue, because there will be enough data being sent, so it should never drop out - if it does, I have a poll/input/ping setup when time gets close.&lt;/p&gt;
&lt;p&gt;regards&lt;br /&gt;-brett&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/372931?ContentTypeID=1</link><pubDate>Fri, 17 Jun 2022 07:25:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04f70ca5-84d1-44a1-87a3-00ccd7874ceb</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="Brett"]Again they all appear to show something different, so what is the actual Active timer that is going to be used ?&amp;nbsp; Which one do I trust ?&amp;nbsp; I imagine its the AT command as its matches what I asked to be set, if so, what are the other values[/quote]
&lt;p&gt;You have to remember that it is the network that takes all the decisions here.&lt;/p&gt;
&lt;p&gt;AT+CPSMS is what you, as the nRF, request to the network (ie. your wanted configuration).&lt;/p&gt;
&lt;p&gt;XMONITOR reports back what the network sets.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;XMONITOR shows the actual applied configuration.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Brett"]EG: Batch GPS at a rate of 1 transfer per 30 seconds or dont ever set an LTE active timer to less than X seconds or make sure you do something with MQTT or you will always see problems ?[/quote]
&lt;p&gt;Can you please verify your timing of the MQTT link?&lt;/p&gt;
&lt;p&gt;As per your example: If you send every 30 seconds, the GPS will highly likely always be blocked by the LTE network, as it takes a bit of time before you enter PSM again. Each network has a&amp;nbsp;required paging period, usually in the order of seconds to minute, to ensure that services like SMS etc. is polled.&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: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/372921?ContentTypeID=1</link><pubDate>Fri, 17 Jun 2022 06:53:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5dc79ab-15a9-4c68-85b5-027d510721af</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;I am getting closer, but still unsure as to why the difference in responses and what the real value is.&lt;br /&gt;&lt;br /&gt;Your suggestion of setting the &lt;strong&gt;CONFIG_LTE_PSM_REQ_RAT&lt;/strong&gt; value did have an impact,with the following results:&lt;br /&gt;&lt;br /&gt;AT+CPSMS? : +CPSMS: 1,,,&amp;quot;00000011&amp;quot;,&amp;quot;00000001&amp;quot;&lt;br /&gt;AT%XMONITOR : %XMONITOR: 1,&amp;quot;Telstra@&amp;quot;,&amp;quot;Telstra@&amp;quot;,&amp;quot;50501&amp;quot;,&amp;quot;3012&amp;quot;,7,28,&amp;quot;0829550D&amp;quot;,66,9410,41,25,&amp;quot;&amp;quot;,&amp;quot;00001000&amp;quot;,&amp;quot;11100000&amp;quot;,&amp;quot;01000111&amp;quot;&lt;br /&gt;TAU: -1&lt;br /&gt;Active_timer: 16&lt;/p&gt;
&lt;p&gt;Again they all appear to show something different, so what is the actual Active timer that is going to be used ?&amp;nbsp; Which one do I trust ?&amp;nbsp; I imagine its the AT command as its matches what I asked to be set, if so, what are the other values&lt;br /&gt;&lt;br /&gt;AT?CPSMS = 00000001 = 2seconds * 1 = 2 seconds&lt;br /&gt;XMONITOR = 11100000 = Timer deactivate ? or is it one of the other fields - either way none of match hte AT command above&lt;br /&gt;lte_lc_psm_get = 16&lt;br /&gt;&lt;br /&gt;I am now in a situation where I can get the NRF_MODEM_GNSS_EVT_UNBLOCKED state - so I can now get things moving forward.&lt;br /&gt;&lt;br /&gt;Do you have a pointer to a document which defines best practices (or bad practices) in working with LTE, GPS and MQTT.&amp;nbsp; Specifically around timers and data transfer.&amp;nbsp; &lt;br /&gt;EG: Batch GPS at a rate of 1 transfer per 30 seconds or dont ever set an LTE active timer to less than X seconds or make sure you do something with MQTT or you will always see problems ? &lt;br /&gt;&lt;br /&gt;I have looked at the GPS and MQTT examples - but I am looking for some specific details on do&amp;#39;s and dont&amp;#39;s&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;-brett&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/372388?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2022 12:43:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c880abe-14b0-4cb6-ac0e-abee5e6c8303</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="Brett"]If I want to change the TAU and RAT values I was looking to use:&lt;br /&gt;&lt;strong&gt;lte_lc_psm_param_set( )&lt;/strong&gt;, or &lt;br /&gt;&lt;br /&gt;should I use &lt;strong&gt;at_cmd_write()&lt;/strong&gt;[/quote]
&lt;p&gt;The first is a helper function to set the PSM parameters, while the second is a generic AT command write. Both can be used for setting preferred PSM TAU/ActiveTime.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Brett"]Is there a reason the following commands all give a different answer, are they all looking at different components of the LTE connection?[/quote]
&lt;p&gt;You have to differentiate between what you request, and what the network applies.&lt;/p&gt;
&lt;p&gt;You can request 10 minute TAU, but the network will most likely change this to its own defined minimum level (could be 30, could be 60 minutes or higher for that matter).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Brett"]&lt;p&gt;AT%XMONITOR : %XMONITOR: 1,&amp;quot;Telstra@&amp;quot;,&amp;quot;Telstra@&amp;quot;,&amp;quot;50501&amp;quot;,&amp;quot;3012&amp;quot;,7,28,&amp;quot;0829550D&amp;quot;,66,9410,36,22,&amp;quot;&amp;quot;,&amp;quot;00011110&amp;quot;,&amp;quot;11100000&amp;quot;,&amp;quot;01001110&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;lte_lc_psm_get( &amp;amp;tau, &amp;amp;active_timer );&lt;/p&gt;
&lt;p&gt;returns: TAU: -1 , Active_timer: 60&lt;/p&gt;[/quote]
&lt;p&gt;Try changing the active timer, which is currently set at 1 minute, via the CONFIG_LTE_PSM_REQ_RAT=&amp;quot;00000001&amp;quot;&lt;/p&gt;
&lt;p&gt;This can be 2 seconds (or even disabled, as the network will have a hard-coded timing wise paging before entering PSM)&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: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/372332?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2022 09:15:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94845ce0-3b28-494b-ac4d-8078dd096a8b</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;br /&gt;&lt;br /&gt;Thanks for the reply, a couple of follow up questions:&lt;br /&gt;&lt;br /&gt;Is there a reason the following commands all give a different answer, are they all looking at different components of the LTE connection?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Query:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;AT+CPSMS? : +CPSMS: 1,,,&amp;quot;00000011&amp;quot;,&amp;quot;00100001&amp;quot;&lt;/p&gt;
&lt;p&gt;AT%XMONITOR : %XMONITOR: 1,&amp;quot;Telstra@&amp;quot;,&amp;quot;Telstra@&amp;quot;,&amp;quot;50501&amp;quot;,&amp;quot;3012&amp;quot;,7,28,&amp;quot;0829550D&amp;quot;,66,9410,36,22,&amp;quot;&amp;quot;,&amp;quot;00011110&amp;quot;,&amp;quot;11100000&amp;quot;,&amp;quot;01001110&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;lte_lc_psm_get( &amp;amp;tau, &amp;amp;active_timer );&lt;/p&gt;
&lt;p&gt;returns: TAU: -1 , Active_timer: 60&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Set:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If I want to change the TAU and RAT values I was looking to use:&lt;br /&gt;&lt;strong&gt;lte_lc_psm_param_set( )&lt;/strong&gt;, or &lt;br /&gt;&lt;br /&gt;should I use &lt;strong&gt;at_cmd_write()&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;-brett&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: LTE + GPS + MQTT - GPS Blocked</title><link>https://devzone.nordicsemi.com/thread/372132?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2022 12:07:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90b036e0-693e-421b-a7a2-33e99c0b4f62</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=""]AT+CPSMS? : +CPSMS: 1,,,&amp;quot;00000011&amp;quot;,&amp;quot;00100001&amp;quot;[/quote]
&lt;p&gt;These are your requested TAU and active time, as per the documentation:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/cpsms_read.html?cp=2_1_7_2_1"&gt;https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/cpsms_read.html?cp=2_1_7_2_1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I see that you request 30 minutes TAU and 1 minute active time(001 = 1 minute, 00001 = times one). I can recommend that you request a lower active time, as this will significantly reduce the time for the GPS to be able to run successfully.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if you have a mqtt keep alive of 1 minute, you&amp;#39;ll always be blocked by the LTE network with your current timing values.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PS: to view the PSM/eDRX settings applied to your link, you should issue the XMONITOR AT command:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/xmonitor_set.html?cp=2_1_7_11_0"&gt;https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/xmonitor_set.html?cp=2_1_7_11_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]lte_lc_psm_req(true);&lt;br /&gt;lte_lc_edrx_req(true);[/quote]
&lt;p&gt;You should only request either eDRX or PSM.&lt;/p&gt;
[quote user=""]&lt;p&gt;Q: Do I need to set the modem differently ?&lt;/p&gt;
&lt;p&gt;Q: Do I need to disconnect from MQTT for GPS to work and then reconnect when I want to send any data ?&lt;/p&gt;
&lt;p&gt;Q: Am I missing a setting on the MQTT setup/config so it allows the LTE go into PSM mode ?&lt;/p&gt;[/quote]
&lt;p&gt;You should register and await for the CSCON notification to see if the LTE link is idle or not:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/packet_domain/cscon_set.html?cp=2_1_6_16_0"&gt;https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/packet_domain/cscon_set.html?cp=2_1_6_16_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is also available through the lte_lc event handler as this event:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.9.1/samples/nrf9160/udp/src/main.c#L78"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v1.9.1/samples/nrf9160/udp/src/main.c#L78&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then start the GPS when the lte link is in idle mode.&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>