<?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 prevent data loss while sending data over bluetooth</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/743/how-to-prevent-data-loss-while-sending-data-over-bluetooth</link><description>Hi 
 I have created local buffer of 100 bytes. 
 while device is connected to dongle it is sending all 100 bytes over bluetooth stack . 
 but once it is disconnected and then again connnected there is data loss. 
 how can i do whenever device disconnected</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 May 2014 07:33:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/743/how-to-prevent-data-loss-while-sending-data-over-bluetooth" /><item><title>RE: How to prevent data loss while sending data over bluetooth</title><link>https://devzone.nordicsemi.com/thread/3780?ContentTypeID=1</link><pubDate>Mon, 19 May 2014 07:33:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c29ce12c-b63b-4caa-941f-e48e136c213c</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;When NRF_SUCCESS is returned the data is queued for transfer. Depending on the no. packets per event supported on the peer, this might be 1-6 connection intervals into the future. If the peer has full buffers, it will also NACK packets until it is free to receive.&lt;/p&gt;
&lt;p&gt;When the packet(s) have/has actually been sent over the air, and they&amp;#39;ve been ACKed by the peer, you will receive a TX_COMPLETE event with a count of how many packets that were transmitted. This is what you should keep track of if you need to continue transmissions where you left off after a disconnection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent data loss while sending data over bluetooth</title><link>https://devzone.nordicsemi.com/thread/3779?ContentTypeID=1</link><pubDate>Fri, 16 May 2014 21:39:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa5aab0a-f969-4300-9436-7778e88900b5</guid><dc:creator>mira67</dc:creator><description>&lt;p&gt;Does that mean the data is transferred to master device when the err_code is &amp;quot;NRF_SUCCESS&amp;quot;?
Or we have to build application level to make sure no data loss during the BLE transmission.
Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent data loss while sending data over bluetooth</title><link>https://devzone.nordicsemi.com/thread/3778?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2013 14:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a899aa0-0077-4fbf-a7ef-fe797b268a38</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;You must check the error code when trying to send data. If you don&amp;#39;t get NRF_SUCCESS back, you need to resend the data from your application if you actually want to transmit it.&lt;/p&gt;
&lt;p&gt;There have been several discussions on this site about how to get high throughput, so I&amp;#39;d recommend you to search around a little if you still have trouble with this. The reply I gave you on &lt;a href="https://devzone.nordicsemi.com/index.php/dealing-large-data-packet-s-through-ble"&gt;this question&lt;/a&gt; is still valid, so I&amp;#39;d recommend you to instead implement something like that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent data loss while sending data over bluetooth</title><link>https://devzone.nordicsemi.com/thread/3777?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2013 07:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82ff120b-4b67-42ff-b966-5a3559115058</guid><dc:creator>John Kelley</dc:creator><description>&lt;p&gt;You may want to get rid of your divide for the d variable and simply replace your for loop with:
for(k=0;k&amp;lt;length;k+=20)&lt;/p&gt;
&lt;p&gt;M0 has no hardware divide and addition is always faster.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>