8 years, 10 months ago.

Ble disconnection error

When i run my program on the nRF51822 (redBearlab) i get an DisconnectionReason_t which is equals to 8 (int). I have seen this by printing the reason in the disconnection callback. I have seen the enum in Gap.h but I don't see the 8. Can sombody explain what the error is and why it is caused? Or maybe in which file the error is genereated.

PS. When i disconnect manually with a smartphone app i get 19 as expected(REMOTE_USER_TERMINATED_CONNECTION).

Question relating to:

Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)

1 Answer

8 years, 10 months ago.

Hello Rene,

For the Nordic stack, disconnection reason being 8 indicates 'connection-timeout'. This should have been a part of the standard DisconnectionReason_t enumeration. I've added that to our pending tasks: https://github.com/mbedmicro/BLE_API/issues/43

Thanks.

Hello Rohit,

Thank you for your response. I have found a ble_error_e defined in blecommon.h, which can have 8 as a value. Here 8 means BLE_ERROR_UNSPECIFIED (unnkown error ) is this unrelevant for the DisconnectionReason_t? Because i can't find where the 8 for the DisconnectionReason_t is generated. The disconnection reason 8 I think the problem is what i have described here: [https://developer.mbed.org/questions/53974/I2C-and-Bluetooth-not-working-together/]

Can you take a look at it?

posted by Rene Miedema 11 Jun 2015