ble disconnects Immediately after connection.

Hi All,

I'm using nrf Connect SDK v1.7.0 with Vs Code

So here I can see in the debug prints that Bluetooth device is able to get connection successfull callback and Immediately I get disconnection callback with this error reason.

BT_HCI_ERR_CONN_FAIL_TO_ESTAB           0x3e
I wish to know, what does it mean and how to prevent it?
Parents
  • Hi

    What kinds of devices are the central device and the peripherals in this use case? Do these fail to establish errors occur even when trying to connect to the first peripheral as well, or only when trying to connect to peripheral number X? It could be that the maximum number of connected devices has been reached by the central device. What is your CONFIG_BT_MAX_CONN set to in the central application for example?

    Best regards,

    Simon

Reply
  • Hi

    What kinds of devices are the central device and the peripherals in this use case? Do these fail to establish errors occur even when trying to connect to the first peripheral as well, or only when trying to connect to peripheral number X? It could be that the maximum number of connected devices has been reached by the central device. What is your CONFIG_BT_MAX_CONN set to in the central application for example?

    Best regards,

    Simon

Children
  • Hi Simon,

    Sorry for late reply.

    What is your CONFIG_BT_MAX_CONN set to in the central application for example?

    I have not used that setting in our application and I clear bt_conn variables used for connection after every disconnection.

    Do these fail to establish errors occur even when trying to connect to the first peripheral as well, or only when trying to connect to peripheral number X?

    Our application acts a central, with two peripheral sensors all placed together currently and in field they are placed meters apart.

    As I said these are very near to the central device and disconnection occurs randomly not particularly with one peripheral device.

    Do I need to stop peripheral advertising before I go for a central connection?

    I use internal software timer to count milliseconds in our code does it has a toll on performance.

Related