<?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 do i get whole 31 byte BLE notification data at once?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14601/how-do-i-get-whole-31-byte-ble-notification-data-at-once</link><description>In BLE notification i am getting 31 byte data but it comes in two packets 20 byte + 11 bytes continually.How do i get last 11 byte data which comes in 2nd packets after 2s time interval so that i can able to merge these two packet and make a array of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Jun 2016 11:38:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14601/how-do-i-get-whole-31-byte-ble-notification-data-at-once" /><item><title>RE: How do i get whole 31 byte BLE notification data at once?</title><link>https://devzone.nordicsemi.com/thread/55731?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 11:38:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8db1e376-afea-421f-bdd9-d8080f2cbbdb</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;As defined in the Bluetooth core specification v.4.2, vol 3, part F, chapter 3.4.7.1, the maximum amount of data per notification is 20 bytes.&lt;/p&gt;
&lt;p&gt;Since the 2nd packet is transmitted 2 seconds later, I assume that your connection interval is 2 seconds. The S130/S132 v.2.0.1 supports up to six packets per connection interval, so it is possible to achieve much faster transfer than what you experience:  When calling &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v2.0.0%2Fgroup___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_3_0_1_0_2_4_2_3&amp;amp;anchor=ga313fe43c2e93267da668572e885945db"&gt;sd_ble_gatts_hvx(..)&lt;/a&gt; it will return NRF_SUCCESS or an error code. If it returned NRF_SUCCESS, the data will be  put in a TX buffer and the application will receive the event BLE_EVT_TX_COMPLETE when the notification has been transmitted. There may not be one BLE_EVT_TX_COMPLETE event for each packet, but when a BLE_EVT_TX_COMPLETE event occurs, but the event contains the number of packets that was transmitted, see &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v2.0.0%2Fgroup___b_l_e___c_o_m_m_o_n___a_p_p___b_u_f_f___m_s_c.html&amp;amp;cp=2_3_0_1_0_2_0_4_0"&gt;this&lt;/a&gt; message sequence chart.&lt;/p&gt;
&lt;p&gt;For a fast transfer of data, you can therefore loop over sd_ble_gatts_hvx() as long as it doesn&amp;#39;t return any error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>