W: conn failed to establish. RF noise?

Hi,



when i try making a new connection with a new device using my for loop (reconnecting using the adresses that i stored in an array), i sometimes can get a warning which will end my MULTICONNECTION CS process...

Can someone help me with HOW to solve this issue and where i should solve this in my code? I think i should try to solve it in main(), since no other Zephyr Callback functions are available for this failed connection setup. I also think it is weird that i don't get the error from the bt_conn_le_create in my loggs...

kind regards,

Nick De Leenheer

Parents
  • Hi Nick, 

    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.

  • I am working on a Bluetooth Low Energy (BLE) application using Zephyr, where you attempt to reconnect to previously detected devices in a for loop using bt_conn_le_create() and using an array with STATIC addresses stored in an array. However, I'm encountering an intermittent issue where the connection to a device fails to establish. When this happens, I see a warning in the console as shown in the screenshot above:

    W: conn ... failed to establish. RF noise?

    This warning suggests that the connection attempt was unsuccessful, possibly due to interference (RF noise) or the remote device not being available. The key issue is that this failure occurs asynchronously—after the call to bt_conn_le_create() returns. As a result, the error isn't caught by the return value of bt_conn_le_create(), and my code proceeds to wait indefinitely on a semaphore as shown in the screenshot:

    k_sem_take(&sem_connected, K_FOREVER);

    To fix this, should I replace the infinite semaphore wait with a timed wait?
    such as:

    if (k_sem_take(&sem_connected, K_SECONDS(3)) != 0) {
        // Connection timeout: clean up and try next device
        bt_conn_disconnect(connections[i], BT_HCI_ERR_REMOTE_USER_TERM_CONN);
        bt_conn_unref(connections[i]);
        connections[i] = NULL;
        continue;
    }

    I can share you my entire code asswell if you want to...

    Kind regards,

    Nick De Leenheer

Reply
  • I am working on a Bluetooth Low Energy (BLE) application using Zephyr, where you attempt to reconnect to previously detected devices in a for loop using bt_conn_le_create() and using an array with STATIC addresses stored in an array. However, I'm encountering an intermittent issue where the connection to a device fails to establish. When this happens, I see a warning in the console as shown in the screenshot above:

    W: conn ... failed to establish. RF noise?

    This warning suggests that the connection attempt was unsuccessful, possibly due to interference (RF noise) or the remote device not being available. The key issue is that this failure occurs asynchronously—after the call to bt_conn_le_create() returns. As a result, the error isn't caught by the return value of bt_conn_le_create(), and my code proceeds to wait indefinitely on a semaphore as shown in the screenshot:

    k_sem_take(&sem_connected, K_FOREVER);

    To fix this, should I replace the infinite semaphore wait with a timed wait?
    such as:

    if (k_sem_take(&sem_connected, K_SECONDS(3)) != 0) {
        // Connection timeout: clean up and try next device
        bt_conn_disconnect(connections[i], BT_HCI_ERR_REMOTE_USER_TERM_CONN);
        bt_conn_unref(connections[i]);
        connections[i] = NULL;
        continue;
    }

    I can share you my entire code asswell if you want to...

    Kind regards,

    Nick De Leenheer

Children
Related