From 5be8b3d9273afcd41c6c60e6f6d2dfd5cd8b30e3 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 1 Apr 2015 17:17:22 +0200 Subject: Always read/write the GATT hardware even if meta data reports otherwise It is possible that a ATT attribute is not readable or writable. Usually this is reported via descriptors or other types of meta data. However it is possible that the meta data is reporting the wrong information. Therefore we always ensure that every read and write request is forwarded to the hardware. It is up to the hardware to respond to such requests. This change keeps the device usable in cases of buggy device meta data. This only affected writeCharacteristic() calls. Change-Id: Ieb2b95f47aa51c86a8ae7c4bebed4043d7478874 Reviewed-by: Alex Blasche Reviewed-by: Timur Pocheptsov --- tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index 7e96c204..5d7339a7 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -1801,8 +1801,8 @@ void tst_QLowEnergyController::tst_writeCharacteristic() QTRY_VERIFY_WITH_TIMEOUT(!errorSpy.isEmpty(), 10000); QCOMPARE(errorSpy[0].at(0).value(), - QLowEnergyService::OperationError); - QCOMPARE(service->error(), QLowEnergyService::OperationError); + QLowEnergyService::CharacteristicWriteError); + QCOMPARE(service->error(), QLowEnergyService::CharacteristicWriteError); QCOMPARE(writeSpy.count(), 0); QCOMPARE(dataChar.value(), QByteArray::fromHex("3f00")); -- cgit v1.2.3