<?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>Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/871/transmit-large-data-518222</link><description>Hi! 
 I have a Nordic nrf51822-DK. I&amp;#39;m need send large data to the Android phone (10 mb).
I&amp;#39;m use sample devzone.nordicsemi.com/.../dealing-large-data-packet-s-through-ble , but speed very low (one minute passed 10 kb). 
 BLE can transmit at speeds</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Apr 2018 15:10:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/871/transmit-large-data-518222" /><item><title>RE: Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/thread/128112?ContentTypeID=1</link><pubDate>Thu, 12 Apr 2018 15:10:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd394a00-4a6b-42f5-b1f2-627a221fa9d1</guid><dc:creator>Muhammad Akram Karimi</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;I need to send large amount of data from server to client in minimum possible time.&lt;/p&gt;
&lt;p&gt;Can you please tell me how can I send exact 6 packets (6 calls to sd_ble_gatts_hvx) per connection interval?&lt;/p&gt;
&lt;p&gt;Is it something you just mentioned as an example?&lt;/p&gt;
&lt;p&gt;I have gone through &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/553/dealing-large-data-packet-s-through-ble"&gt;Ole Code Snippet&lt;/a&gt; but have some questions:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- what is &lt;code&gt;m_rr_interval_enabled and its use?&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;- When is &lt;code&gt;BLE_EVT_TX_COMPLETE event raised?&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s say, I have an array of 1024 bytes which I want to send into 64 chunks of 16 bytes (assume characteristic has length of 16 bytes).&lt;/p&gt;
&lt;p&gt;Should I just call sd_ble_gatts_hvx 64 times?&lt;/p&gt;
&lt;p&gt;When is &lt;code&gt;BLE_EVT_TX_COMPLETE&lt;/code&gt; event raised in that case?&lt;/p&gt;
&lt;p&gt;Thanks&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/thread/4270?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2013 15:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a9b29cd-7da7-4707-a40a-b5fc9fe3100a</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;A sd_ble_gatts_hvx() call, which is what ble_hrs_heart_rate_measurement_send() does, will transmit up to the characteristic size. To make it transfer 20 bytes, you should therefore make sure that the characterstic is defined to be 20 bytes when initializing it. To better understand how to create a custom service and characteristics, I&amp;#39;d recommend you to take a look on nAN-36: &lt;a target="_blank" href="https://www.nordicsemi.com/eng/content/download/34055/573345/file/nAN-36.zip" rel="nofollow"&gt;https://www.nordicsemi.com/eng/content/download/34055/573345/file/nAN-36.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/thread/4266?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2013 06:30:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a428da5-ee74-4dee-ba77-16d5359c978d</guid><dc:creator>Sergey</dc:creator><description>&lt;p&gt;I understand. An array of bytes to be transferred&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/thread/4269?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 14:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84e14feb-51c2-4ef4-8491-38261df4faa5</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;Hello
we have a similar problem have you any success in sending 20 bytes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/thread/4271?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 14:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47f4fc60-d601-49fd-ba86-3f5c8a547ef2</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;Hello
we have a similar problem have you any success in sending 20 bytes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/thread/4268?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2013 16:41:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6992fb91-6e30-4f3d-84ff-6d445ac1eb3c</guid><dc:creator>Sergey</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;This is code Ole Morten.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
static void heart_rate_meas_send(void)
{
    static uint32_t cnt = 0;
    uint32_t        err_code;
    uint16_t        heart_rate;
    
    while (true)
    {
        heart_rate = (uint16_t)ble_sensorsim_measure(&amp;amp;m_heart_rate_sim_state, &amp;amp;m_heart_rate_sim_cfg);

        cnt++;
        err_code = ble_hrs_heart_rate_measurement_send(&amp;amp;m_hrs, heart_rate);
        if (err_code == BLE_ERROR_NO_TX_BUFFERS ||
            err_code == NRF_ERROR_INVALID_STATE || 
            err_code == BLE_ERROR_GATTS_SYS_ATTR_MISSING)
        {
            break;
        }
        else if (err_code != NRF_SUCCESS) 
        {
            APP_ERROR_HANDLER(err_code);
        }
    
        // Disable RR Interval recording every third heart rate measurement.
        // NOTE: An application will normally not do this. It is done here just for testing generation
        //       of messages without RR Interval measurements.
        m_rr_interval_enabled = ((cnt % 3) != 0);
    }
}

&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
err_code = ble_hrs_heart_rate_measurement_send(&amp;amp;m_hrs, heart_rate);

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is transmitted one byte. How to transfer all 20? In the parameters of the function - uint8&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit Large Data 518222</title><link>https://devzone.nordicsemi.com/thread/4267?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2013 14:30:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fce17be3-63a5-4dff-9c55-404353ab6057</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Sergey,&lt;/p&gt;
&lt;p&gt;The on-air data rate for BLE is 1 MBit.
However, there is overhead maintaining the protocol and processing.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Connection interval set to 7.5 ms&lt;/li&gt;
&lt;li&gt;6 packets (6 x 20 bytes) sent each connection interval&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the above restrictions are accepted (your phone may not be able to receive that many packets pr interval), then your theoretical maximum transfer rate is:
1000/7.5 * 20*6 = 16kByte per second. (128 kBit)&lt;/p&gt;
&lt;p&gt;Note that this number is the theoretical maximum, and will be lower due to re-transmissions and may be restricted by your central (phone). The peripheral asks, but the central is the one that decides what parameters will be set.&lt;/p&gt;
&lt;p&gt;For speeding up the link, lower your connection interval (defines MIN_CONN_INTERVAL and MAX_CONN_INTERVAL) to minimum 7.5 ms, and use the algorithm Ole Morten posted here:
&lt;a href="https://devzone.nordicsemi.com/index.php/discussions/dealing-large-data-packet-s-through-ble#reply-1755"&gt;devzone.nordicsemi.com/.../dealing-large-data-packet-s-through-ble&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>