Shahzore Qureshi • about 12 years ago
Android - Unable to Enable Detection Notification
I was able to successfully send the verification key to the button, which allows my application to stay connected to it for more than five seconds. I was also able to write to the detection configuration characteristic and set the bitmask to 0x01 (enable short click detection). However, I am unable to enable the detection notification via Client Characteristic Configuration. Perhaps I am using the wrong UUID because I get invalid error messages. Here is a snippet below:
mBluetoothGatt.setCharacteristicNotification(characteristic, enabled);
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(
UUID.fromString(SampleGattAttributes.VSN_CHARACTERISTIC_DETECTION_NOTIFY));
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
mBluetoothGatt.writeDescriptor(descriptor);
//VSN_CHARACTERISTIC_DETECTION_NOTIFY = "fffffff4-00f7-4000-b000-000000000000"
EDIT:
Problem solved. I was able to make this work by using the following UUID for VSN_CHARACTERISTIC_DETECTION_NOTIFY:
"00002902-0000-1000-8000-00805f9b34fb"
Comments are closed.

0 comments