<?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>Get GPS and send it to MQTT Broker</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62360/get-gps-and-send-it-to-mqtt-broker</link><description>Hi, 
 I&amp;#39;m quiet new with nrf9160. 
 I try to mix the two sample GPS and MQTT to send my position each time it change to a MQTT broker. 
 I have create two threads, one for the MQTT and the second for get the GPS position. 
 How to setup the modem to use</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Jun 2020 05:20:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62360/get-gps-and-send-it-to-mqtt-broker" /><item><title>RE: Get GPS and send it to MQTT Broker</title><link>https://devzone.nordicsemi.com/thread/255131?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 05:20:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f01da82-f8e7-4d1d-a8f0-ee85dba7656b</guid><dc:creator>thomas oggier</dc:creator><description>&lt;p&gt;Thank&amp;#39;s for your answer.&lt;/p&gt;
&lt;p&gt;I add the command &amp;quot;&lt;span&gt;AT+CFUN=0&lt;/span&gt;&amp;quot; to switch off the modem before change the mode and I&amp;#39;ve no more error.&lt;/p&gt;
&lt;p&gt;Thank&amp;#39;s for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS and send it to MQTT Broker</title><link>https://devzone.nordicsemi.com/thread/254999?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 12:10:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e406232-52e2-48bc-8d57-75012fb4361d</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Which carrier are you trying to connect to and is this a local sim or roaming SIM?&lt;br /&gt;&lt;br /&gt;Could you also attach the serial Output log from the application?&lt;br /&gt;&lt;br /&gt;From your modem log I see that you first set only xsystemmode=1,0,0,0 (LTE-M mode)&lt;/p&gt;
&lt;p&gt;then later on you select&amp;nbsp;&lt;span&gt;xsystemmode=1,0,1,0 (LTE-M mode + GPS) and get an ERROR.&amp;nbsp;&lt;br /&gt;You must put the modem in offline mode or power off mode to be able to switch&amp;nbsp;xsystemmode.&lt;br /&gt;&lt;br /&gt;Also if you are going to utilize GPS in PSM mode or eDRX you need to request these values from the network.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS and send it to MQTT Broker</title><link>https://devzone.nordicsemi.com/thread/254931?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 09:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb5b261a-0942-41eb-b5ba-23683af686f4</guid><dc:creator>thomas oggier</dc:creator><description>&lt;p&gt;I use LTEM and a nano SIM card.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS and send it to MQTT Broker</title><link>https://devzone.nordicsemi.com/thread/254872?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 06:25:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da4a51fa-0609-4b25-aec3-04e2aed5fa9c</guid><dc:creator>thomas oggier</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;Here is the log file.&lt;/p&gt;
&lt;p&gt;For the network, I am not sur. How to find the technology used?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/MQTT_2D00_GPS.zip"&gt;devzone.nordicsemi.com/.../MQTT_2D00_GPS.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS and send it to MQTT Broker</title><link>https://devzone.nordicsemi.com/thread/254299?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 14:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0520e33-5ad5-40ff-9f13-7ef62a0c8c17</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Thomas,&lt;br /&gt;&lt;br /&gt;Could you please provide the full serial output log?&lt;/p&gt;
&lt;p&gt;The best way would be to combine the samples as you are trying to do but keep two separate threads one working with the MQTT handling and one for the GPS so you do not get any blocking issues.&lt;br /&gt;The GPS samples turn the modem off switch, modes, turns it ON, work, turn OFF, Switch modes if you have enabled the SUPL library to download the A-GPS data.&lt;br /&gt;However instead of turning the modem OFF and ON all the time it is better to enable PSM mode or extend the eDRX interval so you can have LTE and GPS more or less working &amp;quot;concurrently&amp;quot;.&lt;br /&gt;Then you do not need to detach and reattach to the network each time you need to send info to the web.&lt;br /&gt;&lt;br /&gt;By the way which network, SIM card and technology are you using? (LTEM or nbiot?)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>