<?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 to increase Data Rate</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22061/how-to-increase-data-rate</link><description>Hi 
 We use ble_app_uart_pca10040 app.
We have our own board has microcontroller and send data over uart to ble module (bmd350)
There is Nrf52832.
I want to send 32byte pack and 500pack in sec.
Im very far to achive that. 
 Ferhat</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Jun 2017 13:35:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22061/how-to-increase-data-rate" /><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86611?ContentTypeID=1</link><pubDate>Fri, 09 Jun 2017 13:35:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c84128d6-00e1-4653-b771-130c6a0b868f</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Actually the ble_app_uart in SDK 13 will by default try to enable DLE, and set it to &lt;code&gt;NRF_BLE_GATT_MAX_MTU_SIZE + LL_HEADER_LEN&lt;/code&gt;. But you need to check the log to see if it was successfully increased (i.e. if the iPad accepted the increase or not.). As mentioned earlier, if you set the NRF_LOG_DEFAULT_LEVEL to DEBUG (#define NRF_LOG_DEFAULT_LEVEL 4 in sdk_config.h), you should be able to see the parameters that is negotiated between the central and peripheral.&lt;/p&gt;
&lt;p&gt;If DLE is &lt;strong&gt;not&lt;/strong&gt; support on the iPad, you will see the following values in the log:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_ble_gatt:DEBUG:max_rx_octets: 27
nrf_ble_gatt:DEBUG:max_tx_octets: 27
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unfortunately, I believe that many iOS devices does &lt;strong&gt;not&lt;/strong&gt; support DLE, so this will limit your data-rate / throughput you can achieve. But you will have to check what values the &lt;code&gt;max_rx_octets/max_tx_octets&lt;/code&gt; is set to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86614?ContentTypeID=1</link><pubDate>Wed, 07 Jun 2017 07:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91630cc4-fe72-4fc2-8e0f-6b8613d85bce</guid><dc:creator>Ferhat B</dc:creator><description>&lt;h2&gt;First of all I couldnt find where to make DLE on.&lt;/h2&gt;
&lt;p&gt;Im sending 126 bytes in one pack now. It not working over 158. I tried 147 bytes working fine.&lt;/p&gt;
&lt;p&gt;For now with 126bytes in one pack;&lt;br /&gt;
---&amp;gt; #define NRF_BLE_GATT_MAX_MTU_SIZE 158&lt;br /&gt;
---&amp;gt; 1nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, 150);&lt;br /&gt;
---&amp;gt; #define BLE_GATT_ATT_MTU_DEFAULT          23&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;I tried several values for INTERVALS for definitions below,
For example i tested 7.5 as min and 20 as max.
I didnnt get a positive effect.&lt;/p&gt;
&lt;p&gt;#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)&lt;br /&gt;
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(75, UNIT_1_25_MS)&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;My problem is;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Im sampling 16byte data at 500Hz. (I have some additional data but these important)&lt;/li&gt;
&lt;li&gt;500Hz makes 2ms interval for sampling. (1/500)&lt;/li&gt;
&lt;li&gt;Below 158 ATT MTU size, i can make 8 pack x 16 bytes = 128bytes&lt;/li&gt;
&lt;li&gt;So sending interval became 8x2ms = 16ms&lt;/li&gt;
&lt;li&gt;If i can send every 128bytes evey 16ms, all became perfect.&lt;/li&gt;
&lt;li&gt;Im using iPad Air2 now but later i will use different options.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86613?ContentTypeID=1</link><pubDate>Tue, 06 Jun 2017 13:22:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36c0451a-3598-4398-9eb2-e73403044d96</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Have you turned on DLE(Data length extension) ? What ATT MTU value are you using ? What connection interval value are you getting from the iPad?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86612?ContentTypeID=1</link><pubDate>Tue, 06 Jun 2017 06:47:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a3584f3-7c58-489b-a2bd-997c52ffa2e6</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;Hi Sigurd, do you have any comment ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86610?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 13:52:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c33106-019e-4c39-b771-4e7b99a7212c</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;Hi Sigurd&lt;/p&gt;
&lt;p&gt;I have 20bytes pack and i collect them 120bytes (6*20) and send totaly.&lt;br /&gt;
This works fine every 24ms interval.&lt;br /&gt;
Bu i need to send 12ms interval evey 120byte pack and its not working vell.
Im using ipad air2 for monitring.
Its missing packets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86600?ContentTypeID=1</link><pubDate>Fri, 19 May 2017 08:31:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7626ff6e-f84c-47a2-8b7d-a1e5e1bbac05</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, smartphones/tablet typically supports between 4-6 packets per connection interval. If the smartphone/tablet supports ATT MTU 158 bytes, then you can set m_ble_nus_max_data_len to 158. This is done automatically for you in the function &lt;code&gt;gatt_evt_handler()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;“In soft device document is see for client Att MTU 23 and 7.5ms”. It can be set to up-to 247. See table 2 &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/ble_data_throughput/ble_data_throughput.html?cp=2_3_0_0_16"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Q: I want to transfer 120bytes one time, is it possible?&lt;/p&gt;
&lt;p&gt;A: Yes, this is possible as long as the smartphone/tablet also support it.&lt;/p&gt;
&lt;p&gt;Also see this &lt;a href="https://devzone.nordicsemi.com/question/137241/ble_app_uart_pca10040-with-high-data-rate/?answer=138465#post-id-138465"&gt;answer&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86601?ContentTypeID=1</link><pubDate>Wed, 17 May 2017 08:52:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0ef490c-553c-4161-9219-7f3853e5f6df</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;I want to transfer 120bytes one time, is it possible. How can i do it, i coulndt achieve.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86609?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 13:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:033db909-1572-407a-adcf-e806eb098e3c</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;Does the soft device send 6 pack together.&lt;br /&gt;
How much time ble sending (sd_ble_gatts_hvx) stops uart hanling.&lt;br /&gt;
I think the problem is uart waiting while ble sending.&lt;/p&gt;
&lt;p&gt;About ATT MTU what is the maximum value,  how much i can make &amp;quot;m_ble_nus_max_data_len&amp;quot;
May i send 158bytes in one pack. In soft device document is see for client Att MTU 23 and 7.5ms&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86608?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 11:52:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d74acfee-f32c-41eb-9621-4dda349445a4</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, the BLE_GATT_ATT_MTU_DEFAULT is 23, but if you use the ble_app_uart example in sdk 13, you have the &lt;code&gt;m_ble_nus_max_data_len&lt;/code&gt; that is updated after ATT MTU exchange with the central. In the function gatt_init() in main.c we are trying to increase the ATT MTU to 64.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86607?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 11:50:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e195cdfe-47ff-4ee7-85fd-9214d4cc999d</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;Do you mean 64 in below as ATT MTU&lt;br /&gt;
err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, 64);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86606?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 11:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b03a9995-8d47-4656-9b37-5e6a8ad59e78</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;Yes use SDK 13&lt;br /&gt;
BLE_GATT_ATT_MTU_DEFAULT 23&lt;br /&gt;
ble_hrs_heart_rate_measurement_send &amp;gt;&amp;gt; 20 bytes as pack length&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86605?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 11:40:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c05d2bf-8d1d-422c-a328-52e86c3752df</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Are you using SDK 13? What ATT MTU size, and if you can enable DLE depends on what iPad version and what iOS version your iPad has.&lt;/p&gt;
&lt;p&gt;If you enable DEBUG logging (#define &lt;code&gt;NRF_LOG_DEFAULT_LEVEL&lt;/code&gt; 4 in &lt;code&gt;sdk_config.h&lt;/code&gt;), you should be able to see the parameters that is negotiated between the central and peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86604?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 11:11:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa404bbd-4775-4641-af00-9ab7516e4bdc</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;Is it acceptable to send 158 byte in pheripheral usage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86603?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 11:06:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cada042-7d37-4c9b-a216-f10f28b6594d</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;I tried to fill 15 packet  in other mcu. (every pack has 20 bytes)
Thans send one by one every pack, squentaly. (Means 15 times  20 byte sequental)
Result better.&lt;/p&gt;
&lt;p&gt;But i read Soft Device send 6 packs one time, so i understand problem is not ble waiting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86602?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 11:01:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d1d38aa-2d30-441a-9aad-906e9f5c3eb6</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;Does uart interrupt works while sending pack.
I read Soft Device dedicated to 20 bytes pack, Can i increase it.&lt;/p&gt;
&lt;p&gt;I tried MSEC_TO_UNITS(7.5, UNIT_1_25_MS)  but didnt make sense.
Its an ECG Graph and for this step we use ipad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86599?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 10:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de640b29-b11a-4543-9a12-378b3245d37d</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is it the BLE data rate you want to increase? What are you connecting against? A smartphone?&lt;/p&gt;
&lt;p&gt;You can lower the connection interval by changing the &lt;code&gt;MIN_CONN_INTERVAL&lt;/code&gt; and &lt;code&gt;MAX_CONN_INTERVAL&lt;/code&gt; values. Try setting it to e.g :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(7.5, UNIT_1_25_MS) 
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS) 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There are also several other things you can do to increase the data rate. Such as increasing the ATT MTU size, enable Data length extension (DLE) and enable Connection event length extension.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase Data Rate</title><link>https://devzone.nordicsemi.com/thread/86598?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 05:45:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02810e1e-5dd4-46a8-b6d0-51cb79bfee21</guid><dc:creator>Ferhat B</dc:creator><description>&lt;p&gt;I made pack length to 20bytes,
Can we make uart active while ble send pack.
How we make ble send time to 7.5ms&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>