<?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>Disconnecting from ble peripheral with more power, or resetting all Bluetooth connections?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107138/disconnecting-from-ble-peripheral-with-more-power-or-resetting-all-bluetooth-connections</link><description>Hi, 
 I use nRF5340 with SDK 2.2.0. as Central and multiple phones as Peripheral. 
 I have a question about disconnecting from the device. 
 If ATT timeout is happening I can&amp;#39;t disconnect from peripheral immediately. It seems like that disconnect canot</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Jan 2024 12:29:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107138/disconnecting-from-ble-peripheral-with-more-power-or-resetting-all-bluetooth-connections" /><item><title>RE: Disconnecting from ble peripheral with more power, or resetting all Bluetooth connections?</title><link>https://devzone.nordicsemi.com/thread/464587?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2024 12:29:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c4a573a-e532-42c9-84aa-6560baf4d8c7</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Stjepan,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think bt_disable works properly in SDK v2.2.0. You would need to move to at least v2.4.0 to have it works on nRF52 and v2.5.0 for nRF53.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Doing a reset when you want to drop the connection and start a new one is not a terrible solution, in my opinion, especially at SDK v2.2 when the disable and enable the stack is not fully supported. I assume you have your data stored and don&amp;#39;t have an issue when restarting?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnecting from ble peripheral with more power, or resetting all Bluetooth connections?</title><link>https://devzone.nordicsemi.com/thread/464563?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2024 10:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:386de724-f549-454f-b4d3-dad537bb4338</guid><dc:creator>Stjepan Brlecic</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Please correct if I&amp;#39;m wrong, what you want to achieve is that when you are involving in a ATT timeout, you don&amp;#39;t want to wait all the way until the timeout expired (30seconds) but you want to disconnect right away ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color:#339966;"&gt;--&amp;gt; Yes, this is correct, for some reasons sometimes I wait too long for the response from the peripheral, so I would like &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;to disconnect and start scanning for other peripherals, but this doesn&amp;#39;t work because disconnection never happens, or &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;it&amp;nbsp; takes to long.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I&amp;#39;m not aware of anymore &amp;quot;powerful&amp;quot; disconnect way other than calling bt_conn_disconnect(). &lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:#339966;"&gt;--&amp;gt; Sometimes when using bt_conn_disconnect() disconnection never happens, maybe at that moment peripheral is&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;no longer close enough, but never mind that I wont to start scanning for other nearby peripherals and I can&amp;#39;t do that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;But you can try bt_disable() and then bt_enable(). I&amp;#39;m not 100% sure it will disconnect right away. And also it&amp;#39;s a newly support feature, you may want to update to the latest SDK to be able to use it. &lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color:#339966;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#339966;"&gt;--&amp;gt; I&amp;#39;m using SDK 2.2. and there is bt_disable &amp;amp; bt_enable function but after bt_disable i put sleep 2 second and calling &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;bt_enable and i get error -120 --&amp;gt; EALREADY (Operation already in progress)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Upgrade to the newer SDK is not an option for us at this moment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt;For now, I have a workaround, I restart the nRF when I see that disconnection takes too long but this is a dirty solution so is there some better way?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#339966;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#339966;"&gt;Br,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#339966;"&gt;Stjepan Brlečić&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnecting from ble peripheral with more power, or resetting all Bluetooth connections?</title><link>https://devzone.nordicsemi.com/thread/462909?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 13:42:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c781af32-7170-4eb5-aaa4-c4787f2e05e0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Stjepan,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please correct if I&amp;#39;m wrong, what you want to achieve is that when you are involving in a ATT timeout, you don&amp;#39;t want to wait all the way until the timeout expired (30seconds) but you want to disconnect right away ?&amp;nbsp;&lt;br /&gt;I was not aware that the connection termination has to wait for the ATT timeout before it can send the connection termination. They are on different layer ATT vs Link layer so it&amp;#39;s strange that disconnect has to wait, but maybe I&amp;#39;m wrong.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not aware of any more &amp;quot;powerful&amp;quot; disconnect way other than calling&amp;nbsp;&lt;span&gt;bt_conn_disconnect().&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;But you can try&amp;nbsp;bt_disable() and then&amp;nbsp;bt_enable(). I&amp;#39;m not 100% sure it will disconnect right away. And also it&amp;#39;s a newly support feature, you may want to update to the latest SDK to be able to use it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>