<?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 sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86211/get-gps-sentence-through-uart-zephyr</link><description>Hi, 
 I would like to know if there are sample programs for getting GPS sentences through UART using Zephyr. I am using Fanstel (BT840X) board. I would also like to know the configurations that needs to be set so that I can get the GPS sentences through</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Apr 2022 15:58:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86211/get-gps-sentence-through-uart-zephyr" /><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/363065?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 15:58:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3909a22d-ac56-4296-92a7-b0c7c3f55cba</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;I see. Thank you very much for the clarifications.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/362949?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 05:31:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d62993fc-2602-4ab2-a10e-d73b6b6e0d67</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Oli,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="snowstorm "]But what you said earlier was that the Fanstel board (BT840X) was not supported by Zephyr[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;For clarification:&lt;br /&gt;&lt;br /&gt;What I meant here is that there is no native support for the Fanstel BT840X in Zephyr. But that doesn’t mean that you can not add the board to the Zephyr devicetree yourself.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="snowstorm "]and that I needed another board like the 9160 to get the GPS sentences[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;According to &lt;a href="https://www.fanstel.com/bt840f-nrf52840-ble-5-module-secure-iot-802154-thread-zigbee-1"&gt;Fanstel&lt;/a&gt; themselves, the BT840X is a Bluetooth, Thread and Zigbee module using the nRF52840. Our nRF5 series does not have a modem, so you are depended on an external cellular IoT device, like the nRF9160, to receive GPS sentences.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/362906?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 15:54:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aeb54981-c321-4128-bcf9-77135cec5e5e</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;Hi Markus,&lt;/p&gt;
