<?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>How can i increase throughput</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29037/how-can-i-increase-throughput</link><description>Hi all ! 
 I&amp;#39;m trying to evaluate the throughput i can have between a Motorola 4G and the nrf51. The nRF51 is the peripheral and the phone is acting as a central. 
 To do that, i&amp;#39;ve based my work on the nRFToolbox android source code and modified the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Jul 2016 13:11:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29037/how-can-i-increase-throughput" /><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114987?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2016 13:11:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aae3a91a-85ed-4eef-8c25-c7db2d66b321</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@T_chapelle: You may want to have a look at this thread &lt;a href="https://devzone.nordicsemi.com/question/87134/how-to-send-long-data-to-ble_app-uart-from-android/"&gt;https://devzone.nordicsemi.com/question/87134/how-to-send-long-data-to-ble_app-uart-from-android/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I suspect that you are not sending the packet from the phone side, fast enough.
You can try to capture a sniffer trace when the phone doing DFU. The DFU app would not have the max through put but I would expect it will send more than 1 packet per connection event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114986?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 12:21:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3b95208-2181-4447-8d90-e3bf903ef576</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;Exactly ! I also tried with a Samsung and a nexus with the same results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114988?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 09:49:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b2d45f2-e5e3-45c9-8cbb-c8b0186540aa</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi.   So the problem is the motorola only sends maximum one packet per connection event?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114985?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2016 14:06:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:230dbe61-171c-41b2-8a81-95b9159cf5e7</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;hi. Thanks for the hints, i didn&amp;#39;t checked about the bandwidth, i&amp;#39;m gonna try that. I bought a sniffer from nordic to see what was going on and it appears that on pca10028 =&amp;gt; Motorola 4G, the throughput is correct, 4 packet are sent and i can see on the sniffer that it&amp;#39;s on the same connection interval. But in the Motorola 4G =&amp;gt; pca10028, it still not good. Main difference : pca10028 =&amp;gt; Motorola 4G send notifications, Motorola 4G =&amp;gt; pca10028 send write command (without response/Ack).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114983?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2016 13:51:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2964c40-2279-4ea8-92ba-48fd0ccacf76</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;As i said, i tried it with default binaries and with two phones (ble_app_uart_s130_pca10028.hex and nrf51 toolbox from playstore)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114984?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2016 09:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9159ffce-85eb-4ef7-9c3d-d462025675bf</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Ill try to give some pointers, I think you already know most of them, but perhaps it gives something that you have not checked already.&lt;/p&gt;
&lt;p&gt;Check the actual connection interval received by the phone (the central), see &lt;a href="https://devzone.nordicsemi.com/question/2898/knowing-the-connection-interval/"&gt;this thread&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/23190/whats-the-actual-connection-interval-used/?answer=23294#post-id-23294"&gt;this thread&lt;/a&gt;. Info on how the connection parameter update procedure works is on &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;What bandwidth setting do you have in the softdevice? Check the S130 v2 migration document, section about &amp;quot;configurable bandwidth&amp;quot;, see also &lt;a href="https://devzone.nordicsemi.com/question/85999/nrf_error_no_mem-in-nus-using-fifo/"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Android phones have &lt;a href="https://devzone.nordicsemi.com/question/3440/how-do-i-calculate-throughput-for-a-ble-link/#reply-3441"&gt;different throughput capabilities&lt;/a&gt;. This depends on how many packets per connection interval they support as well as what minimum connection interval they support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114982?ContentTypeID=1</link><pubDate>Tue, 05 Jul 2016 08:10:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27077476-6f36-471e-9d31-c6860bf823c1</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;can you post your code or some part of it? So I can test it here with my phone? Because with the example I can get more than one pack, maybe you changed something that doesn&amp;#39;t allow it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114980?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2016 10:01:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4463ce4-04f9-4b2a-bf5d-4e5585f40587</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;Phone mainly used for the test is a Motorola Moto G LTE from 2014 (XT1039) with Android 5.1 and support bluetooth v4.0. And just tried with a galaxy s6 edge / android 6 with the same result.
Any advice ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114981?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2016 09:05:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5e32a95-072d-44a1-9898-b19cd677e79b</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;How old is Your phone, and which Android version are you on? Several phones from a certain generation only support 1 packet/interval. One example is the Google nexus 4&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114979?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 15:00:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:856e0874-19d7-4e87-969e-3769b18a5e46</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;But  can i really chain multiple WRITE COMMAND on the same characteristic (of 20 bytes) in the same connexion interval ?
Maybe the problem is here as i should only be allowed to send packet to different characteristic UUID per interval?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114978?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 13:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cac36e67-6016-4842-914e-db61ab46530c</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;Saddly , i don&amp;#39;t have a Sniffer :-(
I don&amp;#39;t use WRITE REQUEST on my code, the log i showed you was with the default binaries provided by Nordic. In the code i modified, i can see the WRITE COMMAND on the log, due to the function setWriteType(WRITE_TYPE_NO_RESPONSE) in android.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114977?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 12:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55210198-4c6e-4a15-853c-7b3f9790f43c</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;I see from your new comment that you are sending WRITE REQUEST from the Android. This requires the peripheral to respond to the request (in application) before the next packet is sent. This will lead to 1 packet/interval. Use Write commands (or whatever it is called in Android) instead. That is, writes which are not requests.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114976?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 12:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70aa262e-d7cd-4b32-9043-783167203db6</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Do you have another nRF51 device you can set up as a &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy2/nRF-Sniffer"&gt;nRF Sniffer?&lt;/a&gt;. If you set set connection interval to something high like 2 seconds, you can easily see how many packets are sent each connection interval. I have achieved at least 4 packets/interval with the nRF uart app doing this. (It might have been 6 packets, i dont remember)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114975?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 09:49:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3826d7d-4578-42f3-81a4-ca1615c36187</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I&amp;#39;ll try to see if I changed something from the uart example, because It was a long time ago that I started to use it, and i changed a lot of things for my project. If I discover something I&amp;#39;ll update this.&lt;/p&gt;
&lt;p&gt;I was moving through my code and the code from the example of peripheral UART and I think I didn&amp;#39;t change any size. The &lt;code&gt;#define BLE_NUS_MAX_DATA_LEN (GATT_MTU_SIZE_DEFAULT - 3)&lt;/code&gt; which = 20. Maybe the problem is that your phone just allow one connection.
Sorry for not being able to help you with this. Maybe someone else will have a better answer for this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114974?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 09:42:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ca24fee-cd7b-49d0-9496-4478b7d9c057</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;Strange... because doing the same, i have the following log for 20 characters :&lt;/p&gt;
&lt;p&gt;V	11:38:31.544	Writing characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e (WRITE REQUEST)
D	11:38:31.553	gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e)
I	11:38:31.703	Data written to 6e400002-b5a3-f393-e0a9-e50e24dcca9e, value: (0x) 61-62-63-64-65-66-67-68-69-6A-6B-6C-6D-6E-6F-70-71-72-73-74
A	11:38:31.710	&amp;quot;abcdefghijklmnopqrst&amp;quot; sent&lt;/p&gt;
&lt;p&gt;And this for 21 bytes :&lt;/p&gt;
&lt;p&gt;V	11:38:37.281	Writing characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e (WRITE REQUEST)
D	11:38:37.299	gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e)
E	11:39:07.323	Error (0x85): GATT ERROR
V	11:39:07.584	Disconnecting...
D	11:39:07.592	gatt.disconnect()
D	11:39:07.689	[Callback] Connection state changed with status: 22 and new state: 0 (DISCONNECTED)
D	11:39:07.694	Activity disconnected from the service
W	11:39:07.698	Error: (0x16): GATT CONN TERMINATE LOCAL HOST&lt;/p&gt;
&lt;p&gt;Also i should precise that i tried it with default binaries and with two phones! (ble_app_uart_s130_pca10028.hex and toolbox from playstore)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114973?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 09:25:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:617aeaea-c75a-4bb2-a8fb-54bf96ec435f</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I tried mine now, On the UART app from the nRFToolbox i edited one command to right more than 20 chars, like 30, and I received 2 packets on the nRF side.&lt;/p&gt;
&lt;p&gt;The first packet with the first 20 bytes of the message and the second with the other 10 bytes. I&amp;#39;m using an Iphone, but the app should be working the same using an android.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114972?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 09:19:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3aea9230-08e0-4219-ab24-4cdcff89b2a9</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;The basic nRFToolbox does&amp;#39;nt allow message over 20 bytes throught uart.&lt;/p&gt;
&lt;p&gt;On the nrf51, the RX characteristic is define to have a 20 bytes length &amp;quot;attr_char_value.max_len   = BLE_NUS_MAX_RX_CHAR_LEN;&amp;quot;&lt;/p&gt;
&lt;p&gt;So on the Android side, &amp;quot;mRXCharacteristic.setValue(data);&amp;quot; cannot really be filled with a 80 bytes array...or does it ?&lt;/p&gt;
&lt;p&gt;Changing the length to 80 bytes on both sides doesn&amp;#39;t seems to do anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114971?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 08:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e149a5cc-b2a0-41ec-bb43-b32f84568713</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I don&amp;#39;t know if this is what you already doing (sorry if it is), You can try to use the UART app on the nRFToolbox and send a message with more than 20 bytes. From what I searched your phone should be able to send/receive 4 packets per connection interval. So if you send something with 80 bytes it should be sent on the same connection interval. Can you achieve this?&lt;/p&gt;
&lt;p&gt;PS&amp;#39; a tip to you is when you edit some question or comment, if it&amp;#39;s not a major edit you should check the box below the &amp;quot;save comment&amp;quot; which says &amp;quot;minor edit&amp;quot; that way we receive less emails ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114970?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 08:05:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f041d4cf-126a-4cc5-9347-9e4d345c670f</guid><dc:creator>T_chapelle</dc:creator><description>&lt;p&gt;I already use the SD130v2 with SDK11.
I&amp;#39;ve tried the experiment with several phones (Motorola, nexus, samsung) but the change of rates was always linked with the connection interval. It just seems that there is only one 20 bytes packet send from the phone per connection interval and no queue.
So my guess is i&amp;#39;m doing something wrong in the Android side but i can&amp;#39;t find an example on how to send multiple packet/make them queue.&lt;/p&gt;
&lt;p&gt;Thanks for the quick answer !&lt;/p&gt;
&lt;p&gt;PS&amp;#39; that the first question i&amp;#39;ve ever asked here :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i increase throughput</title><link>https://devzone.nordicsemi.com/thread/114969?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 07:49:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee9db7a7-31fb-4554-8163-fcd38abd24ab</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;your phone should have some specifications for the BLE, and maybe they can&amp;#39;t be lowered to increase your throughput. You should search for the specification and see what can you change. Other thing is the SD you are using on the nrf51, you should use SD130 v2, because it enable more packets per connection.&lt;/p&gt;
&lt;p&gt;PS&amp;#39; and close or delete the other question, because it&amp;#39;s a duplicate&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>