Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

How to reconnect when Disconnection appear : BLEHci.conn_failed_to_be_established [pc_ble_driver_py]

Hello, I am using the nordic nRF52840-DK with the package pc-ble-driver-py and the example heart_rate_collector.py.

My problem is that sometimes the Bluetooth connection can't connect to the device with this error : 

New connection, conn_handle: 0

Disconnected, conn_handle: 0, reason: BLEHci.conn_failed_to_be_established

I know that this error can sometimes occurred. But I would like to know how can I reconnect automatically just after this error ? 

Knowing that this error is problematic because it stop my python script lunched from a batch file.

Thanks in advance.

Gaetan

Parents
  • Hello,

    Please note that I am not that familiar with pc_ble_driver_py. I just know the SDK, but the principles are the same. 

    When it disconnects, is it because of range? Because in that case, it may not be able to reconnect either, if the scanner is not able to "hear" the advertisements from the peripheral. Also, make sure that the peripheral is still advertising after the disconnect events. 

    Why does the python script stop when you disconnect? Again, not that familiar with the pc_ble_driver_py, but when seeing it as a normal BLE application, can't you just keep scanning for the device whenever it fails to connect?

    BR,

    Edvin

Reply
  • Hello,

    Please note that I am not that familiar with pc_ble_driver_py. I just know the SDK, but the principles are the same. 

    When it disconnects, is it because of range? Because in that case, it may not be able to reconnect either, if the scanner is not able to "hear" the advertisements from the peripheral. Also, make sure that the peripheral is still advertising after the disconnect events. 

    Why does the python script stop when you disconnect? Again, not that familiar with the pc_ble_driver_py, but when seeing it as a normal BLE application, can't you just keep scanning for the device whenever it fails to connect?

    BR,

    Edvin

Children
No Data
Related