summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bluetooth/qlowenergycontroller_android.cpp2
-rw-r--r--tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller_android.cpp b/src/bluetooth/qlowenergycontroller_android.cpp
index e2624a56..16298c96 100644
--- a/src/bluetooth/qlowenergycontroller_android.cpp
+++ b/src/bluetooth/qlowenergycontroller_android.cpp
@@ -451,6 +451,8 @@ void QLowEnergyControllerPrivate::characteristicChanged(
return;
}
+ updateValueOfCharacteristic(characteristic.attributeHandle(),
+ data, false);
emit service->characteristicChanged(characteristic, data);
}
diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
index a91f8096..67ae1872 100644
--- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
+++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
@@ -1858,6 +1858,13 @@ void tst_QLowEnergyController::tst_writeDescriptor()
const QLowEnergyCharacteristic ch = entry[0].value<QLowEnergyCharacteristic>();
QCOMPARE(tempData, ch);
+
+ //check last characteristic changed value matches the characteristics current value
+ if (i == (charChangedSpy.count() - 1)) {
+ writtenValue = entry[1].toByteArray();
+ QCOMPARE(ch.value(), writtenValue);
+ QCOMPARE(tempData.value(), writtenValue);
+ }
}
service->writeCharacteristic(tempConfig, QByteArray::fromHex("00"));