I am interfacing a ble pedometer to android. when i execute the following line in my setCharacteristicNotification function i get descriptor as Null
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
Why is it returning a null value ??
characteristic.getUuid() is returning me correct value.
seems your device doesn't support this 0x2902 BluetoothGattDescriptor try to see all of your Descriptors:
for (BluetoothGattDescriptor descriptor:characteristic.getDescriptors()){
Log.e(TAG, "BluetoothGattDescriptor: "+descriptor.getUuid().toString());
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With