<?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>W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121171/w-conn-failed-to-establish-rf-noise</link><description>deleted</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 May 2025 11:25:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121171/w-conn-failed-to-establish-rf-noise" /><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/535094?ContentTypeID=1</link><pubDate>Tue, 13 May 2025 11:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20531875-aae1-4fcd-97f3-11ac04ba6855</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Assuming that you are able to reproduce this on DK, Can you please attach your minimalistic project so that I can reproduce this on my desk and find out the reason for this. This will avoid a lot of ping pong questions and let me dive straight to debugging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/534264?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 11:15:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea054b25-3399-4a7d-9384-5b31deb548ac</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;There is a bug in your code, in the connected_cb() you are not giving the semaphore when the connection fails.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So when there is a connection failure your main loop is stuck. You also still have k_sem_take waiting for K_FOREVER.&lt;/p&gt;
&lt;p&gt;I suggest you one of the two changes&lt;/p&gt;
&lt;p&gt;1) In your connected_cb()&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void connected_cb(struct bt_conn *conn, uint8_t err)
{
    if (err) {
        LOG_ERR(&amp;quot;Connection failed (err 0x%02x)&amp;quot;, err);
        bt_conn_unref(conn);
        k_sem_give(&amp;amp;sem_connected);    // ADD THIS NEW LINE ADDED SUSHEEL
        return;
    }

    /* On success the same give(), which you are doing already. */
    k_sem_give(&amp;amp;sem_connected);
    …
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2) Make sure your k_sem_take are not waiting for ever and PLEASE DO NOT IGNORE RETURN VALUES of function calls like k_sem_take&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/534130?ContentTypeID=1</link><pubDate>Tue, 06 May 2025 13:41:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:112e4360-8c3f-45cc-8843-1fbccca1e166</guid><dc:creator>NickDeLeenheer</dc:creator><description>&lt;p&gt;deleted&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/534042?ContentTypeID=1</link><pubDate>Tue, 06 May 2025 07:38:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43ee71ca-5d59-4e23-90e6-5d1d371e3055</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Yes, Please share you whole project zipped. I need to see what your code is doing in other callbacks like connected(). I also need to see how you are giving the semaphore sem_connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/533996?ContentTypeID=1</link><pubDate>Mon, 05 May 2025 20:45:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:385dc168-f071-45bf-8219-67c138fe05ea</guid><dc:creator>NickDeLeenheer</dc:creator><description>&lt;p&gt;deleted&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/533879?ContentTypeID=1</link><pubDate>Mon, 05 May 2025 09:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d1547f5-1391-4f3d-b565-676cd33154e6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Also please do not open multiple threads on the same issue and please close on of these two threads.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/533878?ContentTypeID=1</link><pubDate>Mon, 05 May 2025 09:45:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05058190-25ea-42bd-9bb4-aa5cb1d0e526</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Isn&amp;#39;t this the same issue as mentioned &lt;a href="https://devzone.nordicsemi.com/support-private/support/344833"&gt;here&lt;/a&gt;&amp;nbsp;?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Yes, the infinite loop seems wrong&amp;nbsp;like you already suspected and it is better to have a timeout and move on. I suggest the below for the cleanup code&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (k_sem_take(&amp;amp;sem_connected, K_SECONDS(4)) != 0) {
    printk(&amp;quot;W: Connection to device %d timed out. Skipping...\n&amp;quot;, i);
    if (connections[i]) {
        bt_conn_disconnect(connections[i], BT_HCI_ERR_REMOTE_USER_TERM_CONN);
        bt_conn_unref(connections[i]);
        connections[i] = NULL;
    }
    continue; // Move on to the next device
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/533865?ContentTypeID=1</link><pubDate>Mon, 05 May 2025 08:23:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b168b7d-fc8f-428c-8d8e-7e497af11c8c</guid><dc:creator>NickDeLeenheer</dc:creator><description>&lt;p&gt;deleted&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: W: conn failed to establish. RF noise?</title><link>https://devzone.nordicsemi.com/thread/533839?ContentTypeID=1</link><pubDate>Mon, 05 May 2025 05:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02080d9b-65e0-4c64-9bd1-ba7e18041880</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Nick,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please tell us more on your test setup and also show us the console output where you see the warning you mentioned? It sounds like a configuration issue with the software but I can try to assist you more after you provide more information that I requested.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>