<?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>BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105041/ble-phone-sensor-data-to-rpi</link><description>I want to read the phone sensor data for example battery percentage and receive it in Raspberry Pi. 
 I am looking for suggestions on how can I use nRF connect app or nRF toolbox for my BLE device (smartphone).</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Nov 2023 09:02:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105041/ble-phone-sensor-data-to-rpi" /><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/453639?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2023 09:02:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:954e24dc-1b0d-4f4b-8e00-5109c66316f5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Yes, the notify property is a way for the central to allow the peripheral to send it a message &amp;#39;unprompted&amp;#39;.&lt;br /&gt;In regular characteristic read/write scenarios there is no way for the peripheral to draw the central&amp;#39;s focus to a specific characteristic - it can only reply to the specific read/write requests that the central sends, and nothing else. With notifications (the notify property, or &amp;#39;CCCD&amp;#39;) set for a characteristic the central tells the peripheral that it may update it whenever this characteristic changes.&lt;br /&gt;In this case, the central could be sending empty BLE packages (Empty PDU) to the peripheral just to maintain the link, and the peripheral may then suddenly reply with a notification about a characteristic that has changed. You can use the notify property on your custom characteristics as well, no problem.&lt;br /&gt;&lt;br /&gt;You can &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___b_l_e___g_a_t_t_s___h_v_n___m_s_c.html"&gt;see an example of the data flow within the peripheral device in this sequence diagram&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you intend to set up a sensor hub with notifications you could also benefit from taking a look at &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/thingy-53-sensor-hub"&gt;this blogpost which takes you through creating a sensor hub with the Thingy:53, but you can use the firmware on other boards as well with little adaption&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/453568?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 17:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6113453-7487-4abc-b558-1127c888ec07</guid><dc:creator>v642</dc:creator><description>&lt;p&gt;Hai Karl,&lt;/p&gt;
