react-native-ble-manager
react-native-ble-manager copied to clipboard
BleManager.read doesn't work if the characteristic has a descriptor
Version
Tell us which versions you are using:
- react-native-ble-manager v6.7.0
- react-native v0.61.4
- iOS/Android v7.0
Expected behaviour
Tell us what should happen
I would like to get the characteristics of a device and read the characteristic value (obviously when the READ property is enabled)
Actual behaviour
Tell us what happens instead
When I read a characteristic with no descriptor everything works fine, instead if a characteristic has a descriptor, the BleManager.read return this message: 'Error reading XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX status=1' The XXX is the UUID that returns me when I try to read
Steps to reproduce
- Connect to a device
- Call BleManager.retrieveServices function
- Identify which service has a characteristic that has a descriptor
- Call BleManager.read(peripheral.id, serviceUUID, characteristicUUID)
Stack trace and console log
Hint: it would help a lot if you enable the debugger ("Pause on exceptions" in the "Source" panel of Chrome dev tools) and spot the place where the error is thrown