&lt;p&gt;Yes. I have tried adding the board on Zephyr, I then used the UART Polling API and got some data through the UART. But what you said earlier was that the Fanstel board (BT840X) was not supported by Zephyr and that I needed another board like the 9160 to get the GPS sentences. What I got from what you said was that I can&amp;#39;t use the Fanstel board BT840X with Zephyr, but it worked.&lt;/p&gt;
&lt;p&gt;Thanks and best regards,&lt;/p&gt;
&lt;p&gt;Oli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/362304?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 11:07:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:513bfc11-7325-424e-b0f7-5278530d0017</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Oli,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="snowstorm "]I just need to follow up on what you said that Zephyr does not support the Fanstel? Maybe I missed something.&amp;nbsp;[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Ok, so I assume that you have added the board to Zephyr by yourself, then?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="snowstorm "]&lt;p&gt;For the poll function, I think the program that I have used does not clear the buffer that is why the &amp;quot;,&amp;quot; is still read even though the return value is -1.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have another question though, can the polling function recognize a space? or when it sees a blank space it terminates the polling?&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Space is converted to an ASCII string, like any other char value. However, ‘\0’ can be used as terminator.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/362181?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 20:24:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e320e6b7-f0d8-4695-a8cf-61a5a791b3f5</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;Hi Markus,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I just need to follow up on what you said that Zephyr does not support the Fanstel? Maybe I missed something.&amp;nbsp;&lt;/p&gt;
[quote userid="100109" url="~/f/nordic-q-a/86211/get-gps-sentence-through-uart-zephyr/359912#359912"]But Zephyr does not &lt;a href="https://github.com/openthread/openthread/issues/4995"&gt;support&lt;/a&gt; the Fanstel BT840X and for receiving GPS data, you need an external device like the &lt;a href="https://www.nordicsemi.com/Products/nRF9160"&gt;nRF9160&lt;/a&gt; anyway.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For the poll function, I think the program that I have used does not clear the buffer that is why the &amp;quot;,&amp;quot; is still read even though the return value is -1.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have another question though, can the polling function recognize a space? or when it sees a blank space it terminates the polling?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Oli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/361740?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 07:48:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ea1a676-b0d2-4ba6-9e95-d08142c734f9</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Oli,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="snowstorm "]But the other problem that I am getting is when the character that is read is &amp;quot;,&amp;quot; the uart_poll_in returns -1 and does not get the succeeding data. Have you encountered this problem?&amp;nbsp;[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;return value -1 means that the UART input buffer was empty. How do you know that it is character “,” and does it work with other ones?&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/361616?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 18:35:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfecd65a-3a3d-4109-b385-31e464c1b8aa</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have managed to make the Zephyr UART work by using the Polling API. But the other problem that I am getting is when the character that is read is &amp;quot;,&amp;quot; the uart_poll_in returns -1 and does not get the succeeding data. Have you encountered this problem?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/361582?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 14:42:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8d8dc87-327e-4b9b-9a5d-9ede658ad9a2</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the reply. I will be using an ultrasonic sensor.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/361438?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 09:25:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b982970c-d153-4516-aac5-6587e7fa1647</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Oli,&lt;br /&gt;&lt;br /&gt;first of all, my apologies for the late reply! I was out of office unplanned during last week.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="snowstorm "]hence the reason I was asking if there are other Zephyr Sensor Sample Programs that interacts or uses UART. An example zephyr program that interacts with the uart would be great because it can kickstart projects that needs the uart protocol and we can modify and understand what configurations we need to include in the proj.conf, dts file, etc. [/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;May I ask what kind of sensor you will use in your project? Many sensors are using I2C/SPI as interface for communication, so Zephyr does not offer that many samples demonstrating the usage for UART with the Sensor API.&lt;br /&gt;&lt;br /&gt;However, there is one sample which uses UART, the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/samples/sensor/mhz19b/README.html#mh-z19b-co2-sensor-sample"&gt;MH-19B: CO2 Sensor Sample&lt;/a&gt;. I haven’t tried this myself, but maybe it is possible to add your sensor to the desired UART peripheral of your device, as shown in this &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/zephyr-v3.0.0/samples/sensor/mhz19b/boards/nucleo_g0b1re.overlay"&gt;overlay file&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Otherwise, I refer to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/reference/peripherals/uart.html#uart"&gt;UART&lt;/a&gt; API documentation, which should be quite straight forward to use.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/360604?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 15:33:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2123b2a4-fa6e-4b00-8045-f634cf6a0e21</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;Yes. I have seen that many of the Zephyr Sensor Samples are interacting with either SPI or I2C, hence the reason I was asking if there are other Zephyr Sensor Sample Programs that interacts or uses UART. An example zephyr program that interacts with the uart would be great because it can kickstart projects that needs the uart protocol and we can modify and understand what configurations we need to include in the proj.conf, dts file, etc. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/360602?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 15:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09ed3bc3-f53b-4913-be8c-07fef7a027ef</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;Does this mean that I cannot use Zephyr with the Fanstel BT840X? I have already tried Bluetooth samples under Zephyr using the Fanstel board and it worked successfully particularly the advertising and scanning. Kindly shed more light on this. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/360433?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 06:57:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4778ce7-0499-4ca7-910d-aff804a4951f</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Oli,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="snowstorm "]Hello! Do you have sample program for other sensors that uses the UART implementation with Zephyr? Thanks[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Referring to Zephyrs &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/samples/sensor/sensor.html#sensor-samples"&gt;Sensor Samples&lt;/a&gt;. Please note that many of those interact with the sensors via SPI or I2C. But the data will be displayed via UART.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/360365?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 16:00:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e710c29-5ba2-4ec0-9b2d-3af1edcda1a8</guid><dc:creator>Oli</dc:creator><description>&lt;p&gt;Hello! Do you have sample program for other sensors that uses the UART implementation with Zephyr? Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get GPS sentence through UART (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/359912?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 07:04:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bed25af1-0d95-4c77-848d-45bb86248111</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Oli,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]I would like to know if there are sample programs for getting GPS sentences through UART using Zephyr.[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Referring to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/samples/nrf9160/gnss/README.html"&gt;GNSS&lt;/a&gt; sample.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]I am using Fanstel (BT840X) board.&amp;nbsp;&lt;span style="font-family:inherit;"&gt;I would also like to know the configurations that needs to be set so that I can get the GPS sentences through UART.&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;But Zephyr does not &lt;a href="https://github.com/openthread/openthread/issues/4995"&gt;support&lt;/a&gt; the Fanstel BT840X and for receiving GPS data, you need an external device like the &lt;a href="https://www.nordicsemi.com/Products/nRF9160"&gt;nRF9160&lt;/a&gt; anyway.&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>