Zephyr: BLE connection refused

Hi,

I am having a connectivity problem with a central Bluetooth device (nrf52832) that has to be connected to a peripheral (nrf52840), previously this connectivity worked correctly with zephyr 2.5.0 but now that I wanted to update to zephyr 2.7.0 it has stopped working correctly since I rarely get connected to the peripheral, most of the time I don't get it and I get an error=2 from the callback of connected bt_conn_cb, I also tried to increment the timeout of bt_conn_le_create_param  with no positive result.

I don't know if the problem is due to the configuration since it's the only thing I have modified, this is the one I had for zephyr 2.5.0:

And this is the one I have for zephyr 2.7.0:

Thank you

  • Hi Apica, 

    Are you using Nordic's softdevice controller or you are using Zephyr controller ? 

    You may need to create git issue if it's not related to Nordic. 

    Have you tried to test with the default Bluetooth example in v2.7.0 ? 

    Error 2 means BT_HCI_ERR_UNKNOWN_CONN_ID and according to the documentation of the call back : 

    - @ref BT_HCI_ERR_UNKNOWN_CONN_ID Creating the connection started by
    * @ref bt_conn_le_create was canceled either by the user through
    * @ref bt_conn_disconnect or by the timeout in the host through
    * @ref bt_conn_le_create_param timeout parameter, which defaults to
    * @kconfig{CONFIG_BT_CREATE_CONN_TIMEOUT} seconds.

    Could you check CONFIG_BT_CREATE_CONN_TIMEOUT configuration in your project ? By default it's 3 seconds. 

    I would suggest to capture a sniffer trace to get more information about the connect attempts. 

Related