Skip to content

[Bug] GATT 133/147 errors on Android 17 with Libre 2 Plus (3MH0) sensors due to OS-level BLE throttling #434

Description

@bbfsdev

FYI, I'm a developer and will fork and work on this issue, I just want to sync and align the work with maintainers to make sure I'm doing the right thing.

On Android 17 (Pixel 10), Juggluco is consistently failing to maintain a stable Bluetooth connection to Libre 2 Plus (3MH0) sensors. The logs show a cyclical failure pattern: GATT Error 133 followed by 147 (SEC_CHAR_CHALLENGE_DATA).

The issue persists even after setting battery usage to "Unrestricted" and locking the app in the recent-app switcher. It appears that Android 17's background GATT client throttling prevents the app from completing the sensor’s mandatory cryptographic challenge-response handshake when the device is in a low-power state or stationary.

Environment:

Device: Google Pixel 10

OS: Android 17 (API 37)

Sensor: FreeStyle Libre 2 Plus (Prefix: 3MH0)

Juggluco Version: 10.8.1

Configuration: Juggluco -> xDrip+ -> AAPS (Virtual Bridge)

Steps to Reproduce:

Initialize Libre 2 Plus (3MH0) sensor via NFC.

Allow the Bluetooth connection to establish while the app is in the foreground.

Place the phone in a stationary position and allow the screen to turn off.

Observe the logs: 133 (GATT_ERROR) occurs followed by 147 (Security Challenge failure).

Expected Behavior:
The app should maintain the GATT connection or reliably re-initialize the handshake upon screen wake/device movement without triggering a permanent 133 error state.

Actual Behavior:
The Bluetooth stack becomes unresponsive, requiring a manual Bluetooth toggle or phone restart to clear the 133 error.

FYI, seldom a reading is going through:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions