<?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>Data format translation from SUPL to NRF Cloud AGPS Schema V1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87186/data-format-translation-from-supl-to-nrf-cloud-agps-schema-v1</link><description>Hello, 
 Using the nRF Connect SDK 1.9.1 for nRF9160 location. Found the &amp;quot;location&amp;quot; library quite simple and scalable to use. So was looking into it. We do not plan to use nRF Cloud for AGPS, and selected the corresponding option to go with External AGPS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Apr 2022 12:22:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87186/data-format-translation-from-supl-to-nrf-cloud-agps-schema-v1" /><item><title>RE: Data format translation from SUPL to NRF Cloud AGPS Schema V1</title><link>https://devzone.nordicsemi.com/thread/364714?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 12:22:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0c7fb7b-84f1-4c50-b5f5-78d63e59496c</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="Anirudh Agarkhed"]&lt;p&gt;Kindly help me understand why provide the option for configuring of feeding external AGPS and PGPS data specified as &amp;quot;CONFIG_LOCATION_METHOD_GNSS_AGPS_EXTERNAL&amp;quot; in&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/modem/location.html#configuration"&gt;developer.nordicsemi.com/.../location.html&lt;/a&gt;&lt;/p&gt;[/quote]
&lt;p&gt;If you enable this config, you have to implement the handler manually, as stated in the documentation.&lt;/p&gt;
&lt;p&gt;If you want to use AGPS with a generic supl server, like google&amp;#39;s, you should have a look at the gnss sample, and add these two configurations:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GNSS_SAMPLE_ASSISTANCE_SUPL=y
CONFIG_GNSS_SAMPLE_SUPL_HOSTNAME=&amp;quot;supl.google.com&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This requires that you have the libsupl library present in your local checkout of the SDK.&lt;/p&gt;
&lt;p&gt;You can&amp;nbsp;request libsupl&amp;nbsp;from this page:&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Products/nRF9160/Download?lang=en#infotabs"&gt;https://www.nordicsemi.com/Products/nRF9160/Download?lang=en#infotabs&lt;/a&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: Data format translation from SUPL to NRF Cloud AGPS Schema V1</title><link>https://devzone.nordicsemi.com/thread/364531?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 16:14:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:743b1c93-4449-4144-864c-3981ce78636b</guid><dc:creator>Anirudh Agarkhed</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Kindly help me understand why provide the option for configuring of feeding external AGPS and PGPS data specified as &amp;quot;CONFIG_LOCATION_METHOD_GNSS_AGPS_EXTERNAL&amp;quot; in&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/modem/location.html#configuration"&gt;developer.nordicsemi.com/.../location.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data format translation from SUPL to NRF Cloud AGPS Schema V1</title><link>https://devzone.nordicsemi.com/thread/364495?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 13:24:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:937cbad9-10d2-45d1-b9a2-567b8448a165</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;
&lt;p&gt;My apologies for misunderstanding your question. I thought you were talking about the data that goes into the GNSS socket.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;location&amp;quot; library uses nrf cloud as a backend for PGPS/AGPS operations, as explained in the documentation:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/modem/location.html#implementation"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/modem/location.html#implementation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This library can not be used with the SUPL server implementation.&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: Data format translation from SUPL to NRF Cloud AGPS Schema V1</title><link>https://devzone.nordicsemi.com/thread/364471?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 12:15:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ab33f1f-6d1b-4d14-ab5f-50485da3dd19</guid><dc:creator>Anirudh Agarkhed</dc:creator><description>&lt;p&gt;If it is indeed injected the same way to the gnss, why is there an error when &amp;quot;location_agps_data_process()&amp;quot; is invoked?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data format translation from SUPL to NRF Cloud AGPS Schema V1</title><link>https://devzone.nordicsemi.com/thread/364470?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 12:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1730dcf9-cf35-4496-8172-cf66a51259ef</guid><dc:creator>Anirudh Agarkhed</dc:creator><description>[quote userid="2115" url="~/f/nordic-q-a/87186/data-format-translation-from-supl-to-nrf-cloud-agps-schema-v1/364463#364463"]AGPS SUPL data, regardless of where it comes from (ie. google supl server or nrf cloud), is injected in the same way to the gnss.[/quote]
&lt;p&gt;When NRF Cloud AGPS is not being used, there is an event that is thrown to the location event handler, here is that event -&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * GNSS is requesting assistance data. Application should obtain the data and send it to
 * location_agps_data_process().
 */
