<?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>AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75908/agps-with-supl-with-mqtt_simple-example</link><description>Hi, 
 I use MQTT_Simple example with AGPS feature; 
 I add 3 functions, one for init GPS, one for start GPS, and the last for A_GPS request. 
 
 I call Init after &amp;quot;MQTT client connected&amp;quot;, and start GPS by button_handler. 
 When it runs, an error occurs</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jun 2021 09:00:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75908/agps-with-supl-with-mqtt_simple-example" /><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/315543?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 09:00:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25193f6a-10d9-426c-be2e-b505a995ee5b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Happy to help! &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;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/315457?ContentTypeID=1</link><pubDate>Tue, 15 Jun 2021 15:09:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bd43c93-a3e1-4e18-9715-a6976751f184</guid><dc:creator>Nahan_Trogn</dc:creator><description>&lt;p&gt;&lt;em&gt;Thank you&lt;/em&gt;&lt;span&gt;&amp;nbsp;for all&amp;nbsp;&lt;/span&gt;&lt;em&gt;your assistance&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/315273?ContentTypeID=1</link><pubDate>Tue, 15 Jun 2021 06:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf14e0c7-9ee9-43e9-bc11-ab6774aecd6b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Glad to hear. Does this mean that you have solved your issue?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/315256?ContentTypeID=1</link><pubDate>Tue, 15 Jun 2021 01:45:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:801f14dc-a0d5-4ef9-acfd-8100523f4e4d</guid><dc:creator>Nahan_Trogn</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If I use a config like the AGPS example, then I can use mqtt_simple with AGPS feature on mqtt_simple example base.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/314173?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 10:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f3a7d33-52f4-4079-b290-8e1885b91aab</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m trying to find a solution to this issue, and am currently working with our developers.&lt;/p&gt;
