I have purchased a BLE thermometer and developing an android app to read the temperature. I installed nRF connect and was able to see the BLE device listed with all its services. The temperature measurement characteristic is marked as Indicate. I don't seem to find how to get this indicate in nRF. Nothing happens when I read the temperature using the BLE device. This temperature is not reflected in nRF logs.
I developed an android app and was able to scan this BLE device, connect to it and enable indications. But the onCharacteristicChanged never gets invoked when I measure the temperature using the BLE device. My code is below.
private final UUID temperatureServiceUuid = UUID.fromString("00001809-0000-1000-8000-00805f9b34fb");
private final UUID temperatureMeasureUuid = UUID.fromString("00002A1C-0000-1000-8000-00805f9b34fb");
private final UUID temperatureDescriptorUuid = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");
public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled) {
mBluetoothGatt.setCharacteristicNotification(characteristic, enabled);
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(temperatureDescriptorUuid);
mBluetoothGatt.writeDescriptor(descriptor, BluetoothGattDescriptor.ENABLE_INDICATION_VALUE);
}