LOCATION_EVT_GNSS_ASSISTANCE_REQUEST&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So the application will go ahead and obtain the AGPS data from SUPL server. This is supposed to be sent to &amp;quot;location_agps_data_process()&amp;quot; as per the above comment. Now here is the comment on the function declaration -&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * @brief Feed in A-GPS data to be processed by library.
 *
 * @details If Location library is not receiving A-GPS assistance data directly from nRF Cloud,
 * it throws event LOCATION_EVT_GNSS_ASSISTANCE_REQUEST when assistance is needed. Once application
 * has obtained the assistance data it can be handed over to Location library using this function.
 *
 * Note that the data must be formatted similarly to the nRF Cloud A-GPS data, see for example
 * nrf_cloud_agps_schema_v1.h.
 *
 * @param[in] buf Data received.
 * @param[in] buf_len Buffer size of data to be processed.
 *
 * @return 0 on success, or negative error code on failure.
 * @retval -EINVAL Given buffer NULL or buffer length zero.
 */
int location_agps_data_process(const char *buf, size_t buf_len);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;From the comments there, it can be seen that the data to be sent to the function has to be of a particular schema. Now the data downloaded from SUPL server is not in that format, hence there would be an error in processing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My question here is, how do I convert the received SUPL data to the desired schema?&lt;/p&gt;
&lt;p&gt;Why is this necessary is because we need a GNSS Fix as quickly as possible to ensure that the battery consumption is reduced, and without AGPS, it takes quite a lot of time to get a fix.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data format translation from SUPL to NRF Cloud AGPS Schema V1</title><link>https://devzone.nordicsemi.com/thread/364463?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 11:55:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2c888e3-9a04-446a-ac20-53d4ceb738a4</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=""]&lt;p&gt;Using the nRF Connect SDK 1.9.1 for nRF9160 location. Found the &amp;quot;location&amp;quot; library quite simple and scalable to use. So was looking into it. We do not plan to use nRF Cloud for AGPS, and selected the corresponding option to go with External AGPS data, and picked the SUPL lib to inject AGPS data. In the GNSS Sample with SUPL Assistance, the SUPL server data received is injected to the GNSS socket, which is fine. Now in case of &amp;quot;location&amp;quot; library, there is a handler &amp;quot;LOCATION_EVT_GNSS_ASSISTANCE_REQUEST&amp;quot; is received. Here it is mentioned to push the AGPS data formatted to nRF Cloud AGPS Schema V1 into function &amp;quot;location_agps_data_process&amp;quot;.&lt;/p&gt;
&lt;p&gt;1. Is there a way to translate this received SUPL data into the desired schema?&lt;/p&gt;[/quote]
&lt;p&gt;I am not sure I understand the question properly.&lt;/p&gt;
&lt;p&gt;AGPS SUPL data, regardless of where it comes from (ie. google supl server or nrf cloud), is injected in the same way to the gnss.&lt;/p&gt;
[quote user=""]2. Can the data be injected to GNSS Socket and inform the &amp;quot;location&amp;quot; library to use this SUPL&amp;#39;s AGPS data?[/quote]
&lt;p&gt;Location is a look up based on the MNC/MCC of your currently connected network, and if there&amp;#39;s a problem to look up the specific Cell ID, it will give a default location based on the country code.&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>