<?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>Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44293/android-central-receive-notifications-from-two-nrf52832-peripherals-at-high-frequency</link><description>Hello, 
 I have the following scenario: An Android Phone is playing the master role and two nRF52 custom boards are connected to the master as peripherals. Both peripherals are sending IMU data as notifications to the Android Master at 50 Hz. The same</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Mar 2019 15:23:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44293/android-central-receive-notifications-from-two-nrf52832-peripherals-at-high-frequency" /><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/176254?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 15:23:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95dabf88-ca72-4085-bab6-414ad59cbf81</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;thank you for the help and support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/176237?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 14:35:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62bbfdcd-26c0-4f92-87ba-30a94f01abeb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You would need a proper professional sniffer in order to sniff multiple connections simultaneously (such as for instance a &lt;a href="https://www.ellisys.com/products/bex400/"&gt;Ellisys Bluetooth Explorer&lt;/a&gt;). These are not cheep, though.&lt;/p&gt;
&lt;p&gt;We cold just assume that this is the case for now and make a test that should mitigate the issue. If you use a connection interval that is larger then the sensor sampling interval, and/or allow multiple packets per connection event, then you should be able to retransmit quickly enough that you can continue transmitting sensor readings at the correct average speed, keeping them in sync, except for the clock drift.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/176225?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 14:09:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88b3da12-069f-40c8-a0b3-73e3fc599a55</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the reply.&lt;/p&gt;
&lt;p&gt;I also think that some re-transmittion of packets occurs. Do you have any Idea how I can sniff both sensor connections at the same time ? I have one PCA10040 Board which I use as a sniffer but I dont think Wireshark can sniff two connections at the same time ? I also have one nRF52840 PCA10059 board, but I think it cannot be used as a sniffer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/176108?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 09:13:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6653bb00-3b45-41da-a346-8b4d8c2998d3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for letting us know about your progress. The difference is too big to be explained by typical 32.768 kHz clock drift.&amp;nbsp;A possible explanation could be that you have more packet loss on line link than the other for some reason, leading to retransmissions. Then if you sample once per connection event, that would potentially cause a lag, at least if only one packet is exchanged per connection event. It should be possible to see this from a sniffer trace if that is the case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/175588?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 10:06:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb5bb09d-9a94-4332-912e-ab2e186f35fc</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;Hello, sory for the late reply but I was busy with experimenting. So I have changed a couple of things:&lt;/p&gt;
&lt;p&gt;1. My previous results ware based on nrf_delay_ms() function which triggered the sending of notification each 20 ms (I know not the cleverest idea...). I have replaced it with a RTC Timer and put the CPU in sleep mode until the timer expires and the next notification is sent.&lt;/p&gt;
&lt;p&gt;2. I used an external board for synchronization which sets a pin on both sensors and starts the timers synchronously.&lt;/p&gt;
&lt;p&gt;3. On the Android device I have replaced the blocking queues with two counter variables which are incremented when a notification is received from sensor 1 and sensor 2 respectively. Another low priority Thread is calculating the difference of the two counters each second and writes the result in a file.&lt;/p&gt;
&lt;p&gt;The results of the test which lasted for about 50 minutes looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6646.Unbenannt.png" /&gt;&lt;/p&gt;
&lt;p&gt;After 30 minutes one of the sensors have sent&amp;nbsp; around 12 notifications more than the other. Then the other sensor starts sending faster. But the total difference of 10 - 12 notifications over a long term does not seem so bad. Since Android is not a real-time OS and the BLE is not time-deterministic protocol, I think we cannot achieve much better simultaneous reception of notifications. Any other opinion on the results would be appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/174955?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 08:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45eaa799-4a46-424a-ac7f-f47cee8c35ef</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you had any progress with this problem?&lt;/p&gt;
&lt;p&gt;If not, I wander if it always is the same board that lags behind, or if it seems random? Do you have a sniffer trace showing the communication with the two boards?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/174334?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 15:22:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c32edd12-2aac-418c-9f16-58853c83c0a2</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;I have finished my Android function which retrieves the connection parameters set by the callback BLE_GAP_EVT_CONN_PARAM_UPDATE. As a result, I could see, that both sensors are initialized with the same parameters: min 15 ms, max 15 ms, slave latency 0, timeout 2000&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173915?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 10:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d968cc79-165d-4c0d-9c5b-746ca3fc6da4</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;AIUI, the dongle comes with a site for a debug connector, but there isn&amp;#39;t one fitted - you have to do that yourself. (just like the Sparkfun board shown above).&lt;/p&gt;
&lt;p&gt;Pretty sure there are instructions available ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173910?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 10:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b42c7caa-5c76-4bd0-9350-f238087b9cfc</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;I have one development board PCA 10040 and one nRF52840 Dongle. I will try to use the Dongle as a second debug board, although I am not sure if it supports debugging at all !?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173907?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 09:57:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abfa6dec-c465-4dff-803c-3773302a8d7b</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;I see.&lt;/p&gt;
&lt;p&gt;So can you replicate your code on a couple of DKs, or a couple of low-cost breakout boards?&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve found these quite useful - as they don&amp;#39;t interfere with many of the pins:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1551693399104v1.jpeg" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.sparkfun.com/products/13990"&gt;https://www.sparkfun.com/products/13990&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173897?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 09:30:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0d4bce2-c383-450e-9e52-49f15a6dea02</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;I work on custom made boards and currently I have only one board on which I can attach a debugger. The others are encapsulated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173896?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 09:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af54d525-6dd7-4c80-b236-d7a8cc6fd5d5</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;Thanks for the hint. Will try to retrieve the log HCI log to see the parameters&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173768?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 17:06:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2c2d6d5-9970-470d-a886-08e937ca7457</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;But &lt;em&gt;&lt;strong&gt;why&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;can you&amp;nbsp;&lt;span&gt;debug only on one sensor at a time?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What prevents you from debugging both at once?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="edit-form"&gt;&lt;/div&gt;
&lt;div class="actions meta default"&gt;
&lt;div class="navigation-list"&gt;
&lt;div class="container"&gt;
&lt;ul&gt;
&lt;li class="navigation-list-item vote"&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173767?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 16:58:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb0f8e37-f181-4aba-b8fa-f781622d9a5c</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;exactly, I can debug only one sensor at a time. My next plan is to transmit the connection parameters to the Android device when BLE_GAP_EVT_CONN_PARAM_UPDATE is called, so that I can see each change.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173766?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 16:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5c0dbc7-da3e-4dcd-9d48-e7bbcec60545</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Why can you&amp;nbsp;&lt;span&gt;debug only on one sensor at a time?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173764?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 16:33:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:406acec5-25ec-4027-8132-f6da6f04678d</guid><dc:creator>vvelinov</dc:creator><description>&lt;p&gt;Thanks for the hint. I trigger the connection parameters change from the Android device by calling the function: BluetoothGatt::requestConnectionPriority(CONNECTION_PRIORITY_HIGH) and the function returns true for both sensor connections. This function call triggers the event handler BLE_GAP_EVT_CONN_PARAM_UPDATE on the peripheral with the value 15ms for min and max connection interval. However, I cannot see if the second sensor also receives the same connection parameters since I can debug only on one sensor at a time. Any ideas how to check it ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android central receive notifications from two nRF52832 peripherals at high frequency</title><link>https://devzone.nordicsemi.com/thread/173754?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 15:44:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67823dc1-46b8-4305-bc21-76ee3aed86bb</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Are you sure that both peripherals are getting the same connection parameters?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44112/data-transfer-between-softdevice-and-android-too-slow/173748#173748"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/44112/data-transfer-between-softdevice-and-android-too-slow/173748#173748&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>