react-native-ble-manager icon indicating copy to clipboard operation
react-native-ble-manager copied to clipboard

BleManager.read doesn't work if the characteristic has a descriptor

Open ciuliene opened this issue 6 years ago • 0 comments

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

  1. Connect to a device
  2. Call BleManager.retrieveServices function
  3. Identify which service has a characteristic that has a descriptor
  4. 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

ciuliene avatar Feb 24 '20 16:02 ciuliene