diff options
author | Juha Vuolle <juha.vuolle@insta.fi> | 2022-11-28 10:06:53 +0200 |
---|---|---|
committer | Juha Vuolle <juha.vuolle@insta.fi> | 2022-12-07 11:48:00 +0200 |
commit | 6beab27c5393920884bbb1d0fba68971ab19ca8d (patch) | |
tree | e25da630e54a946f5aedafd00cc625d2a8d0e510 /tests | |
parent | e7499c2cca615eaff3bd4c9ffe5f72d7112055cf (diff) | |
download | qtconnectivity-6beab27c5393920884bbb1d0fba68971ab19ca8d.tar.gz |
Bluez DBus peripheral add support for extended properties
Task-number: QTBUG-107511
Change-Id: Ia94262a29457489f8b7d5ffd2f5b50f943eb4b21
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bttestui/btlocaldevice.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp index 9306c482..b0c55ca7 100644 --- a/tests/bttestui/btlocaldevice.cpp +++ b/tests/bttestui/btlocaldevice.cpp @@ -957,7 +957,8 @@ void BtLocalDevice::peripheralAddServices() charData.setValueLength(leCharacteristicSize, leCharacteristicSize); charData.setProperties(QLowEnergyCharacteristic::PropertyType::Read | QLowEnergyCharacteristic::PropertyType::Write - | QLowEnergyCharacteristic::PropertyType::Notify); + | QLowEnergyCharacteristic::PropertyType::Notify + | QLowEnergyCharacteristic::ExtendedProperty); const QLowEnergyDescriptorData clientConfig( QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration, @@ -968,6 +969,14 @@ void BtLocalDevice::peripheralAddServices() QBluetoothUuid::DescriptorType::CharacteristicUserDescription, leDescriptorValue); charData.addDescriptor(userDescription); + + const QLowEnergyDescriptorData extendedProperties( + QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties, + // From bluetooth specs: length 2 bytes + // bit 0: reliable write, bit 1: writable auxiliaries + QByteArray::fromHex("0300")); + charData.addDescriptor(extendedProperties); + sd.addCharacteristic(charData); // Set another characteristic without notifications |