This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Android unbonded connection with NRF51822

I have troubles with connection using nrf51822 and android phones:

  1. First I connect and bond the device to the phone and it works ok.

  2. Then I periodically call gatt.readRemoteRssi() and gatt.readCharacteristic(BATTERY_LEVEL_CHARACTERISTIC), everything works fine so far.

  3. Then I unpair the device from settings.

  4. onConnectionStateChange is called with with STATE_DISCONNECTED.

  5. Then it's connected again since autoConnect = true, after it's connected I continue to periodically read the values, works fine for a few seconds.

  6. Then there's this error

    W/bt_btif: btif_dm_generic_evt: event=33037 W/bt_btm: btif_dm_generic_evt: reason=19 W/bt_btm: btm_sec_send_hci_disconnect: handle:0x40, reason=0x13 W/bt_btif: bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x0016 W/bt_btif: bta_gattc_conn_cback() - cif=4 connected=0 conn_id=4 reason=0x0016 W/bt_btif: bta_gattc_conn_cback() - cif=5 connected=0 conn_id=5 reason=0x0016 W/bt_btif: bta_gattc_conn_cback() - cif=6 connected=0 conn_id=6 reason=0x0016 W/bt_btif: bta_gattc_conn_cback() - cif=9 connected=0 conn_id=9 reason=0x0016 W/bt_btif: bta_gattc_conn_cback() - cif=11 connected=0 conn_id=11 reason=0x0016 W/bt_btif: bta_gattc_conn_cback() - cif=12 connected=0 conn_id=12 reason=0x0016 W/bt_btif: bta_dm_bl_change_cback : reason=22 W/bt_btif: bta_dm_bl_change_cback : reason=22 W/bt_btm: btm_sec_disconnected W/bt_btif: conn.link_down.is_removed : 1 W/bt_btm: BTM_SecDeleteDevice W/bt_btm: BTM_SecDeleteDevice :: pending_delete : 0 W/bt_btm: BTM: BTM_DeleteStoredLinkKey: delete_all_flag: FALSE

And then this:

D/BluetoothGatt: onClientConnectionState() - status=22 clientIf=6 device=E6:16:7B:85:F4:E8

Tested on Samsung s6 and nexus 5. Is there a solution for this problem?

Related