<?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>Disconnect too late detected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52362/disconnect-too-late-detected</link><description>Hi, 
 we are using a sensor which streams out buffered data to an ios or android app. If we face a disconnection the data gets buffered and send when reconnected. 
 But the issue is that the smart device detects the disconnection quiet early while the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Sep 2019 08:00:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52362/disconnect-too-late-detected" /><item><title>RE: Disconnect too late detected</title><link>https://devzone.nordicsemi.com/thread/211129?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2019 08:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f59a787e-b8e5-4e27-874d-e3f573a70774</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Constantin&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;Have you checked what the disconnect reason is in the&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event? I.e., if it&amp;#39;s&amp;nbsp;BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION (0x13) or&amp;nbsp;BLE_HCI_CONNECTION_TIMEOUT (0x08). You may get the&amp;nbsp;&lt;span&gt;BLE_HCI_CONNECTION_TIMEOUT if the phone terminates the link without sending the disconnect command.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user=""]NRF_ERROR_RESOURCES just indicates fine when the package was successfully transferred but short before the disconnect it fails.[/quote]
&lt;p&gt;&amp;nbsp;NRF_ERROR_RESOURCES means that the tx output buffer inside the Softdevice is full. To see when packets are sent on the air, you should monitor the&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE event, see MSC:&amp;nbsp;&lt;a title="GATTS Handle Value Notification" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group___b_l_e___g_a_t_t_s___h_v_n___m_s_c.html?cp=3_4_2_1_2_4_3_5"&gt;GATTS Handle Value Notification&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>