<?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>Connections drop and don&amp;#39;t come back</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119978/connections-drop-and-don-t-come-back</link><description>This is a continuation of my previous thread ( Connections drop and don&amp;#39;t come back (and &amp;quot;SoftDevice Controller ASSERT: 53, 296&amp;quot;) ) (Case ID: 341823). 
 The project is a star network in which the Central is housed in a steel enclosure with a patch antenna</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Mar 2025 11:41:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119978/connections-drop-and-don-t-come-back" /><item><title>RE: Connections drop and don't come back</title><link>https://devzone.nordicsemi.com/thread/528587?ContentTypeID=1</link><pubDate>Mon, 24 Mar 2025 11:41:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc1cfbcd-b69b-4c4a-968f-2d35a2b00ac6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;I do not have any updaed from my side, but I look forward to seeing the result of your last test and will continue looking at this after that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connections drop and don't come back</title><link>https://devzone.nordicsemi.com/thread/528481?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2025 22:41:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6e2c18d-d08b-4ea0-b5a0-32892dcc3eac</guid><dc:creator>David Ormand</dc:creator><description>&lt;p&gt;Some more information:&lt;/p&gt;
&lt;p&gt;I have been capturing the internally-generated error codes generated by the Central as it runs, and noticed a pattern just before the &amp;quot;drop and don&amp;#39;t come back&amp;quot; event occurs.&amp;nbsp; I&amp;#39;ve got a Discovery process that looks for the UUID of my custom service, then the characteristics, and then the CCCD attribute; if something prevents the service discovery step from completing, then the connection is dropped.&amp;nbsp; This is the 2nd-to-last error reported.&amp;nbsp; Due to a logic error in my code, the connection is being dropped _twice_.&amp;nbsp; After the first one, the bt_conn pointer is being dereferenced and set to NULL.&amp;nbsp; Then the second call to bt_conn_disconnect occurs.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m looking at the bt_conn_disconnect() function in zephyr/subsys/bluetooth/host/conn.c.&amp;nbsp; It doesn&amp;#39;t look like there are any tests performed on conn before using it.&amp;nbsp; I shouldn&amp;#39;t be surprised that trying to use a NULL pointer would cause a fault.&amp;nbsp; Could be this is killing the entire Bluetooth thread, so it isn&amp;#39;t just advertising that isn&amp;#39;t working, it&amp;#39;s all the BLE stuff.&amp;nbsp; I guess I shouldn&amp;#39;t be surprised that the interrupt-driven console part of my program would continue to run.&lt;/p&gt;
&lt;p&gt;I can believe that a poor-quality RF scenario could cause an incident during Discovery; this is why I never see it except when the case is flipped over, and only rarely even then.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve fixed my logic bug and am rerunning the test to see if the &amp;quot;drop and don&amp;#39;t come back&amp;quot; problem recurs.&amp;nbsp; If it does, I will attempt to enable full logging to console and try to figure out how to capture it in this embedded application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connections drop and don't come back</title><link>https://devzone.nordicsemi.com/thread/528480?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2025 22:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d8b6cfc-f6f8-43cd-9a41-9f8741a9ccc1</guid><dc:creator>David Ormand</dc:creator><description>&lt;p&gt;A bit more info:&lt;/p&gt;
&lt;p&gt;When this event occurs, the Central reports not seeing _any_ Peripheral devices advertising, even ones that were not previously connected.&lt;/p&gt;
&lt;p&gt;This led us previously to suspect that some error was occurring during reconnect that left scanning off.&amp;nbsp; So we implemented a timer that restarts scanning if a reconnect is _not_ in progress and no Peripheral advertising is detected.&amp;nbsp; If scanning is already running, the worst that could happen (so we figured) is getting an EALREADY return (except we saw that&amp;nbsp;bt_le_scan_start() was returning 0 frequently, much more than the &amp;quot;drop and don&amp;#39;t come back&amp;quot; event).&lt;/p&gt;
&lt;p&gt;This did not fix the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connections drop and don't come back</title><link>https://devzone.nordicsemi.com/thread/528340?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2025 08:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8fc8bec-2366-440e-b525-a42f35b8b1e6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am looking into this and will get back to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>