&lt;p&gt;The initial question is: Have you tried implementing MQTT to the AGPS sample? If this sample works as intended, then maybe that would be an easier work-around.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Our SUPL expert had a look at you case, and says:&lt;/p&gt;
&lt;div&gt;&lt;em&gt;&lt;em&gt;It seems that device gets some A-GPS data and writes that to the modem. It seems as if it couldn&amp;#39;t read all of the data or something like that.&amp;nbsp;&lt;/em&gt;&lt;/em&gt;
&lt;div&gt;&lt;em&gt;It takes a long time, so it can&amp;#39;t be executed for example in the button handler directly. It should be ran in a separate thread. And the proper way to do it would be to fetch A-GPS data when GNSS asks for it.&amp;nbsp;GPS driver sends event GPS_EVT_AGPS_DATA_NEEDED when it needs A-GPS data. That event contains a structure of type gps_agps_request which indicates what kind of A-GPS data GNSS needs.&amp;nbsp;They should check the AGPS sample, it triggers the fetching of A-GPS data when GPS_EVT_AGPS_DATA_NEEDED is received by the event handler.&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313604?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 10:25:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a57ef93-a2b5-4982-8a24-ac97189b55aa</guid><dc:creator>Nahan_Trogn</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve followed your guide. I also set my mqtt alive time to 300s, but the same problem. I do the first start AGPS right after mqtt client connected Event and got -13 error; then I try start in RRC Idle event, also -13&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2021_2D00_06_2D00_04T10_5F00_01_5F00_54.036Z_2D00_log.txt"&gt;devzone.nordicsemi.com/.../2021_2D00_06_2D00_04T10_5F00_01_5F00_54.036Z_2D00_log.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313586?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 09:33:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0251f6dc-8787-46a2-864c-f98bd5e96791</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve discussed the issue with some of my colleagues. First of all, the error -13 is not permission denied, it is from the SUPL library (&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;em&gt;nrf\ext\lib\bin\supl\include\supl_session.h&lt;/em&gt;&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define LIBSUPL_TIMEOUT                     (-13)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the the GPS struct gps_cfg, please try to remove &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;priority = true,&lt;/span&gt; or set to false:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct gps_config gps_cfg = {
            .nav_mode = GPS_NAV_MODE_PERIODIC,
            .power_mode = GPS_POWER_MODE_DISABLED,
            .timeout = 360,
            .interval = 360 +
                    30,
            .priority = true,
    };&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And please increase the MQTT keepalive, which is default to 60 seconds in the MQTT&amp;nbsp;library. This value depends on the MQTT broker you are using, i.e. AWS IoT allows a keepalive of&amp;nbsp;maximum 1200 seconds. You could try e.g. 180 seconds:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_MQTT_KEEPALIVE=180
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313359?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 10:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95749e38-f934-48a3-acf5-94bfd406ae29</guid><dc:creator>Nahan_Trogn</dc:creator><description>&lt;p&gt;This is my log file. I manually start AGPS by button, when seeing RRC Idle Event. I achieve 2 successes.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2021_2D00_06_2D00_02T14_5F00_24_5F00_18.010Z_2D00_log.txt"&gt;devzone.nordicsemi.com/.../2021_2D00_06_2D00_02T14_5F00_24_5F00_18.010Z_2D00_log.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The Default AGPS example and GPS example work well. I combine AGPS to MQTT_Simple base on the AGPS example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313351?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 10:21:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:178aff9c-50f0-4ad0-928c-3ccfafefb851</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="Nahan_Trogn"]Idle, then continue to wait 25-30 seconds, and start AGPS, sometimes SUPL success, many times fail.[/quote]
&lt;p&gt;&amp;nbsp;Can you provide some information on what is failing&lt;/p&gt;
[quote user="Nahan_Trogn"]My problem is I don&amp;#39;t know when to do the first start for AGPS to obtain SUPL data.[/quote]
&lt;p&gt;Does the default &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/nrf/samples/nrf9160/agps/README.html#nrf9160-a-gps"&gt;AGPS sample&lt;/a&gt; work?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Have you tried to start with e.g. AGPS sample and add MQTT to this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313340?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 09:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3fbafea-ed2e-45ce-8b92-e15e0df56d00</guid><dc:creator>Nahan_Trogn</dc:creator><description>&lt;p&gt;In my case, I want to use AGPS, so I still wait for RRC Idle? I try to start AGPS when RRC in Idle mode, but the same problem. I wait for RRC to announce Idle, then continue to wait 25-30 seconds, and start AGPS, sometimes SUPL success, many times fail.&lt;/p&gt;
&lt;p&gt;My problem is I don&amp;#39;t know when to do the first start for AGPS to obtain SUPL data.&lt;/p&gt;
&lt;p&gt;I use nRF9160 GPS driver [experimental].&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313332?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 09:39:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8d54e28-f9e4-4438-a090-bf753c6cbb17</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can use e.g. &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/packet_domain/cscon.html"&gt;AT+CSCON to check the signaling connection status&lt;/a&gt;&amp;nbsp;to check&amp;nbsp;mode parameter, either Idle or Connected. The former is what you will need to check.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Have a look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/nrf/include/modem/lte_lc.html#lte-link-controller"&gt;LTE Link Controller &lt;/a&gt;(&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf\include\modem\lte_lc.h&lt;/span&gt;)&amp;nbsp;and the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/nrf/samples/nrf9160/gps/README.html"&gt;GPS sample&lt;/a&gt;, for an example on how this is handled (&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf\samples\nrf9160\gps\src\main.c&lt;/span&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313102?ContentTypeID=1</link><pubDate>Wed, 02 Jun 2021 12:36:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75d5be67-4a5f-4dc9-a981-0f808bfd7e74</guid><dc:creator>Nahan_Trogn</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In start function, I success enable PSM mode, and receive feedback &amp;quot;PSM parameter update: TAU: 15000, Active time: 6&amp;quot;. How to know&amp;nbsp;&lt;span&gt;&amp;nbsp;my device is in PSM? Are there any events that I can check?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I see that, in PSM mode, there is sometimes RCC in connected mode, does this affect GPS? So I only need to check RCC whether in idle mode?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AGPS with SUPL with MQTT_Simple example</title><link>https://devzone.nordicsemi.com/thread/313072?ContentTypeID=1</link><pubDate>Wed, 02 Jun 2021 11:35:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67b1f94b-ea2a-4931-92d9-77144955d96c</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Error: -13 that you get, translates to&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define	EACCES 13	/* Permission denied */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;span&gt;GPS&lt;/span&gt;&lt;span&gt;&amp;nbsp;receiver&amp;nbsp;supports&amp;nbsp;&lt;/span&gt;&lt;span&gt;GPS&lt;/span&gt;&lt;span&gt;&amp;nbsp;L1 C/A reception. Operation is time multiplexed with LTE modem, and it is possible to obtain the&amp;nbsp;&lt;/span&gt;&lt;span&gt;GPS&lt;/span&gt;&lt;span&gt;&amp;nbsp;position either while the LTE is in RRC Idle mode or power saving mode (PSM), or when the LTE modem is completely deactivated.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please make sure that your device is in PSM or deactivated before starting GPS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>