summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergyservice.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-03 17:52:55 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-17 13:09:35 +0000
commitb1a2de541771c6b45d46cfa6613c10f5e52ece68 (patch)
treedf023e3a73cf2ed627eccf29c479fa12004ac550 /src/bluetooth/qlowenergyservice.cpp
parenteef68dea35960670c1a1a1431d4541e1ed19c781 (diff)
Bluetooth LE: Add support for Signed Write command in the central role.
Task-number: QTBUG-41175 Change-Id: I62d74236faf9161681306d952e409e23e0cea24d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergyservice.cpp')
-rw-r--r--src/bluetooth/qlowenergyservice.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/bluetooth/qlowenergyservice.cpp b/src/bluetooth/qlowenergyservice.cpp
index c9f21c70..1e5c363d 100644
--- a/src/bluetooth/qlowenergyservice.cpp
+++ b/src/bluetooth/qlowenergyservice.cpp
@@ -255,6 +255,18 @@ QT_BEGIN_NAMESPACE
write mode. Its adavantage is a quicker
write operation as it may happen in between other
device interactions.
+
+ \value WriteSigned If a characteristic is written using this mode, the remote peripheral
+ shall not send a write confirmation. The operation's success
+ cannot be determined and the payload must not be longer than 8 bytes.
+ A bond must exist between the two devices and the link must not be
+ encrypted.
+ A characteristic must have set the
+ \l QLowEnergyCharacteristic::WriteSigned property to support this
+ write mode.
+ This value was introduced in Qt 5.7 and is currently only
+ supported on Android and on Linux with BlueZ 5 and a kernel version
+ 3.7 or newer.
*/
/*!
@@ -696,20 +708,10 @@ void QLowEnergyService::writeCharacteristic(
}
// don't write if properties don't permit it
- if (mode == WriteWithResponse)
- {
- d->controller->writeCharacteristic(characteristic.d_ptr,
+ d->controller->writeCharacteristic(characteristic.d_ptr,
characteristic.attributeHandle(),
newValue,
- true);
- } else if (mode == WriteWithoutResponse) {
- d->controller->writeCharacteristic(characteristic.d_ptr,
- characteristic.attributeHandle(),
- newValue,
- false);
- } else {
- d->setError(QLowEnergyService::OperationError);
- }
+ mode);
}
/*!