<?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 lots of data from peripheral to central, queued writes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29564/sending-lots-of-data-from-peripheral-to-central-queued-writes</link><description>Hi. I have a peripheral application that spends a lot of time doing stuff, but not in a BLE connection. In order to debug it, I have it use nrf_log with a backend that just keeps the log in RAM. On a BLE connection, I want to read back that whole log</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jan 2018 14:07:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29564/sending-lots-of-data-from-peripheral-to-central-queued-writes" /><item><title>RE: sending lots of data from peripheral to central, queued writes</title><link>https://devzone.nordicsemi.com/thread/117521?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2018 14:07:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e64d1f40-b150-495d-9261-9cec0bb96a88</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Thanks very much, I&amp;#39;ll give this a go. It&amp;#39;s roughly what I had before, but the throughput example is a great help. Still confused as to what problem the queued writes module really solves, but no matter. Accepting this for now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sending lots of data from peripheral to central, queued writes</title><link>https://devzone.nordicsemi.com/thread/117520?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2018 11:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:391efbc0-fe83-4a2c-808e-075f8c74f62f</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Why not use a sequence of notifications? That is usually how it is done when all you want is to quickly transfer a lot of data without application layer acknowledgment from the peer device. So:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make a state machine that repeatedly calls &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v5.0.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html?cp=2_3_1_1_0_2_4_2_4#ga313fe43c2e93267da668572e885945db"&gt;sd_ble_gatts_hvx()&lt;/a&gt; with your log data until the function returns NRF_ERROR_RESOURCES indicating that the notification queue is full.&lt;/li&gt;
&lt;li&gt;Wait for BLE_GATTS_EVT_HVN_TX_COMPLETE events and then continue with sd_ble_gatts_hvx().&lt;/li&gt;
&lt;li&gt;All the while you keep incrementing the offset within the attribute value to send new chunks of data until you have sent your entire log.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is the way data is transferred in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/ble_sdk_app_att_mtu.html?cp=4_0_0_4_2_1_0"&gt;throughput example&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>