<?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>Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38515/frequency-of-notifications-with-android-ble-library</link><description>I am working on a derivative of the Glucose sensor code from nRF Toolbox. The sensor peripheral accumulates a number of readings. The central sends a command to the Record Access Control Point characteristic asking for the readings. The peripheral sends</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Jan 2019 09:48:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38515/frequency-of-notifications-with-android-ble-library" /><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/167037?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 09:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62d165b5-1dd2-465a-a6a8-f6204ad6b289</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi! First of all, sorry for the delay. Secondly, sorry for a) not releasing ble-common 2.0.4 (I forgot! will do this asap) and b) not updating nRF Toolbox to ble-common 2.0.4. @Acutetech, thanks for the efforts and testing the code with those mixed up libraries.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/165315?ContentTypeID=1</link><pubDate>Sun, 13 Jan 2019 12:14:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b02d219-6b0a-4703-b5fe-765499864841</guid><dc:creator>Acutetech</dc:creator><description>&lt;p&gt;David this sounds like it could be the same bug as I found. However for me the bug only occurs in certain conditions. It would be interesting to know what setup you have. Could you provide extra information:&lt;br /&gt;&lt;br /&gt;(1) &amp;nbsp; What devices have you tried, and do they all show the same results? (I only see the problem on a Samsung Galaxy A5 phone - no problem seen with 3 other tablets).&lt;br /&gt;&lt;br /&gt;(2) &amp;nbsp; Can you compare the results of nRF Toolbox downloaded from Play Store with nRF Toolbox re-built from GitHub source code? (I only see problems with the re-built nRF Toolbox; the version downloaded from Play Store works OK. Unfortunately they both report the same version number (2.6.0)).&lt;br /&gt;&lt;br /&gt;If you wanted to replicate my experiments then you could program a PCA10040 development board with the Glucose app here:&lt;br /&gt;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fble_sdk_app_gls.html&amp;amp;cp=4_0_0_4_1_2_11"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;br /&gt;then create some simulated readings and read these using the BGM app within nRF Toolbox. This uses notifications to read the glucose data.&lt;/p&gt;
&lt;p&gt;LATER:&lt;/p&gt;
&lt;p&gt;Aleksander suggests trying BLE Library 2.0.4. This is not straight-forward, as nRF Toolbox uses nRF Common 2.0.0, which uses BLE Library 2.0.0 - however after downloading nRF Common 2.0.0 and BLE Library 2.0.4 and making approprate edits in build.gradle files, nRF Toolbox builds and the bug is fixed!&lt;/p&gt;
&lt;p&gt;IMHO it would be useful if David provides the information (1) and (2) above, then reports on results of using BLE Library 2.0.4. Then it would be good if Aleksander could report that he understands the bug and the fix.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/165282?ContentTypeID=1</link><pubDate>Sat, 12 Jan 2019 09:18:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4efd61aa-fb1b-4401-b979-5662a50d2075</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;nRF Connect isn&amp;#39;t using BLE Library, it has its own implementation. Did you try BLE Library 2.0.4? The latest nRF Toolbox may not be using the latest version. I&amp;#39;ll update nrf Toolbox soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/165268?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 23:09:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9460317d-15e0-44a5-a4ca-c14741fdba3a</guid><dc:creator>davidpeaslee23</dc:creator><description>&lt;p&gt;Is there an update to this?&lt;/p&gt;
&lt;p&gt;I have a similar problem: I want to receive 4 items at about .001 sec intervals. I&amp;#39;ve used the relevant UART and profile files from GitHub Toolbox app source, but both my custom app and what I think is the latest nordic toolbox UART activity (with log) only show the first, and 3 copies of the last received packet.&lt;/p&gt;
&lt;p&gt;However, the current version of NRF Connect does catch all packets with the right data.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried debugging both my app and the toolbox with and without nrf connect attached, and the apps show repeated catches, where NRF connect catches correctly (when connected and running).&lt;/p&gt;
&lt;p&gt;I can not get to all devices right now to set a higher delay in broadcasting packets.&lt;/p&gt;
&lt;p&gt;Any suggestions on what is different between NRF Connect and NRF Toolbox?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/158891?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 17:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adc44e10-8e0e-4349-8f6d-9c8d701c6750</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Please report it on GitHub. I&amp;#39;ll take it from there. Provide some logs or way to reproduce. I&amp;#39;ll try to arrange Samsung a5, but can&amp;#39;t guarantee.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/158889?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 17:14:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7ea2b04-8beb-498f-92d4-613a4cb9e015</guid><dc:creator>Acutetech</dc:creator><description>&lt;p&gt;Hi Aleksander - is there any chance of a response from Nordic on this? Summary: the &amp;quot;latest&amp;quot; BLE Library returns the wrong Notification data but only on one of my 4 Android devices (Samsung A5). The problem is not present with the earlier BLE Library.&lt;/p&gt;
&lt;p&gt;I think it is a real bug, even if it is obscure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/157365?ContentTypeID=1</link><pubDate>Wed, 14 Nov 2018 18:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d40ff3bd-da38-4a2a-ba74-741f4a5b6e9e</guid><dc:creator>Acutetech</dc:creator><description>&lt;p&gt;I have done further work on this. First: I have bought another tablet: Lenovo TB-710F (Android 8.1.0, API27) and tried it with nRF Toolbox built from Github. That does NOT show the problem (kinda rules out a generic Android 8 fault). So I now have 4 devices all of which work except my Samsung A5 (SM-A520F, Android 8.0.0) phone, and that only fails with the latest version of nRF Toolbox. &lt;/p&gt;
&lt;p&gt;On the Samsung phone I looked at radio RX and TX signal timing and see they are the same with both versions of nRF Toolbox. So we can apparently rule out the problem as being due to some radio timing differences. The version from Playstore collects notifications correctly but the new version returns all notifications containing the same data.&lt;/p&gt;
&lt;p&gt;With the Nordic dev kit containing 20 records (seq. no.s 0-19) I download all and over 3 cycles see notifications with these sequence numbers:&lt;br /&gt;7, 7, 7, 15, 15, 15, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19&lt;br /&gt;6, 6, 6, 15, 15, 15, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19&lt;br /&gt;0, 8, 8, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19&lt;br /&gt;&lt;br /&gt;I have a CSR peripheral which I also load with 20 records (seq. no. 2-21). Notifications received were as follows (slightly different pattern?):&lt;br /&gt;8, 8, 8, 8, 8, 8, 8, 9, 13, 13, 13, 13, 14, 21, 21, 21, 21, 21, 21, 21&lt;br /&gt;8, 8, 8, 8, 8, 8, 8, 9, 16, 16, 16, 16, 16, 16, 16, 17, 21, 21, 21, 21&lt;br /&gt;8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 18, 18, 18, 18, 18, 18, 18, 19, 21, 21&lt;br /&gt;&lt;br /&gt;There is clearly a bug here, but what???? Can you guys find a Samsung A5 phone to look at?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/156937?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 15:15:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:509c1a80-24ba-4245-b264-95e674d24e18</guid><dc:creator>Acutetech</dc:creator><description>&lt;p&gt;Hi Alexsander. It was not entirely clear from your post where you have made changes: both to nRF Toolbox and BLE Library? I assume that changes to BLE Library will be picked up if I collect the latest version of nRF Toolbox? Anyway, that is what I have done (the Master branch). I see some differences, as follows:&lt;/p&gt;
&lt;p&gt;My two Android 7 tablets now seem to be working OK. Notifications are displayed correctly. Thanks. (Though I seem to have a bonding issue: I might post separately on this).&lt;/p&gt;
&lt;p&gt;My Android 8 phone (Samsung AM-A520F, Android 8.0.0, API26) still misbehaves. Exactly one record is displayed by the app (if it has any), regardless of how many are downloaded. Previously one record was displayed if it contained one record, and no records were displayed if it had more than one record. nRF Logger shows that every notification contains the same payload (as before).&lt;/p&gt;
&lt;p&gt;Have you seen the problem with Android 8 devices?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/156908?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 14:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:738b2077-0097-4c7f-973c-4d14e85d752e</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi, I&amp;#39;ve just pushed some changes to nRF Toolbox. The master branch is not using BLE library 2.0. Also, I&amp;#39;ve fixed an issue with GLS, but that was related only to UI and refreshing the table. I&amp;#39;ve also updated BLE lib dependency from beta5 to final version, but the fix seems to be already there (&lt;a href="https://github.com/NordicSemiconductor/Android-BLE-Library/commit/e5e054b5952ce6c85798895c8c84f973cf58a624"&gt;https://github.com/NordicSemiconductor/Android-BLE-Library/commit/e5e054b5952ce6c85798895c8c84f973cf58a624)&lt;/a&gt;. Nevertheless, I&amp;#39;ve tested with 20 notifications and they are all displayed on Pixel 2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/156857?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 12:00:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea026634-2499-4daf-b702-08e47c124e32</guid><dc:creator>Acutetech</dc:creator><description>&lt;p&gt;It has proved quite complex to get quality evidence. However I have some results, running a slightly modified version Nordic&amp;#39;s Glucose App running on the PCA10040 dev kit, and two versions of nRF Toolbox, on three Android devices. I have used nRF Logger to view activity. In my experiments I simulate 0, 1, 2, 3, 4 and 5 glucose readings and download these (as Notifications) to nRF Toolkit by pressing the &amp;quot;ALL&amp;quot; button.&lt;br /&gt;&lt;br /&gt;There is no fault with the nRF Toolbox downloaded from Play Store, on any device.&lt;br /&gt;&lt;br /&gt;If I rebuild the Develop branch of nRF Toolbox from Github then I get different, incorrect, results, depending on which device I use. &lt;br /&gt;&lt;br /&gt;With my Samsung Phone (Android 8), nRF Logger shows that all the Notifications contain the same payload. In every case the payload is of the final notification (determined by the &amp;quot;Sequence Number&amp;quot; which increments with each glucose reading).&lt;br /&gt;&lt;br /&gt;With both tablets (Android 7), nRF Logger shows that the Notifications contain the correct payloads. However the nRF Toolbox misbehaves. The toast messages in nRF Toolbox are correct, but reading data is not displayed properly. When the peripheral has one record it is always displayed. When it has more than one record, records are almost always NOT displayed (I see &amp;quot;No values to display&amp;quot;). But very occasionally the readings are displayed correctly.&lt;br /&gt;&lt;br /&gt;So: two bugs, or two manifestations of the same bug.&lt;br /&gt;&lt;br /&gt;I can provide a more detailed report and nRF Logger files, if you want these.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/155440?ContentTypeID=1</link><pubDate>Wed, 31 Oct 2018 21:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cbf4626-fdbd-49b8-b9aa-d8e946517a78</guid><dc:creator>Acutetech</dc:creator><description>&lt;p&gt;Let me clean some stuff up before I send you something. However I am expecting to see the problem with your example Glucose app as the Peripheral and the corresponding receiver in the nRF Toolbox. Get the two bonded, then disable BLE on the phone, then get many readings pending in the Peripheral, then turn BLE back on. The Peripheral will then send all its readings as notifications quickly. As my code is derived from the Glucose app within nRF Toolbox, I think I will see the same problem. But perhaps not!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/155254?ContentTypeID=1</link><pubDate>Wed, 31 Oct 2018 06:23:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e05ea38e-0579-499f-826c-bb894c02d54b</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;I will improve the lib in this aspect. Would there be a chance to get your firmware and app for testing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/155231?ContentTypeID=1</link><pubDate>Tue, 30 Oct 2018 21:38:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8599fbf6-30f5-4893-a56f-6fd5aab964a4</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="73161" url="~/f/nordic-q-a/38515/frequency-of-notifications-with-android-ble-library"] The peripheral hangs up as it sends the Notification AFTER the last one received by the central.[/quote]
&lt;p&gt;Could be a problem in your peripherial code.&lt;/p&gt;
&lt;p&gt;After about 6 notification you will get the BLE_ERROR_NO_TX_PACKETS, and IIRC this condition gets cleared only when the app processed the following BLE_EVT_TX_COMPLETE. &lt;/p&gt;
&lt;p&gt;A tight loop just calling sd_ble_gatts_hvx() repeatedly can simply hang when other BTLE events cannot be processed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/155223?ContentTypeID=1</link><pubDate>Tue, 30 Oct 2018 20:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d24f4697-07c9-475a-9fb1-2a433118a9f2</guid><dc:creator>Acutetech</dc:creator><description>&lt;p&gt;Hi Aleksander&lt;/p&gt;
&lt;p&gt;I would like to press you further on this. While my code has changed (on both Peripheral and Central) since my earlier post, I am still seeing unexpected results - somewhat different from above but possibly with the same root cause. The top-level question is, can Nordic&amp;#39;s Android library cope with a rapid succession of Notifications?&lt;/p&gt;
&lt;p&gt;Today I see correct operation with two tablets (Asus and Acer, Android 7, with no delay added between Notifications at the Peripheral end). But with a Samsung phone (Android 8), when I attempt to transfer 5 notifications in quick succession:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- With no added delay between Notifications, the phone receives 5 notifications, but the payload of earlier Notifications have been lost and are replaced by the payload of later Notifications.&amp;nbsp; Example: each payload includes a sequence number. The BLE peripheral sends sequence numbers 300, 301, 302, 303, 304 but the app on the phone receives 302, 302, 302, 304, 304. The messages in nRF Logger show the same payload data. It looks as though the events are happening too quickly and some variables are being over-written before their contents are picked up by my own application code (and nRF Logger).&lt;/p&gt;
&lt;p&gt;- I have to add a delay of 50ms between Notification transmissions (on the BLE Peripheral)&amp;nbsp; before I can get reliable operation.&lt;/p&gt;
&lt;p&gt;I have looked at your source code. Can you tell me if I get this right:&lt;/p&gt;
&lt;p&gt;- The operating system gets a Notification and calls onCharacteristicChanged() in your MainThreadBluetoothGattCallback().&lt;/p&gt;
&lt;p&gt;- You grab the payload and call onCharacteristicChangedSafe() in BleManager.&lt;/p&gt;
&lt;p&gt;- That prints the messages I can see on nRF Logger, and then (somehow) passes the data back to the onDataReceived() callback in my app - which is where I pick up the payload and process it. But it looks like by the time I get the callback, earlier data has been overwritten by later data.&lt;/p&gt;
&lt;p&gt;Is there an inherent throughput problem with your library? Or something I need to do at my end so I can process an arbitrarily long sequence of Notifications?&lt;/p&gt;
&lt;p&gt;My build.gradle has this:&lt;/p&gt;
&lt;pre style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Courier New&amp;#39;;font-size:9.0pt;"&gt;implementation &lt;span style="color:#008000;font-weight:bold;"&gt;&amp;#39;no.nordicsemi.android:ble-common:2.0-alpha6&amp;#39;&lt;/span&gt;&lt;span style="color:#808080;font-style:italic;"&gt;&lt;br /&gt;&lt;/span&gt;implementation &lt;span style="color:#008000;font-weight:bold;"&gt;&amp;#39;no.nordicsemi.android:log:2.1.1&amp;#39;&lt;br /&gt;&lt;/span&gt;implementation &lt;span style="color:#008000;font-weight:bold;"&gt;&amp;#39;no.nordicsemi.android.support.v18:scanner:1.1.0&amp;#39;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Thx - Charles&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Frequency of Notifications with Android BLE Library</title><link>https://devzone.nordicsemi.com/thread/148989?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 10:05:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54a9a4fa-d0ed-4b3d-aba0-af362d4fdb32</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi again &lt;a href="https://devzone.nordicsemi.com/members/acutetech"&gt;Acutetech&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You should be getting all notifications in the order they were sent. The limit how fast notifications can be sent and received is build into Att protocol, so the sender doesn&amp;#39;t send more then it can, and the received doesn&amp;#39;t confirm more then it can handle.&lt;/p&gt;
&lt;p&gt;Are you using the Ble Library v2 (nRF Toolbox from *develop* branch)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>