Here is what I found out debugging an issue when trying to connect Meta Glasses to the Fairphone 4:
Bug Report: BLE L2CAP COC Connection Failure on Fairphone 4 with Android 15
Details
Summary
BLE L2CAP Connection-Oriented Channel (COC) connections fail on Fairphone 4 running Android 15. The secure L2CAP data channel times out after 30 seconds, preventing companion apps from completing pairing with BLE accessories. This is a regression from Android 13 where the same device and accessories worked correctly.
Device Information
- Device: Fairphone 4 (FP4)
- Android Version: 15
- Security Patch: 2026-01-05
- Hardware: Qualcomm (
ro.hardware=qcom)
- Bluetooth Stack: Qualcomm proprietary (
android.hardware.bluetooth@1.0-service-qti)
Affected Accessory
- Device: Meta Ray-Ban Smart Glasses (Wayfarer)
- Model: RB Meta 01N3
- Bluetooth: Dual-mode (BLE + BR/EDR)
- BLE Service UUID:
0000fd5f-0000-1000-8000-00805f9b34fb
- L2CAP PSM: 129 (0x81) - Secure LE COC
Problem Description
When attempting to pair Meta Ray-Ban glasses via the Meta AI app (com.facebook.stella), the BLE GATT connection succeeds but the L2CAP COC connection fails. The connection attempt times out after exactly 30 seconds.
What Works
- BLE scanning and discovery
- BLE GATT connection
- GATT service discovery
- MTU negotiation (517 bytes)
- PHY update (2M PHY)
- System Bluetooth bonding (DUAL mode)
- Companion Device Manager association
- A2DP audio streaming (Spotify works through glasses)
What Fails
- L2CAP COC connection to PSM 129
- Meta AI app cannot complete pairing handshake
- Camera streaming and smart features unavailable
Technical Analysis
Socket Events from dumpsys bluetooth_manager
00:01:08.669 xx:xx:xx:xx:29:67 STATE_CONNECTING ROLE_CONNECTION 129 L2CAP_LE
00:01:38.672 xx:xx:xx:xx:29:67 STATE_DISCONNECTING ROLE_CONNECTION 129 L2CAP_LE
00:01:38.672 xx:xx:xx:xx:29:67 STATE_DISCONNECTED ROLE_CONNECTION 129 L2CAP_LE
The connection stays in STATE_CONNECTING for exactly 30 seconds before timing out.
Logcat Errors
E BleConnection-Supernova: Failure to connect to l2cap
E BleConnection-Supernova: com.facebook.wearable.connectivity.bluetooth.api.BleL2CapException: Unable to connect to l2cap
E BleConnection-Supernova: Caused by: android.bluetooth.BluetoothSocketException: A Bluetooth Socket failure occurred
E BleConnection-Supernova: at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:475)
I ConnectivityStartupLogger: markConnectionAttemptPoint CONNECT_L2CAP_FAILED
I BluetoothAdapterService: Statslog L2capcoc client connection. metricId 24 port 129 isSecured true result 0 endToEndLatencyMillis 30011 socketCreationLatencyMillis 0 socketConnectionLatencyMillis 30010
Bluetooth Stack Details
I BtSocketManagerBinder: connectsocket: device=XX:XX:XX:XX:66:9D, type=4, uuid=00000000-0000-0000-0000-000000000000, port=129
I bt_btif_sock: btsock_connect: Attempting socket connection for device: xx:xx:xx:xx:29:67, type: 4, channel: 129
I bluetooth: btsock_l2cap_alloc_l: Allocated l2cap socket structure
I bt_l2cap: L2CA_RegisterLECoc: Registered service LE COC PSM: 0x0081
Root Cause Analysis
Based on research (Google Issue Tracker #371713238), the Android Bluetooth stack sends L2CAP extended flow control packets and blocks waiting for a response. Some BLE devices (including Meta glasses and AirPods) do not respond to these packets, causing the connection to hang until timeout.
The problematic code is in:
system/stack/l2cap/l2c_link.cc (line 118)
system/stack/l2cap/l2c_fcr.cc (lines 1605-1610)
Attempted Workarounds (All Failed)
| Workaround |
Result |
| Grant all location permissions |
Required but not sufficient |
| Factory reset glasses |
No effect |
| Clear app data and bonds |
No effect |
| Toggle Bluetooth off/on |
No effect |
| Adjust BLE scan parameters |
No effect |
device_config L2CAP flags |
Cannot persist without root |
| Disable A2DP hardware offload |
No effect |
| Change AVRCP version (1.4) |
No effect |
| Change MAP version (1.2) |
No effect |
Device Config Flags Examined
com.android.bluetooth.flags.bt_socket_api_l2cap_cid=false
com.android.bluetooth.flags.higher_l2cap_flush_threshold=false
com.android.bluetooth.flags.l2cap_le_do_not_adjust_min_interval=false
com.android.bluetooth.flags.l2cap_p_ccb_check_rewrite=false
com.android.bluetooth.flags.l2cap_tx_complete_cb_info=false
These flags cannot be modified without root access.
Regression Information
- Working: Android 13 on the same Fairphone 4
- Broken: Android 15 on the same Fairphone 4
- Same accessory: Meta Ray-Ban glasses worked on Android 13
Impact
- Users cannot pair BLE accessories that require L2CAP COC data channels
- Affects Meta Ray-Ban glasses, likely AirPods, and other BLE accessories
- Smart features requiring data transfer are completely non-functional
- Basic audio (A2DP) works, but companion app features do not
Related Issues
- Google Issue Tracker #371713238: L2CAP extended flow control packet blocks socket
- Google Issue Tracker #36976247: Support Bluetooth L2CAP
- Fairphone Forum: Bluetooth problems since Android 15 update
Bluetooth problems since Android 15 update
- LibrePods GitHub Issues:
#232: L2CAP Connection Fails on Fairphone 5
#229: L2CAP Connection Fails on Pixel 7a
Suggested Fix
Per Google Issue #371713238, the fix requires modifying the Bluetooth stack to:
- Not block when sending extended flow control packets
- Return gracefully if no response is received from the peer device
Temporary workaround (requires root): Comment out the extended flow control checks in l2c_fcr.cc and rebuild libbluetooth_jni.so.
Steps to Reproduce
- Use Fairphone 4 with Android 15
- Install Meta AI app (
com.facebook.stella)
- Factory reset Meta Ray-Ban glasses
- Open Meta AI app and initiate pairing
- Glasses appear and GATT connects
- Observe pairing stuck at âconnectingâ for 30+ seconds
- Pairing fails with L2CAP connection error
Expected Behavior
L2CAP COC connection should establish within a few seconds, allowing the companion app to complete the pairing handshake.
Actual Behavior
L2CAP COC connection times out after 30 seconds. App reports pairing failure despite successful GATT connection and system-level Bluetooth bond.
Attachments
Logcat output and dumpsys bluetooth_manager output available upon request.