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

monitorCharacteristicForDevice does not return any values

Open renard12 opened this issue 7 years ago • 2 comments

Hi to all so I need du subscribe to updates for battery lever for my device but monitorCharacteristicForDevice is not working I am doing something like this: ` this.manager.monitorCharacteristicForDevice(

  this.props.device.id,
  services.BATTERY_SERVICE_UUID,
  services.BATTERY_LEVEL_CHARACTERISTIC_UUID,
  (err, char) => {
    if (err) {
      return this.showModal(
        'ERROR!',
        'There is some problem with connection, device is disconnected',
        {
          buttons: [
            { text: 'Ok', action: this.disconnectWithDevice },
          ],
        }
      );
    }
    console.log(char);
  }, 'monitor_battery');

};

`

renard12 avatar Feb 11 '19 20:02 renard12

Any info on what you are testing with? Or what is available in the logs?

dariuszseweryn avatar Feb 11 '19 20:02 dariuszseweryn

Sorry, my bad, I`am doing monitor before discoverAllServicesAndCharacteristics

renard12 avatar Feb 11 '19 21:02 renard12