<?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>Can not get high enough throughput using BLE NUS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37415/can-not-get-high-enough-throughput-using-ble-nus</link><description>I am in the process of trying to send live data from a nrf52 board over bluetooth to another nrf52 board using the example projects ble_app_uart_c and ble_app_uart. We are using SDK 14.2 with the S132 softdevice on windows 10. 
 16 bytes of data are generated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Aug 2018 12:23:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37415/can-not-get-high-enough-throughput-using-ble-nus" /><item><title>RE: Can not get high enough throughput using BLE NUS</title><link>https://devzone.nordicsemi.com/thread/144531?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 12:23:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b7a6f9d-37d3-40bf-89da-8b5f6e57f6f8</guid><dc:creator>Gert</dc:creator><description>&lt;p&gt;I tried witha a small interval and I managed to get it working&amp;nbsp;to send 20 bytes each 5 ms.&lt;/p&gt;
&lt;p&gt;With a connection interval of 10 a gap event length of 5 and mtu of 29&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can not get high enough throughput using BLE NUS</title><link>https://devzone.nordicsemi.com/thread/144224?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 15:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98d8accd-69e8-450a-899f-7bc64057cb7f</guid><dc:creator>Gert</dc:creator><description>&lt;p&gt;I was buffering the data already, I sent 160 bytes every 50 ms. My expectation was that 50 ms should be enough to send the 160 bytes. If I would wait for the&amp;nbsp;&lt;span&gt;NRF_ERROR_RESOURCES my buffer wil grow and I can not send data for an hour long or more. &lt;/span&gt;&lt;span&gt;I need a live data stream.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I experimented with&amp;nbsp;NRF_SDH_BLE_GAP_EVENT_LENGTH&amp;nbsp; but I have not found a value that gives a higher throughput, with large values I get more errors.&amp;nbsp;What are values&amp;nbsp; that you would suggest?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;is 160 bytes per 50ms too much? should I send less bytes with a shorter interval?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can not get high enough throughput using BLE NUS</title><link>https://devzone.nordicsemi.com/thread/144223?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 15:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4312d5e7-177a-4ae1-89da-3a8cd371498b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Gert&lt;/p&gt;
&lt;p&gt;Getting the NRF_ERROR_RESOURCES error is normal when you try to maximize throughput,&amp;nbsp;and the way to handle it is basically to upload packets until the error occurs (or you run out of packets), and then wait for the&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE event to occur before you try to upload any more packets. Then you just repeat the procedure.&lt;/p&gt;
&lt;p&gt;In order to maximize the throughput it&amp;#39;s also a good idea to buffer multiple samples into fewer, large packets rather than sending 16 bytes at a time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Finally, what is your&amp;nbsp;NRF_SDH_BLE_GAP_EVENT_LENGTH set to in sdk_config.h ?&lt;br /&gt;This parameter will decide how many packets can be sent on each connection event, and if you increase it you&amp;nbsp;should see a higher throughput in general.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>