<?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>Sending large amount of data through BLE in minimum possible time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33342/sending-large-amount-of-data-through-ble-in-minimum-possible-time</link><description>Hi, 
 I have seen some posts from 
 Ole 
 and 
 Hakon 
 about the bulk data transfer. But I have some confusions which I want to clarify before implementation. 
 
 I need to actually send large amount of data from server to client in minimum possible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Apr 2018 14:19:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33342/sending-large-amount-of-data-through-ble-in-minimum-possible-time" /><item><title>RE: Sending large amount of data through BLE in minimum possible time</title><link>https://devzone.nordicsemi.com/thread/128273?ContentTypeID=1</link><pubDate>Fri, 13 Apr 2018 14:19:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84934536-86e7-4a67-ae6d-98644ca2b314</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;could you specify where you found m_rr_interval_enabled?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding the queuing of packets. Yes. You can queue up packets, but not 64 of them. typically around 6. What you need to do is to queue while it returns NRF_SUCCESS. E.g.:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t err_code = NRF_SUCCESS;
while (err_code == NRF_SUCCESS)
{
    sd_ble_gatts_hvx(parameters);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Once it returns NRF_ERROR_RESOURCES (may be called something else. That depends on what SDK you are using), it means that the buffer is full, and you have to wait for the event BLE_EVT_TX_COMPLETE to queue more packets. You can queue them inside this event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should know that it is also possible to increase the packet size, which will decrease the time required to send the array. Larger packets means less headers/payload ratio. You should check out &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_att_mtu.html"&gt;this example from the SDK&lt;/a&gt;. Play around with the parameters to see how they affect the transfer speed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>