<?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 Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20161/android-android-nrf-uart-app-connection-interval-bandwidth-configuration</link><description>Hi, 
 I hope is not a double post. I am doing a throughput evaluation with my custom board and an app that is based on the Nordic&amp;#39;s Android UART app through NUS service and wanted to make sure that this app is capable of handling the requirements for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Mar 2017 23:07:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20161/android-android-nrf-uart-app-connection-interval-bandwidth-configuration" /><item><title>RE: android Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/thread/78531?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2017 23:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30ced14c-bebc-44e2-a7e6-08d1ea784dfa</guid><dc:creator>Vala</dc:creator><description>&lt;p&gt;Thanks Hung for the info. It helped a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: android Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/thread/78532?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2017 15:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:859b7c55-0920-49b2-9746-da5fded16192</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you use write command to send data from peripheral to central, then the server is on the central. The central will send notification as ACK for packet it receives.&lt;/p&gt;
&lt;p&gt;If the central get an overflow, it can not process the data, it can simply send the notification back telling at which packet number it has processed and the peripheral will have to resend packet starting from there. It&amp;#39;s important that the sender have to wait for that packet receipt notification on every X packets.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think a disconnection is neccessary .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: android Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/thread/78530?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2017 12:02:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf91de27-7f0a-4fb1-8726-e66a892f1f03</guid><dc:creator>Vala</dc:creator><description>&lt;p&gt;That was very useful information Hung, thanks.
And yes I meant the bandwidth as &amp;quot;low&amp;quot;, &amp;quot;mid&amp;quot; and &amp;quot;high&amp;quot;.
A question about this packet notification. Actually my scenario is the other way around. The peripheral sends the information and Central receives (so I guess the peripheral is the server and central a client). What benefit this notification can bring to my system? I mean can there be any situation in which the Central is not ready to receive any more but the connection is still alive? If no, then I can detect this situation by only detection the disconnection and not compromising the packet rate with a wait-for-notification from central to peripheral. Although, I know that in all the protocols some kind of application layer&amp;#39;s hand shaking brings reliability to the system. But here, I guess, the cost is lowering the packet rate. Am I right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: android Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/thread/78529?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2017 13:53:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:580407fd-d12f-4549-b5be-57c2a9a3437f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Vala,&lt;/p&gt;
&lt;p&gt;Correct, requestConnectionPriority() is used to update connection parameters, connection interval in particular.&lt;/p&gt;
&lt;p&gt;You can force the peripheral to send connection parameter request at the start of the connection but accepting that request or not is up to the central. And different phones will behave differently on this.
So requestConnectionPriority() should be called, just to ensure the phone will give more priority for the connection.&lt;/p&gt;
&lt;p&gt;Yes, you should use buffer, and also you should implement a packet notification the same way that we implemented on our DFU OTA protocol. So that the central after sending a number of packets say 20 packets, will stop and wait for a notification from the peripheral telling it&amp;#39;s ready to continue to receive.&lt;/p&gt;
&lt;p&gt;I assume &amp;quot;bandwidth&amp;quot; you mentioned here is related to the &amp;quot;mid&amp;quot; &amp;quot;high&amp;quot; &amp;quot;low&amp;quot; bandwidth we set with the opt API ? If it is then it&amp;#39;s the Nordic&amp;#39;s term only related to configuration in the softdevice.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think there is an equivalent &amp;quot;bandwidth&amp;quot; on Android, except for the &amp;quot;priority&amp;quot; in the requestConnectionPriority(). But I am not 100% sure if the requestConnectionPriority() only to set the connection interval or it also does something with the number of packets per connection event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: android Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/thread/78535?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2017 08:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb935f2a-2393-4a16-9804-026665ea9b26</guid><dc:creator>Vala</dc:creator><description>&lt;p&gt;One question, is bandwidth in this context a SIG defined term? Or it is related to the SoftDevice definitions? I want to know if for example in Android devices (or other non-Nordic devices) there is a therm called bandwidth, which means &amp;quot;the allowed number of packets per connection interval&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: android Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/thread/78534?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2017 08:33:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60f92df8-21d4-4a99-8d64-1daffecebbe7</guid><dc:creator>Vala</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thanks for your answer.
.requestConnectionPriority() is used to update the connection parameters, right? I forced the peripheral to send a connection parameter request at the start of the connection. So the connection is in its upper limits (interval, latency). Will there be any other improvement by .requestConnectionPriority()?&lt;/p&gt;
&lt;p&gt;I was able to send reasonable amount of data with almost no packet loss. I reached 330 packets per second with an Android device (Acer) as the peer. From sniffer, I observed that there are 3 packets transmitted in most of the connection intervals. With higher speeds, I even noticed that there are 4 packets sent per connection interval. I had to use a ring buffer to prevent dropping packets when the next packet comes and the previous is not sent (or put in the TX buffer) yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: android Android-nRF-UART app connection interval/bandwidth configuration</title><link>https://devzone.nordicsemi.com/thread/78533?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 09:41:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36e0953a-58d1-464f-9f03-b05d5b029a1e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Vala,&lt;/p&gt;
&lt;p&gt;On nRF5 side, beside connection interval, bandwidth connection event extension, how quick you send your data is also important to improve bandwidth. You should send as many packet as possible on a single connection event. Usually the approach is to queue until the buffer is full and queue again when there is packet sent (TX_COMPLETE event). It&amp;#39;s better to send a packet with 20 bytes payload than sending several small payload packets.&lt;/p&gt;
&lt;p&gt;On the Android side, you can also try to use .&lt;a href="https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#requestConnectionPriority(int)"&gt;requestConnectionPriority()&lt;/a&gt; to request high priority for the connection. The &amp;quot;number of packets per connection event&amp;quot; is limited by the hardware on the device, what is important is to utilize the maximum the hardware can handle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>