&lt;p&gt;I came across notify property. Now I am able to set notify for the Heart Rate service in nRF connect app. And it is streaming the heart rate data continously, but I wonder how this data flow is happening. And I can do the same for my custom service with any sensor? If so, how can I can connect my service to the sensor?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/453523?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 13:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34cee2e2-5c94-4d87-ae50-8abdf9409647</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;No problem at all, I am happy to help! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please do not hesitate to open another ticket if you should encounter any other issues or questions in the future.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/453508?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 13:07:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee70e51d-2ea5-4660-a50b-2666b47d1747</guid><dc:creator>v642</dc:creator><description>&lt;p&gt;Thanks Karl, for confirming that there is no service that helps me to get the data updates from sensors on the phone.&lt;/p&gt;
&lt;p&gt;Thanks for your time and suggestion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/453504?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 12:50:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae8b7072-3947-4884-a6d2-7ad8c0d10460</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="v642"]I tried this way, with windows 10 laptop with pybluez I have run my GATT client (central) and able to connect on my smartphone with the nRF connect app. I have configured the GATT server and able to read and write on custom service that I have created and also able do read the predefined service like heart rate, Current Time Service.[/quote]
&lt;p&gt;I am glad to read that you have got this configuration up and running!&lt;br /&gt;The next step will then be to have the RPI in the role as the central device.&lt;/p&gt;
[quote user="v642"]&lt;p&gt;My question for now is there any way that I can create my own service and the service receives some data value (sensor value) that changes at regular intervals of time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In short, I would like to know is there any service in nRF connect app that changes the value time to time.&lt;/p&gt;[/quote]
&lt;p&gt;You are free to create your own services and characteristics in the application for development purposes, but there is unfortunately no way to have the nRF Connect for smartphone application send live sensor data updates from sensors on the phone, no.&lt;br /&gt;For this you will likely have to either implement your own application for the smartphone, or to find another existing app that will let you access the phone&amp;#39;s sensor data, and let you set up an advertiser.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/453475?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 11:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0ebc0b2-afd5-42ec-b125-c1bce012dc4b</guid><dc:creator>v642</dc:creator><description>&lt;p&gt;Hai Karl,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sure. I want to make central device as RPI and peripheral as cellphone.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried this way, with windows 10 laptop with pybluez I have run my GATT client (central) and able to connect on my smartphone with the nRF connect app. I have configured the GATT server and able to read and write on custom service that I have created and also able do read the predefined service like heart rate, Current Time Service.&lt;/p&gt;
&lt;p&gt;My question for now is there any way that I can create my own service and the service receives some data value (sensor value) that changes at regular intervals of time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In short, I would like to know is there any service in nRF connect app that changes the value time to time.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/453061?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2023 13:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f4811e3-01e4-4191-b177-e8a95957e81d</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="v642"]Thanks for the reply, I have implemented the client code in python (for peripheral) but for testing it I was not able to use the GATT server from the nRF Connect in phone. The server is not able to advertise, I have checked in my RPI as well as in other smartphone.[/quote]
&lt;p&gt;No problem at all, I am happy to help! :)&amp;nbsp;&lt;br /&gt;Hm, the terminology is conflicting here - let us stick to using &amp;#39;peripheral and central&amp;#39; instead of &amp;#39;client and server&amp;#39;, for convenience and to avoid misunderstanding. Are you setting up your RPi to be a peripheral device?&lt;br /&gt;If so, you must use the regular &amp;#39;scan&amp;#39; functionality in the nRF Connect for Smartphone application to see and connect to the device.&lt;br /&gt;&lt;br /&gt;The nRF Connect for Smartphone will in this case have the central role, in this topology.&lt;br /&gt;&lt;br /&gt;Please let me know if you are in fact working to set the RPi up as a central device instead, in which case you must set up an Advertiser in the nRF Connect for Smartphone application.&lt;br /&gt;This advertiser may then have arbitrary values as its characteristics (such as setting the Battery Level Characteristic value to 80, regardless of what the actual battery level of the phone is).&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452774?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 11:46:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:718fc10a-d31a-4c97-9aab-54870277264c</guid><dc:creator>v642</dc:creator><description>&lt;p&gt;Hello Karl,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the reply, I have implemented the client code in python (for peripheral) but for testing it I was not able to use the GATT server from the nRF Connect in phone. The server is not able to advertise, I have checked in my RPI as well as in other smartphone.&lt;/p&gt;
&lt;p&gt;As you have mentioned that I can send arbitrary value to RPI is there any reference for it? I have now problem setting up the GATT server and send the value to RPI. Please share any reference documentation or link.&lt;/p&gt;
&lt;p&gt;Thanks in advance!!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452739?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 08:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac42ae84-56be-41e3-820e-b1aa5d46ec1d</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;You can easily use the nRF Connect for Smartphone application to send an arbitrary &amp;#39;battery level&amp;#39; to the RPI (like you would want to do during development and testing), but the application does not have access to the real sensor data from the phone, and so as far as I know you would unfortunately have to create your own application for the phone (or use another existing one that has access to the relevant sensor data) too I imagine, to get these readings. You will see this when you attempt to set up an advertiser in the nRF Connect for Smartphone application - you can fill in the &amp;#39;Battery level&amp;#39; characteristic, but there is no way to have it reflect the actual battery percentage of the phone.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452734?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 08:34:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:692b8012-d614-43df-8cee-f48b17958131</guid><dc:creator>v642</dc:creator><description>&lt;p&gt;Hai Karl,&lt;/p&gt;
&lt;p&gt;Thanks for answering all the above questions briefly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My&amp;nbsp; task is to read the (BLE) phone sensor data for example battery level and read it in the RPI.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452319?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 14:26:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb0b4f21-1d66-4641-a437-cec7b7f5d847</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="v642"]The nRF connect for smartphone application is best idea or the nRF toolbox is ?&amp;nbsp; - to get the atleast (one) some of the sensor data that phone generates?[/quote]
&lt;p&gt;The nRF Connect for smartphone application is created as a development tool, and so you can use it to quickly check that your devices are behaving as expected, or use it to debug issues you encounter in the BLE communication. It is not meant to be used as something to use alongside a product, if this is what you are intending - this is also why it does not access the sensor readings from the phone.&lt;/p&gt;
[quote user="v642"]What is the advantage of adding nrf- dongle for my case? Does it make things simpler?[/quote]
&lt;p&gt;The biggest upside to using a dongle(or other hardware that you control) vs. a smartphone is that you have complete control over the dongle - in many cases the operating system on your smartphone might limit your access to other parts of the smartphone, or to specific functionality such as to configure its BLE adapter to your needs.&lt;/p&gt;
[quote user="v642"]Do you have any other idea of doing this task, if I am making things complicated?[/quote]
&lt;p&gt;If you could elaborate further on what you end goal is that would help me to better advise you on the best approach.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452277?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 12:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9d5616e-2566-428d-b557-905e21a7dfa7</guid><dc:creator>v642</dc:creator><description>&lt;p&gt;Sure please. Thanks for your support.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looking forward for other tips and suggestions. And I have also raised this question in RPI forum as well. Thanks for the tip.&lt;/p&gt;
&lt;p&gt;The nRF connect for smartphone application is best idea or the nRF toolbox is ?&amp;nbsp; - to get the atleast (one) some of the sensor data that phone generates?&lt;/p&gt;
&lt;p&gt;What is the advantage of adding nrf- dongle for my case? Does it make things simpler?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you have any other idea of doing this task, if I am making things complicated?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452269?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 12:29:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2deae309-698a-4fa9-a904-b370c48051f1</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
[quote user="v642"]thanks for your suggestion.[/quote]
&lt;p&gt;No problem at all, I am happy to help! :)&amp;nbsp;&lt;/p&gt;
[quote user="v642"]&lt;p&gt;The idea you have stated looks great but unfortunately there is no documentation or&amp;nbsp; clear guide how can i do this.&lt;/p&gt;
&lt;p&gt;Not yet, I am fresher for this and still getting any idea how to do this. I am looking for discussions if someone have already made the RPI as a&amp;nbsp; central device. so this can make my work little smoother.&lt;/p&gt;[/quote]
&lt;p&gt;I understand, thank you for clarifying. We can leave your question up here in case there are some other users who have more experience working with the Raspberry Pie, but you should probably also raise this question in a Raspberry Pie forum directly, to get help with it more quickly.&lt;br /&gt;&lt;br /&gt;The nRF part should at least be very simple, since you can just go into the &amp;#39;advertiser&amp;#39; tab to set up an advertiser. The nRF Connect for smartphone application does however not have access to all the sensor data that the phone generates, and so it is not certain that you would be able to get those to send to your Raspberry Pie without modification of the app, or without creating a smartphone application yourself.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452243?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 11:36:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7020de46-4c48-4357-bb88-68de6633d93b</guid><dc:creator>v642</dc:creator><description>&lt;p&gt;Hai Karl, thanks for your suggestion.&lt;/p&gt;
&lt;p&gt;The idea you have stated looks great but unfortunately there is no documentation or&amp;nbsp; clear guide how can i do this.&lt;/p&gt;
&lt;p&gt;Not yet, I am fresher for this and still getting any idea how to do this. I am looking for discussions if someone have already made the RPI as a&amp;nbsp; central device. so this can make my work little smoother.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Phone sensor data to RPI</title><link>https://devzone.nordicsemi.com/thread/452239?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 11:25:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a8cee43-c130-4261-968f-0140cbe92399</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]I am looking for suggestions on how can I use nRF connect app or nRF toolbox for my BLE device (smartphone).&amp;nbsp;[/quote]
&lt;p&gt;The use of the nRF Connect Application for smartphone is pretty straight forward so long as the peer device is behaving as expected. In your case, you will need to make the Raspberry Pie function as a central device that scans for the advertisements that you set up on the nRF Connect Application, and reads its characteristics (or enabled notifications so that the phone can update the Raspberry Pie anytime there is a change to the characteristic).&lt;br /&gt;&lt;br /&gt;Unfortunately, I do not have much personal experience working with Raspberry Pie as this is not a Nordic product - do you already have the Raspberry Pie working as a central device?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>