<?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>Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6765/timing-of-measurements-in-dependency-on-last-radio-event</link><description>Hello, 
 Let me first try to describe my whole project I just started with today (Hardware just arrived). 
 I want to use the nRF51-DK as a central device to handle 4 peripherals. 
 4 Peripherals (modules based on revision 2 nrf51822) - not accessible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 May 2015 14:00:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6765/timing-of-measurements-in-dependency-on-last-radio-event" /><item><title>RE: Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/thread/23767?ContentTypeID=1</link><pubDate>Wed, 06 May 2015 14:00:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d1f5f8d-387f-4c88-9ffa-fa9fbeac26a6</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;Thanks for your answer! I didn&amp;#39;t find anything related to HVX in the example you mentioned but in another one I were more lucky. I also made a separate question for this: &lt;a href="https://devzone.nordicsemi.com/question/37125/multilink-peripheral-example-master-control-panel-how-to-send-enable-notifications/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt; But already answered it myself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/thread/23766?ContentTypeID=1</link><pubDate>Wed, 06 May 2015 13:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a2648a6-3d1e-4561-8ae1-081e1e53b7ef</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;You can enable notifications on Android nRF MCP. If you for example flash the ble_app_hrs example to the nRF51 device, then you should see it in MCP and be able to connect to it. When you are connected, you can select i.e. the battery service. The battery service has two properties, READ and NOTIFY. If you press the notify button you are enabling notification on the battery service, which will allow the peripheral device to send notifications with sd_ble_gatts_hvx. The MCP will start to receive periodic messages for the battery status.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/thread/23765?ContentTypeID=1</link><pubDate>Fri, 01 May 2015 15:42:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff409b4e-aae7-42d9-a442-57f323e6a06d</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;I will stick as close as possible to everything you linked. Thanks :)&lt;/p&gt;
&lt;p&gt;For the start I took the multilink_perpipheral example and added SPI,UART and changed the characteristic. Works fine so far.&lt;/p&gt;
&lt;p&gt;Can you recommend any links or give some more details by yourself about this part of your answer:
&amp;quot;Then the central will need to enable services in order to get notifications from the peripheral. The peripheral device can then send notifications to the central with sd_ble_gatts_hvx&amp;quot;&lt;/p&gt;
&lt;p&gt;I can easily get the measurement once. Can i &amp;quot;enable notifications&amp;quot; with the nRF Master Control Panel (Android)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/thread/23764?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2015 11:24:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52a84a56-1da4-4a33-99d1-224c5db56fe2</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;We are happy to help.
I would recommend to post a separate thread for unrelated questions you may have. If you have a SPI question, look for the answer here on devzone and post a separate thread if you can not find adequate answer. For more info, &lt;a href="https://devzone.nordicsemi.com/blogs/7/how-should-i-ask-my-question/"&gt;(1)&lt;/a&gt; &lt;a href="https://devzone.nordicsemi.com/blogs/8/how-should-i-not-ask-my-question/"&gt;(2)&lt;/a&gt; &lt;a href="https://devzone.nordicsemi.com/blogs/6/how-do-i-know-where-i-should-ask-my-question/"&gt;(3)&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/thread/23763?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2015 18:55:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c28bebf-df50-4c34-a733-862138f240d1</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;I don&amp;#39;t know why but I didn&amp;#39;t got any email notifications for your answers. (It worked fine on all other questions as far as I noticed.)&lt;/p&gt;
&lt;p&gt;Thank you so much for your long answer Stefan and of course also thank you Ulrich for your contribution!&lt;/p&gt;
&lt;p&gt;I am currently struggling with getting SPI to work as at the moment it does not for unknown reasons..&lt;/p&gt;
&lt;p&gt;I guess the timing is not the first thing on my ToDo, It just came to my mind. Of course it would be nicer to keep them recent but in the end it doesn&amp;#39;t really matter if the measurement is already 3,9seconds old.&lt;/p&gt;
&lt;p&gt;But for the software part of this part (~5 weeks) of my thesis  the priority is to make it work, improvements can follow later. So I guess priority order is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Peripheral: Get
Softdevice110+SPI working
flawlessly -&amp;gt; Get sensor raw data -&amp;gt;  Compute pressure/temp -&amp;gt; Create connectable service that can
send the pressure/temp&lt;/li&gt;
&lt;li&gt;Central: SD120+UART+connects to 4 peripherals and collects all the data.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/thread/23762?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2015 13:33:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7887383-f40e-44e0-840b-b2d41d1f4ce5</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;I am not sure if radio notifications could solve this, seeing the measurements taking 10ms + math time, and the maximum distance of notifications is around 5.5ms. Considering noise/CRC errors, a high slave latency would probably be better than a long connection interval as well - at the cost of higher current consumption in the central. It could be possible to use radio notifications or a hook on TX_COMPLETE to set a timer for the next data gathering though, but the timings have to be found experimentally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timing of measurements in dependency on last radio event</title><link>https://devzone.nordicsemi.com/thread/23761?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2015 11:56:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c23fe1d6-f0f5-4e41-b59a-ec1ab2342541</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sounds like an exciting project.&lt;/p&gt;
&lt;p&gt;Yes, definitely try to get each part to work separately before combining them. I should be easier to debug that way.&lt;/p&gt;
&lt;p&gt;In order to save current, please look at the &lt;a href="https://devzone.nordicsemi.com/question/5186/how-to-minimize-current-consumption-for-ble-application-on-nrf51822/#reply-5187"&gt;current consumption guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In order to save current you can set your connection interval to 4 seconds, since you only need to send data every 4 seconds. You can enable radio notifications in order to perform the sensor measurements just in time before each radio event. There is a radio notification example available on &lt;a href="https://devzone.nordicsemi.com/question/28577/increase-delay-between-radio-event-and-cpu-cycle/"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The peripheral devices can request for a connection parameter update from the central, see &lt;a href="https://devzone.nordicsemi.com/question/12545/update-connection-parameter-programmatically/"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For you scenario, I guess it would be convenient to let the peripherals be servers and the central act as client. Then you would let the characteristics containing your sensor data on the peripheral send notification messages to the central. This is done in most BLE examples in the nRF51 SDK, including the &lt;a href="https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a00072.html"&gt;ble_app_uart example&lt;/a&gt;. The compatible &lt;a href="https://github.com/NordicSemiconductor/ble_app_uart_c_S120/tree/master"&gt;ble_app_uart_c_120 example&lt;/a&gt; is available on Nordic Github page. Perhaps also the ble_app_hrs_c example on the central side could demonstrate how to connect to multiple peripherals, i.e. start scan after connecting.&lt;/p&gt;
&lt;p&gt;The way it works is that the peripheral will start with advertising. The central will connect to the peripheral and discover services. Then the central will need to enable services in order to get notifications from the peripheral. The peripheral device can then send notifications to the central with &lt;a href="https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a01056.html#ga313fe43c2e93267da668572e885945db"&gt;sd_ble_gatts_hvx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>