Android Bluetooth Stack randomly disconnects from my BLE device

198 views Asked by At

My java code runs on Quest 2 (Android 12.0) and subscribes to the gatt cadence characteristic of a cadence sensor. The code runs pretty well except that Bluetooth stack randomly disconnects from the cadence sensor. Sometimes it disconnects within the first minute, and sometimes it can take up to an hour before it disconnects. Any assistance would be appreciated.

The relevant Logcat logs are below:

2023/09/01 18:33:03.457 Info bt_stack [INFO:btsnoop.cc(361)] clear_l2cap_allowlist: Clearing acceptlist from l2cap channel. conn_handle=4 cid=4:4

2023/09/01 18:33:03.457 Info bt_stack [INFO:gatt_attr.cc(338)] gatt_connect_cback: remove untrusted client status, bda=d9:12:e7:b6:c5:44

2023/09/01 18:33:03.457 Info bluetooth system/bt/stack/gap/gap_ble.cc:298 client_connect_cback: No active GAP service found for peer:xx:xx:xx:xx:c5:44 callback:Disconnected

2023/09/01 18:33:03.457 Info bt_bta_gattc system/bt/bta/gatt/bta_gattc_act.cc:1115 bta_gattc_conn_cback: Disconnected att_id:3 transport:le reason:GATT_CONN_TIMEOUT

2023/09/01 18:33:03.457 Info bt_bta_gattc system/bt/bta/gatt/bta_gattc_act.cc:1115 bta_gattc_conn_cback: Disconnected att_id:4 transport:le reason:GATT_CONN_TIMEOUT

2023/09/01 18:33:03.457 Info bt_bta_gattc system/bt/bta/gatt/bta_gattc_act.cc:1115 bta_gattc_conn_cback: Disconnected att_id:7 transport:le reason:GATT_CONN_TIMEOUT

2023/09/01 18:33:03.457 Warn bt_btm_sec system/bt/stack/btm/btm_sec.cc:3669 btm_sec_disconnected: Got uncommon disconnection reason:Connection Timeout handle:0x0004

2023/09/01 18:33:03.458 Info btif_av system/bt/btif/src/btif_av.cc:3352 btif_av_acl_disconnected: btif_av_acl_disconnected: Peer d9:12:e7:b6:c5:44 : ACL Disconnected

2023/09/01 18:33:03.459 Info btif_av system/bt/btif/src/btif_av.cc:1078 FindOrCreatePeer: BtifAvPeer *BtifAvSource::FindOrCreatePeer(const RawAddress &, tBTA_AV_HNDL): Create peer: peer_address=d9:12:e7:b6:c5:44 bta_handle=0x41 peer_id=0

2023/09/01 18:33:03.459 Info btif_av system/bt/btif/src/btif_av.cc:3279 btif_av_get_peer_sep: No active sink or source peer found

2023/09/01 18:33:03.459 Info bt_btif_a2dp_source system/bt/btif/src/btif_a2dp_source.cc:691 btif_a2dp_source_on_idle: btif_a2dp_source_on_idle: state=STATE_OFF

2023/09/01 18:33:03.459 Info btif_av system/bt/btif/src/btif_av.cc:3279 btif_av_get_peer_sep: No active sink or source peer found

2023/09/01 18:33:03.459 Info bt_btif_a2dp_source system/bt/btif/src/btif_a2dp_source.cc:691 btif_a2dp_source_on_idle: btif_a2dp_source_on_idle: state=STATE_OFF

2023/09/01 18:33:03.459 Info btif_av system/bt/btif/src/btif_av.cc:1123 DeleteIdlePeers: DeleteIdlePeers: Deleting idle peer: d9:12:e7:b6:c5:44 bta_handle=0x41

0

There are 0 answers