summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-09-05 10:49:44 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-08 14:40:25 +0200
commit225dd8128133236c73b86e6a933f45ac4cf92867 (patch)
tree63c2cbadaf705ab83bc9e929e24e407cc68e6242 /tests
parent5ec215a6cf1046846c0f5f0dd948502fdff45ff4 (diff)
Support writing of long characteristic values
In this context long means the characteristic value is longer than the maximal ATT message size. In such cases the Bluetooth spec demands a combination of PrepareWrite commands finished by an ExecuteWrite. This is very similar to reliable writes which use the same combination of prepare/execute but permit the atomic writing of multiple characteristics at the same time. Reliable writes are not (yet) supported by the public API. Also, this works for characteristics only. Long descriptor writes will follow. Change-Id: Id139ad1848c92ca5ebf1bd1dfe8e3da297312d4f Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
index 84223c91..b5e9dd31 100644
--- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
+++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
@@ -67,9 +67,8 @@ private slots:
void tst_concurrentDiscovery();
void tst_defaultBehavior();
void tst_writeCharacteristic();
+ void tst_writeCharacteristicNoResponse();
void tst_writeDescriptor();
- void tst_writeDescriptorNoResponse();
-
private:
void verifyServiceProperties(const QLowEnergyService *info);
@@ -113,6 +112,7 @@ void tst_QLowEnergyController::initTestCase()
return;
}
+
devAgent = new QBluetoothDeviceDiscoveryAgent(this);
QSignalSpy finishedSpy(devAgent, SIGNAL(finished()));
@@ -1847,7 +1847,7 @@ void tst_QLowEnergyController::tst_writeDescriptor()
Tests write without responses. We utilize the Over-The-Air image update
service of the SensorTag.
*/
-void tst_QLowEnergyController::tst_writeDescriptorNoResponse()
+void tst_QLowEnergyController::tst_writeCharacteristicNoResponse()
{
QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices();
if (localAdapters.isEmpty() || remoteDevice.isNull())
@@ -1932,8 +1932,6 @@ void tst_QLowEnergyController::tst_writeDescriptorNoResponse()
}
// 4. Trigger image identity announcement (using traditional write)
-
- QByteArray imageAValue, imageBValue;
QList<QVariant> entry;
bool foundOneImage = false;