FlutterBleLib icon indicating copy to clipboard operation
FlutterBleLib copied to clipboard

Successive reads fail

Open egodefroy opened this issue 5 years ago • 1 comments

When reading successively, the first read is ok, the next on fails with error GATT_INVALID_OFFSET

Any idea ?

D/com.polidea.flutter_ble_lib.FlutterBleLibPlugin: on native side observed method: readCharacteristicForIdentifier
W/is.mysafeclien: Accessing hidden method Lsun/misc/Unsafe;->getLongVolatile(Ljava/lang/Object;J)J (greylist, linking, allowed)
W/is.mysafeclien: Accessing hidden method Lsun/misc/Unsafe;->getObjectVolatile(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
I/flutter: 2020-10-24 16:06:498 Error: BleError (Error code: 402, ATT error code: 7, iOS error code: null, Android error code: null, reason: GATT exception from MAC address 7E:57:B5:68:D9:52, status 7 (GATT_INVALID_OFFSET), type BleGattOperation{description='CHARACTERISTIC_READ'}. (Look up status 0x07 here https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/android-5.1.0_r1/stack/include/gatt_api.h), internal message: null, device ID: 7E:57:B5:68:D9:52, service UUID: 00000000-0000-0000-0000-aaaaaaaaaaa1, characteristic UUID: 00000000-0000-0000-0000-aaaaaaaaaaa2, descriptor UUID: null)
I/flutter: 2020-10-24 16:06:500 stackTrace 
```

egodefroy avatar Oct 24 '20 14:10 egodefroy

This might be linked: https://stackoverflow.com/a/48748100/6413439

How long is the data you're trying to receive? Have you tried requesting bigger MTU?

mikolak avatar Nov 18 '20 07:11 mikolak