summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QtNfc: Remove dependency on QtNetworkFriedemann Kleint2023-05-121-1/+0
| | | | | | | | | | | It does not appear to use anything from QtNetwork. [ChangeLog][Potentially source-incompatible changes] QtNfc no longer depends on QtNetwork. Change-Id: I23a71684fee760b091579e2f57eaf62d90a4743a Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* BlueZ: remove unused variablesIvan Solovev2023-05-052-3/+0
| | | | | | | | | The localAdapter variable is a leftover from the BlueZ4 support. The remoteDevicePath variable was never used. Pick-to: 6.5 Change-Id: I93a691627467700cc01d2ee372a5d8e661083cd4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtBluetooth: use public QPermission API to check for permissions on AndroidIvan Solovev2023-05-0310-67/+30
| | | | | | | | | | | | | | Now when we have the fine-grained public QBluetoothPermission API, we can use it to check for permissions in the Android implementation. Adapt QtBluetooth examples to use only the minimal required set of permissions. As a drive-by: fix a couple of qCWarning() strings. Task-number: QTBUG-109964 Change-Id: I55c67bcae27926e76bf9c1a8a9367af2b58883ff Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove Unnecessary Q_DECLARE_METATYPE(QJniObject)Amir Masoud Abdol2023-04-242-6/+0
| | | | | | | | | | | This doesn't seem to be necessary anymore. Maybe it was at some point, Removing them, even without moving it to qtbase doesn't cause any problems either. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Id9a62f23aba355e2e37f70a374aa20c48ce4ef83 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QtBluetooth: do not request permissions on AndroidIvan Solovev2023-04-053-14/+17
| | | | | | | | | | Expect it to be done on the application side. The library only checks for the needed permissions. Task-number: QTBUG-109964 Change-Id: Ibb6b756ddea13c14a4c096d200418923e9ccd69c Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* [Darwin] Fix LE controller initializationJuha Vuolle2023-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | Peripheral applications don't work properly due to permission-related initialization changes. The underlying CBPeripheralManager was instantiated only when startAdvertising() was called, which can be too late; the peripheral manager is needed already earlier if the application calls addService(). Calling addService() before startAdvertising() is not mandatory though, and hence the lazy initialization needs to be attempted in both functions. Amends ae1a1f5efce291f613a13757ff6f744fcca2d2ce Task-number: QTBUG-112215 Change-Id: I7771a2e1bd951093e33030546e5da69538c8dcd1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QBluetoothUuid - add platform-specific conversion functionsTimur Pocheptsov2023-04-033-0/+57
| | | | | | | | | | | | | Namely: fromCBUUID and toCBUUID, similar to fromNSUUID and toNSUUID that we already have. [ChangeLog][QtBluetooth] Add CoreBluetooth-specific conversion to QBluetoothUuid class, to get CBUUID out of QBluetoothUuid and convert CBUUID to QBluetoothUuid. Fixes: QTBUG-112303 Change-Id: I4ca0b13395b4346f7c830a0e042a16f976998a33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove redundant checks on Darwin LE controllerJuha Vuolle2023-04-031-28/+2
| | | | | | | | Checks are already done at base or the public class Pick-to: 6.5 Change-Id: Idf5ae08cb34fa1293de8f270c8980799866a8b08 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Exclude source files from unity buildAmir Masoud Abdol2023-04-031-0/+4
| | | | | | | | | | | When building with Unity, Windows Bluetooth symbols from WIN32/COM and more modern WinRT APIs, e.g., AsyncStatus, start to confuse the compiler as related source files start to be pooled together. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I3d59f09caca3e56b6961fb6ffcdf8233369313d2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* HeartRate Game example: do not show duplicated devicesIvan Solovev2023-03-291-1/+4
| | | | | | | | | | | | The deviceDiscovered() signal can be emitted more than once for the same device, so implement a check before adding a device. This commit amends a1f43b9dcd722527d52ceb0c7a138bd2994c1a7b Task-number: QTBUG-111972 Pick-to: 6.5 Change-Id: Iff0a2b301d6d05090745ef97cedf5fab4532da7e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* HeartRate Server: revamp the exampleIvan Solovev2023-03-281-1/+1
| | | | | | | | | | | | | | | | | Some code clean-ups: * Use qt_standard_project_setup() and PRIVATE linking in CMake * Port away from QScopedPointer and use std::unique_ptr instead Documentation updates: * Add Connectivity category * Mention the new BlueZ D-Bus backend in the documentation * Small wording improvements * Provide more links to Qt classes and enums Task-number: QTBUG-111972 Pick-to: 6.5 6.5.0 Change-Id: Id2a0ef48d3ce82f1784dd4b51f94236731730432 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Windows: optimize BTLE device discoveryIvan Solovev2023-03-271-19/+22
| | | | | | | | | | | | | | | | | | | | | Previously we were doing full service discovery every time when the BluetoothLEAdvertisementWatcher reports a new advertisement. This results in a very high CPU usage during BTLE device discovery on some configurations. In practice such approach might not be needed, because most BTLE devices repeatedly advertise the same data. With this patch we do a detailed service discovery only when a new device is added, or when the list of advertised services has changed. Note that we still need to handle all the incoming advertisements, because we want to report changes in other parameters, such as RSSI. Fixes: QTBUG-111116 Pick-to: 6.5 6.5.0 6.2 Change-Id: I0863739a2fb21d04e9a728adc68e3f197f1966e3 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove PingPong exampleIvan Solovev2023-03-222-4/+0
| | | | | | | | | | | | The example contains a lot of rather complicated code, which is not directly related to the demonstrated Bluetooth features. Remove it in favor of BtChat example, which demonstrates the same Bluetooth features in a much more compact and understandable way. Task-number: QTBUG-111972 Pick-to: 6.5 6.5.0 Change-Id: Iccb2598fa6e88816697286b2252858f35a635ee5 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* BtScanner example: move to manual testsIvan Solovev2023-03-212-4/+0
| | | | | | | | | | | | | | | | | | | | | | | The example mostly shows the usage of QBluetooth{Device,Service}DiscoveryAgent classes, which is also illustrated by other examples. Move it, because it's not fully functional on mobile platforms (because it's widget based). Do not remove it completely, because it might still be useful for doing Classic device scan. Also implement some improvements while on it: * fix CMakeLists.txt by using qt_standard_project_setup() and PRIVATE linking * fix memory leak in DeviceDiscoveryDialog * rework the code to use Qt parent-child model instead of manually deleting objects where possible * fix includes * fix forward declarations Task-number: QTBUG-111972 Pick-to: 6.5 6.5.0 Change-Id: Ie4bc9e25ccdda6d5f5de2f57528df349c71cdc12 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* QtBluetooth: port the code to the new permissions API (CoreBluetooth)Timur Pocheptsov2023-02-246-68/+48
| | | | | | | | | | | | | | | | | | | | | We only _check_ if permissions were granted, leaving it up to an application to _request_ permissions. If permission status is not 'Granted', we bail out ealy setting MissionPermissionsError. QLowEnergyController::init is now a no-op for Darwin, because it's OK to create a peripheral/central and no need to set any error yet. Autotests require minor adjustments - they were already passing if BT is off, as it is on CI (checking Bluetooth local device and its status), but if BT is somewhere on, tests can try to scan or connect not having permissions granted - for this we adjust the tests, using permission API. [ChangeLog][Important Behavior Changes][QtBluetooth][Darwin] Do not request permissions implicitly, only check them and leave it to applications to request permissions explicitly. Task-number: QTBUG-109964 Change-Id: I95c04744e979614ffb6d992da2e279e86b272679 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* SDP scanner: encode input URLs and escape XML-specific charactersIvan Solovev2023-02-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old implementation didn't take care of escaping the XML-specific characters and didn't handle non-printable characters. This patch makes use of QUrl class to properly %-encode the input data. The QUrl::toEncoded() method %-encodes all XML-specific characters except '&', so we need to manually replace it with "&amp;" before adding the url to the generated XML. Escaping special XML characters potentially allows Qt Bluetooth to handle more URLs received from sdpscanner, because QXmlStreamReader discards attributes with unescaped special characters, so previously part of the URLs could be silently skipped. For other potential sdpscanner users this change shouldn't make much difference, because they should anyway parse the returned XML documents according to XML standard. %-encoding of URLs potentially changes the way the URL looks for the user, but not for the software that should handle the URLs, so this change is also safe. [ChangeLog][Qt Bluetooth][sdpscanner] sdpscanner now %-encodes the URLs and escapes all XML-specific characters in them before adding the result to the generated XML output. Fixes: QTBUG-111369 Pick-to: 6.5 6.4 6.4.3 6.2 5.15 Change-Id: I6de080fef7689ef96fe5e5e26c62a3c48ebc45b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* sdpscanner: fix potential unwanted truncation for SDP_TEXT_STR{8,16,32}Ivan Solovev2023-02-181-1/+3
| | | | | | | | | | | | | | | QByteArray::resize() treats all negative parameters as a request for a zero length. So the code text.resize(text.indexOf('\0')); can completely erase the text if there is no '\0' in it. Fix it by explicitly checking the return value of QByteArray::indexOf(). Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Idc42bf4b96a9be5b007916263d6cf1e831b96c07 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* sdpscanner: fix URL processingIvan Solovev2023-02-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Do not use the fixed-size temporary buffer, instead just parse the data as a QByteArray. Grepping through BlueZ sources, I could find only several usages of SDP_URL_STR{8,16,32}, and all of them suggest that the url is simply a NULL-terminated string (see [0], [1], [2]). However, the older BlueZ sources suggest that the url can be not NULL-terminated as well (see [3]). To be on a safe side, we provide an implementation that handles both cases correctly. [0]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/lib/sdp.c#L465 [1]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/src/sdp-xml.c#L351 [2]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/tools/sdptool.c#L517 [3]: https://android.googlesource.com/platform/external/bluetooth/bluez/+/master/src/sdp-xml.c#324 Fixes: QTBUG-111242 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I22f9521582863fb316dd0b2c49a78928b80a6078 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QBluetoothUuid: remove quint128 supportThiago Macieira2023-02-154-41/+40
| | | | | | | | | | | | | | | | Only kept for in removed_api.cpp for binary compatibility. [ChangeLog][QtBluetooth] The undocumented quint128 was removed from QtBluetooth. This affects the QBluetoothUuid constructor and the toUInt128() method. QUuid has support for an integer quint128 on certain 64-bit platforms (all except MSVC) with a constructor and a getter of the same name, so this change is mostly source-compatible, so long as the application code doesn't attempt to treat this type as a structure. For cross-platform support, use QUuid::Id128Bytes. Change-Id: Id8e48e8f498c4a029619fffd1728c34931ac525e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Bluez LE: use QUuid's ability to select the byte orderThiago Macieira2023-02-133-66/+9
| | | | | Change-Id: Id8e48e8f498c4a029619fffd1728c8facac724fd Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Bluez LE: store the little-endian data in the temporary listsThiago Macieira2023-02-131-5/+6
| | | | | | | | | This will simplify the operation when QUuid::toBytes supports selecting the endianness. Change-Id: Id8e48e8f498c4a029619fffd1728c8e666dbc087 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Bluez LE: improve detection of 16-bit UUIDThiago Macieira2023-02-131-19/+12
| | | | | | | | | | minimumSize() and toUInt16() need to perform the same check, so do it only once. And make one function call the other, to avoid repeating oneself. Change-Id: Id8e48e8f498c4a029619fffd1728c8f415f36045 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QBluetoothUuid: switch from quint128 to QUuid::Id128BytesThiago Macieira2023-02-1314-63/+63
| | | | | | | | | | | | This is now supported by the QUuid class directly instead of being an invention of QBluetoothUuid on top. Additionally, as a trivial structure of 16 bytes in size, it should be passed by value, not by const-ref. The BluezUint128 type is used where the 128 bits of data aren't a UUID (like the Connection Signature Resolving Key). Change-Id: Id8e48e8f498c4a029619fffd1728c1af9149a561 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* iOS NFC: Always ensure timeout after session invalidationJulian Greilich2023-02-032-41/+61
| | | | | | | | | | | | | | | iOS needs some time after invalidating a session before a new session can be started. Otherwise the NFC dialog of iOS will not show up. For restarting a session inside the iOS NearfieldManager, this was already solved with a timeout of 2 seconds. This commit fixes the case, that a user of the Nearfieldmanager restarts a session manually too fast. Pick-to: 6.5 6.4 6.3 6.2 5.15 Change-Id: Ic91ad225a9cab13ba92523f33a19f44af68575a0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove explicit Android SDK jar versionJuha Vuolle2023-02-022-6/+2
| | | | | | | | | | The versions were too old to begin with (minimum is 23) and perhaps better use the default to begin with. Pick-to: 6.5 Change-Id: Ie5c502001c4c4c59da091e7fbf899e4a5234034c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Replace deprecated BT LE methods on Android API 33: descriptorsJuha Vuolle2023-01-266-16/+77
| | | | | | | | | | | The overarching theme for these API deprecations is to improve memory safety. This patch replaces the descriptor related APIs. Pick-to: 6.5 Fixes: QTBUG-107180 Change-Id: Ief098d67d2601e06a2f29fa38d9b481bbda605f9 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Replace deprecated BT LE methods on Android API 33: characteristicsJuha Vuolle2023-01-264-27/+98
| | | | | | | | | | | | | | | | | | | | | | | The overarching theme for these API deprecations is to improve memory safety. This patch replaces the characteristic related APIs. The list of deprecated APIs, addressed by this and the followup commit: * BluetoothGatt::writeCharacteristic() * BluetoothGatt::writeDescriptor() * BluetoothGattCharacteristic::getValue(), no replacement * BluetoothGattCharacteristic::setValue(), no replacement * BluetoothGattDescriptor::getValue(), no replacement * BluetoothGattDescriptor::setValue(), no replacement * BluetoothGattCallback::onCharacteristicChanged() * BluetoothGattCallback::onCharacteristicRead() * BluetoothGattCallback::onDescriptorRead() * BluetoothGattServer::notifyCharacteristicChanged() Pick-to: 6.5 Task-number: QTBUG-107180 Change-Id: I054db07301038ceb56b8af8471d71309d61ae777 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Catch broadcast receiver unregistration exception on AndroidJuha Vuolle2023-01-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Reproducing the issue reliably has proven to be near impossible, but the stack trace can be seen every now and then, and it does not seem to cause any functional harm. The strong suspicion on what happens is that in some places of the code we create a temporary QBluetoothLocalDevice object to check for example address(). This happens for example when creating a QLowEnergyController object, which is one of the scenarios I recall seeing the unhandled exception. The localdevice creation triggers broadcast receiver registration, and the ~immediate destruction triggers unregistration. Reading the address() works as it does not rely on any broadcast events. It seems plausible that in some cases the registration is not yet fully complete on Android side when the unregistration is ~immediately called. Pick-to: 6.5 Fixes: QTBUG-106938 Change-Id: Iac734f17fb9d2a1879fca39d9b2839cb530e5df5 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Fix CMake Unity (Jumbo) buildFriedemann Kleint2023-01-252-5/+6
| | | | | | | | | Remove clashing string constants. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I44c89cbc58fcc2e2ae33d23acd541eaba1a5a288 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Proper clearing of WinRT factory cache in QtBluetoothMarc Mutz2023-01-232-0/+2
| | | | | | | | | | | | | | | Because we include <winrt/base.h>, use the factory-cache-cleaner registration developed in qtbase/ffb9dee1b0954e4d4f9e9791175609a80ecafc31 to make QtBluetooth contribute its part to fixing QTBUG-103611. Including the qfactorycacheregistration_p.h header from another header is explicitly supported (inline variable). Pick-to: 6.5 6.4 6.2 Task-number: QTBUG-103611 Change-Id: I1f21a7001a3eea88ddc5ba647c72c3dd22c69374 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Android LE Peripheral: properly update characteristic and descriptor local ↵Ivan Solovev2023-01-181-0/+4
| | | | | | | | | | | | | | | | values Android backend did not update the serivice's characteristic and descriptor values after executing writeCharacteristic/writeDescriptor. As a result, the connected central saw the correct updated value, while local request still returned the old value. This patch fixes it by properly updating the local values when the write operations complete successfully. Pick-to: 6.5 Change-Id: Ie09299b6c72bbf92ab6c824c3ca23f0136f0457e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Don't clear the remoteDevice address in resetController()Juha Vuolle2023-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | The Bluez DBus peripheral role support cleared the remoteDevice so that the QLowEnergyController::remoteAddress() will return empty after disconnection. However the resetController() is also called in client role connectToDeviceHelper(), and by reseting the remoteDevice address there, the controller won't find the remote device path and connect will fail. Instead clear the remoteDevice address in places specific to the peripheral role. Amends: e7499c2cca615eaff3bd4c9ffe5f72d7112055cf Pick-to: 6.5 Change-Id: I53a0de157873e95b9e832f67a24d902277f233a1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QLowEnergyController Windows: fix UI hangs during discovery on disconnected ↵Ivan Solovev2023-01-172-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paired devices Commit 0b60ca266f0fe27053a58eff3dbd903e3a1678ca introduced Close() calls for GattDeviceService objects. IIRC, it was done to avoid potential GattCommunicationStatus_AccessDenied errors, which could otherwise happen when trying to re-acquire the non-closed service. This commit does the proper cleanup when the device is disconnected. However there is one corner-case: when we try to connect to a paired device which is turned off, Windows provides its services (using some cached data), but the service details discovery fails. The details discovery is executed in a background thread using a set of async calls. If the user disconnects from the device during this discovery, the GattDeviceService::Close() call for the respective service will block until the async operation fails (which takes a couple of seconds on Windows 11). As a result, the UI thread freezes for this time. This patch is an attempt to avoid it by shifting the Close() call to the background helper thread in such cases. If there is an error during details discovery, or if it just takes too long, and the user decides to disconnect from the device, the service will be closed directly in the helper thread. However, if the details discovery is completed successfully, the GattDeviceService object can still be re-used for other operations, and it will not be deleted from cache until the device is disconnected. Fixes: QTBUG-108461 Pick-to: 6.5 6.4 6.2 Change-Id: I8ebe945130808ed7bd8852a76bba84c73651f5a5 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* QWinRTLowEnergyServiceHandler: optimize behavior at disconnectIvan Solovev2023-01-171-8/+29
| | | | | | | | | | | | | | | | | | | | | | The QWinRTLowEnergyServiceHandler helper class is used to query low energy service details. It works in a background thread and performs multiple async operations to get the results. As the class works in a background thread, we use QWinRTFunctions::await() to wait for the results of async operations. This allows to simplify the code. In practice the user might want to disconnect from the device while service details discovery is performed. Previously the background thread was still performing all the requests. This patch handles the already-existing QLowEnergyControllerPrivateWinRT::abortConnection() signal and provides the exit condition to all QWinRTFunctions::await() calls, so that the background thread does not do unnecessary work. Task-number: QTBUG-108461 Pick-to: 6.5 6.4 6.2 Change-Id: I1db05c906beb0078de8a00fd5e32d589306f6665 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Install android jars to INSTALL_DATADIRFab Stz2023-01-162-2/+6
| | | | | | | | Task-number: QTBUG-106533 Pick-to: 6.5 Change-Id: I5b09d882230ba6b996f5edc5ac4502d0bc004525 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Purge mentioning of Technical Preview from the Bt LE overviewAlex Blasche2023-01-111-5/+3
| | | | | | | | | | The various versions do not matter anymore as current Qt Version are long past the mentioned versions. Pick-to: 6.5 6.4 6.2 Change-Id: I285785eb64a82cacdd853380312e4810ec907c1c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* Fix the naming of the BlueZ packageAlexey Edelev2022-12-231-1/+1
| | | | | | | | | | Adjust variable names to be case-sensitive. Pick-to: 6.5 6.4 6.2 Fixes: QTBUG-109315 Change-Id: I7d534fbfd7891740fbc8ac172b24a2b03832388b Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Add more error replies to BlueZ DBus callsJuha Vuolle2022-12-201-3/+20
| | | | | | | | | | | | | | This commit adds error message for unauthorized writes. This may occur if peripheral has set "authorize" flag for char/desc, and the client device is not trusted. In addition the commit sets a more appropriate DBus error for invalid offset errors. Task-number: QTBUG-107511 Pick-to: 6.5 Change-Id: I2e477dd77135e95100ef0cca814a6416df27c2b0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Add error replies to bluez peripheral adaptor functionsJuha Vuolle2022-12-086-36/+108
| | | | | | | | | These are Qt functions that BlueZ invokes over DBus, and in some circumstances an error reply is needed. Task-number: QTBUG-107511 Change-Id: If325621d12600990e86fe07681aabfba8adc9056 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bluez DBus peripheral add support for extended propertiesJuha Vuolle2022-12-072-7/+24
| | | | | | | Task-number: QTBUG-107511 Change-Id: Ia94262a29457489f8b7d5ffd2f5b50f943eb4b21 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add Bluez DBus peripheral role supportJuha Vuolle2022-12-0717-78/+1343
| | | | | | | | [ChangeLog][QtBluetooth] Add support for Bluez DBus peripheral role Fixes: QTBUG-107510 Change-Id: I1c26606ff0b01818c6f446147e005090582ba877 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add DBus adaptors for Bluez DBus peripheral role supportJuha Vuolle2022-12-0710-0/+685
| | | | | | | | | | This is a preparatory commit for adding the Bluez DBus peripheral role support. Task-number: QTBUG-107510 Change-Id: I27860947c3f94fa0cc4d2af0ce90ab3c0f2287eb Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bluez DBus advertising support (BT LE)Juha Vuolle2022-12-0712-47/+444
| | | | | | Fixes: QTBUG-107509 Change-Id: I6e26cbc0502cdc65eb6af20bfeb481f0b62ff386 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add Bluez DBus peripheral role XML definitionsJuha Vuolle2022-12-0711-0/+462
| | | | | | | | | | | A preparatory task for implementing Bluez DBus peripheral role support. This commit introduces the bulk of the needed interfaces; further manual adjustments are likely needed in the followup commits. Fixes: QTBUG-107506 Change-Id: I5152002746db3b6ffc20981f34a34bbe13880b2f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add Bluez DBus peripheral role selection supportJuha Vuolle2022-12-073-6/+64
| | | | | | | | | A preparatory commit for adding Bluez DBus peripheral role support. Fixes: QTBUG-107508 Change-Id: Ifa2b12df9856011048a9bc311e5da96275700f5e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* PCSCLite: fix capitalization of Find-module fileMårten Nordheim2022-12-051-1/+1
| | | | | | | | | | This fixes an issue where, upon reconfiguring, the package would not be looked up again (a side-effect of an optimization where we avoid looking up packages that have not been found). This lead to a "force feature ON breaks condition" error. Change-Id: I0be1bd6dd83186fe462d2dda9dbd93dfa372629a Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* QBluetoothUuid: simplify one attribute creationThiago Macieira2022-11-281-1/+1
| | | | | | | QUuid can create ID128 strings on its own. Change-Id: Id8e48e8f498c4a029619fffd1728938a1b70e4a0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtNfc: Replace snippets with actual codeIevgenii Meshcheriakov2022-11-181-5/+42
| | | | | | | | | The snippets in the NFC overview page refer to the ndefeditor example that is about to be completely replaced. Task-number: QTBUG-103949 Change-Id: Ie0b42b36f82b58f680a5a355f79e04e0422e32c9 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Doc: Fix BlueZ license to GPL-2.0-onlyKai Köhne2022-10-181-1/+1
| | | | | | | | | GPL-2.0 is deprecated in SPDX. This also fixes an issue with qtattributionsscanner in latest qttools. Pick-to: 6.4 Change-Id: I462b6c23ffaf1cbafcfd7feadc12f99ddbe797e5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove unused and redundant table row in documentationJuha Vuolle2022-10-141-7/+0
| | | | | | | | | | The row has been empty since its introduction and even if used, wouldn't provide very useful information (other rows imply the support) Pick-to: 6.2 6.4 Fixes: QTBUG-107196 Change-Id: I3e3ca4e6c446707772a24fc6b3ea000e4b889fdf Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>