PhilipsHue / flutter_reactive_ble

Flutter library that handles BLE operations for multiple devices.
https://developers.meethue.com/
Other
662 stars 326 forks source link

Android 12+ writeCharacteristic error can't discover service / service_discovery_failure / #804

Open Feptkdie opened 11 months ago

Feptkdie commented 11 months ago

Android 12+ writeCharacteristic error can't discover service / service_discovery_failure /

PlatformException (PlatformException(service_discovery_failure, com.polidea.rxandroidble2.exceptions.BleGattCallbackTimeoutException: GATT exception from MAC address CB:4E:FD:F6:E6:8C, with type BleGattOperation{description='SERVICE_DISCOVERY'}, [com.polidea.rxandroidble2.internal.operations.ServiceDiscoveryOperation.lambda$timeoutFallbackProcedure$3(ServiceDiscoveryOperation.java:74), com.polidea.rxandroidble2.internal.operations.ServiceDiscoveryOperation$$ExternalSyntheticLambda3.call(Unknown Source:4), io.reactivex.internal.operators.single.SingleDefer.subscribeActual(SingleDefer.java:36), io.reactivex.Single.subscribe(Single.java:3666), io.reactivex.internal.operators.single.SingleTimeout$TimeoutMainObserver.run(SingleTimeout.java:126), io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38), io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26), java.util.concurrent.FutureTask.run(FutureTask.java:264), java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637), java.lang.Thread.run(Thread.java:1012)], null))

Steps to reproduce the behavior:

  1. Connected ble device log

    D/BluetoothGatt(19485): connect() - device: CB4EFD_C, auto: true
    D/BluetoothGatt(19485): registerApp()
    D/BluetoothGatt(19485): registerApp() - UUID=2b68004b-e7ac-430f-98b0-24e71705ac20
    D/BluetoothGatt(19485): onClientRegistered() - status=0 clientIf=5
    D/BluetoothGatt(19485): onClientConnectionState() - status=0 clientIf=5 device=CB4EFD_C
    D/BluetoothGatt(19485): onConnectionUpdated() - Device=CB4EFD_C interval=30 latency=0 timeout=200 status=0
    D/BluetoothGatt(19485): onConnectionUpdated() - Device=CB4EFD_C interval=6 latency=0 timeout=500 status=0
    I/scudo   (19485): Stats: SizeClassAllocator64: 292M mapped (0M rss) in 1107777 allocations; remains 346716
    • Device: Samsung galaxy a34
    • OS: Android 13

Help me please :/

felipeduarte26 commented 10 months ago

I'm having the same problem Android 12+