From ce775d58e9f2c3e6e50aa84778ccc16b0d989b8a Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Thu, 23 May 2019 09:47:20 +0100 Subject: [PATCH] BLE HealthThermometerService: correct GATT characteristics As per official specification, temperature measurement requires the GATT characteristic "INDICATE" instead of "NOTIFY". Full credits to Jean-Marc Jobin (@jmjobin on GitHub) for identifying the issue and proposing this fix. --- features/FEATURE_BLE/ble/services/HealthThermometerService.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/FEATURE_BLE/ble/services/HealthThermometerService.h b/features/FEATURE_BLE/ble/services/HealthThermometerService.h index bdb7e47e1d..7c60a7cf87 100644 --- a/features/FEATURE_BLE/ble/services/HealthThermometerService.h +++ b/features/FEATURE_BLE/ble/services/HealthThermometerService.h @@ -55,7 +55,7 @@ public: HealthThermometerService(BLE &_ble, float initialTemp, uint8_t _location) : ble(_ble), valueBytes(initialTemp), - tempMeasurement(GattCharacteristic::UUID_TEMPERATURE_MEASUREMENT_CHAR, (TemperatureValueBytes *)valueBytes.getPointer(), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY), + tempMeasurement(GattCharacteristic::UUID_TEMPERATURE_MEASUREMENT_CHAR, (TemperatureValueBytes *)valueBytes.getPointer(), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_INDICATE), tempLocation(GattCharacteristic::UUID_TEMPERATURE_TYPE_CHAR, &_location) { GattCharacteristic *hrmChars[] = {&tempMeasurement, &tempLocation, };