I switched my Pixel 8 to Graphene OS over the weekend and haven't had too many issues so far.
However, I'm unable to reconnect to a Heltec V3 ESP-32 running Meshtastic via Bluetooth after the initial pairing. I can pair the device, and use it afterwards while it remains connected, but if it disconnects and reconnect, I get a modal saying "Can't connect <device>: For more details, go to device settings", which tells me to try restarting or repair the device. Restarting the device doesn't fix the issue, and while I can forget + re-pair the device, it's annoying and insecure to do that every time.
I haven't had this issue with the stock Pixel 8 OS between the same devices. It only started happening after installing Graphene OS.
My search turned up a few threads and issues mentioning that the device may not be implementing the Bluetooth encryption properly. I captured the logcat while connecting and found this snippet:
03-10 15:11:56.981 2456 2888 I bt_bta_gattc: system/bta/gatt/bta_gattc_act.cc:1406 bta_gattc_conn_cback: Connected client_if:73 addr:xx:xx:xx:xx:9e:d5, transport:BT_TRANSPORT_LE reason:GATT_CONN_OK
03-10 15:11:56.981 2456 2888 E bta_gattc_main: system/bta/gatt/bta_gattc_main.cc:331 bta_gattc_hdl_event: Ignore unknown conn ID: 73
03-10 15:11:56.981 1603 1770 D ActivityManager: sync unfroze 7250 com.android.DeviceAsWebcam for 10
03-10 15:11:56.982 1008 15554 D BluetoothGatt: configureMTU() - device: XX:XX:XX:XX:9E:D5 mtu: 517
03-10 15:11:56.984 1603 9375 E AppOps : attributionTag BatteryService not declared in manifest of com.android.bluetooth
03-10 15:11:56.986 2456 2908 I bt_btif_gattc: system/btif/src/btif_gatt_client.cc:369 btif_gattc_open_impl: Transport=BT_TRANSPORT_LE, device type=BLE, address=xx:xx:xx:xx:9e:d5, address type=0, phy=3
03-10 15:11:56.986 2456 2888 I gatt_api: system/stack/gatt/gatt_api.cc:790 GATTC_TryMtuRequest: xx:xx:xx:xx:9e:d5 conn_id=0x0048
03-10 15:11:56.986 2648 3113 D CachedBluetoothDevice: onAclStateChanged: device XX:XX:XX:XX:9E:D5, state 2, transport 2
03-10 15:11:56.986 2648 3113 D CachedBluetoothDevice: onAclStateChanged: device XX:XX:XX:XX:9E:D5, connect time is updated: 24391429, le connection status: false, br/edr connection status: false
03-10 15:11:56.987 2456 2888 I gatt_api: system/stack/gatt/gatt_api.cc:751 GATTC_ConfigureMTU: Configuring ATT mtu size conn_id:72 mtu:517 user mtu 517
03-10 15:11:56.987 2456 2888 I gatt_api: system/stack/gatt/gatt_api.cc:1438 GATT_Connect: Registered for opportunistic connection gatt_if=73
03-10 15:11:56.988 1603 9375 E AppOps : attributionTag BatteryService not declared in manifest of com.android.bluetooth
03-10 15:11:56.988 2456 2908 E bt_bta_dm_sec: system/bta/dm/bta_dm_sec.cc:878 bta_dm_set_encryption: Unable to start encryption as already in progress peer:xx:xx:xx:xx:9e:d5 transport:BT_TRANSPORT_LE
03-10 15:11:56.988 2456 2908 I bt_bta_gattc: system/bta/gatt/bta_gattc_cache.cc:1027 bta_gattc_get_gatt_db:
03-10 15:11:56.989 5262 5262 D CachedBluetoothDevice: onAclStateChanged: device XX:XX:XX:XX:9E:D5, state 2, transport 2
03-10 15:11:56.990 5262 5262 D CachedBluetoothDevice: onAclStateChanged: device XX:XX:XX:XX:9E:D5, connect time is updated: 24391432, le connection status: false, br/edr connection status: false
03-10 15:11:57.005 1603 9375 E AppOps : attributionTag BatteryService not declared in manifest of com.android.bluetooth
03-10 15:11:57.066 2456 2888 E bt_btm_sec: system/stack/btm/btm_sec.cc:3526 btm_sec_encryption_change_evt: Encryption failure 6, disconnecting 65
03-10 15:11:57.066 2456 2888 W btm_acl : system/stack/acl/btm_acl.cc:2134 acl_disconnect_after_role_switch: Controller will not accept invalid reason parameter:HCI_ERR_KEY_MISSING instead sending:HCI_ERR_PEER_USER
03-10 15:11:57.066 2456 2888 I btm_acl : system/stack/acl/btm_acl.cc:193 disconnect_acl: Disconnecting peer:xx:xx:xx:xx:9e:d5[public][BT_TRANSPORT_LE] reason:HCI_ERR_PEER_USER comment:stack::btu::btu_hcif::encryption_change_evt Encryption Failure
03-10 15:11:57.067 2456 2888 W bt_btif_gatt: system/btif/src/btif_gatt_util.cc:66 btif_gatt_set_encryption_cb: Encryption failed (1)
03-10 15:11:57.067 2456 2888 E bt_btm_sec: system/stack/btm/btm_sec.cc:3348 btm_sec_encrypt_change: xx:xx:xx:xx:9e:d5 encrypt failure status 0x6
03-10 15:11:57.067 2456 2888 W smp_act : system/stack/smp/smp_act.cc:2089 smp_link_encrypted: SMP state machine busy so skipping encryption enable:0 device:xx:xx:xx:xx:9e:d5
03-10 15:11:57.068 2456 2888 W bt_btm_sec: system/stack/btm/btm_sec.cc:208 btm_sec_report_bond_loss: Bond loss detected for xx:xx:xx:xx:9e:d5(2) reason: encryption_change:key_missing
03-10 15:11:57.068 2456 2888 I btm_acl : system/stack/acl/btm_acl.cc:193 disconnect_acl: Disconnecting peer:xx:xx:xx:xx:9e:d5[public][BT_TRANSPORT_LE] reason:HCI_ERR_AUTH_FAILURE comment:encryption_change:key_missing
03-10 15:11:57.069 2456 2894 I bluetooth: system/gd/hci/acl_manager/le_acl_connection.cc:192 Disconnect: Already disconnecting xx:xx:xx:xx:9e:d5[PUBLIC_DEVICE_ADDRESS(0x00)]
03-10 15:11:57.073 2456 2908 I BluetoothRemoteDevices: keyMissingCallback device: XX:XX:XX:XX:9E:D5, reason: 3
03-10 15:11:57.076 2456 2908 I BluetoothDatabaseManager: Bond loss detected, count: 1
In particular the HCI_ERR_KEY_MISSING message seems like it's indeed an issue with encryption, though I'm not sure why it would work on the stock OS but not on GOS.
Can anyone help me get more details on what could be causing this? If it is an issue with the firmware on the ESP32, I'd like to get some more info before I submit a bug report to them.