const monitorchars = DeviceManager.monitorCharacteristicForDevice(
device.id,
"00001800-0000-1000-8000-00805f9b34fb",
"00002a01-0000-1000-8000-00805f9b34fb",
function (err, result) {
if(err) {
console.log(err)
return;
}
console.log(result);
});
console.log(monitorchars)
I am using the react-native-ble-plx
package.
I get read characteristics, read descriptors, and I am trying to write and notify props in react-native code. But, values are showing errors.
Can anyone can help to write and notify in ble-plx?
BleError: Characteristic X notify change failed for device Y and service Z
We are working on a device by using this we got services and their respective characteristics,among those characteristics we have one characteristic with notify property(isNotifiable:true,isNotifying:false) and a client characteristic configuration descriptor. now we want to make this isNotifying property value to true so that we can get some data stream from the device i refered this document ,in this there is a statement like "to set the notification value, we need to tell the sensor to enables us this notification mode. We will write to the characteristic’s descriptor to set the right value: Notify or Indicate." in ble-plx there is a method bleManager.writeDescriptorForDevice(), we tried using this but ended up with an error,
so,help me in getting the device data by making isNotifying property value true