| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
+ 00f7f8514f3415bb68d964af18482f47c0d5c94d Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4
+ db6cd4110594abe09079ed4106d8fd30a848efa4 Bump version
+ f4c68cb2fc894f1ff5a9271637d006095c2274d1 winrt: set proper state on service detail discovery fail
+ 0bb394194aad69574b98de5b43da82b0f0a4a454 winrt: Avoid possible hang in QBluetoothServer::hasPendingConnections
+ b9502e498c1033b8334afca7808807d3b6f00926 "Fix" heartrate-server on Android
+ 76d98250d46b4afa3d83b550bd26b33021928310 Catch turned off Bluetooth adapter when stopping LE discovery
+ fd48361a193889cdc25af8aeb311acc8ad85fa26 Add location-turned-on check before starting device discovery
+ c81430b704e17d2f2eb5445e261ab3753bef3328 Ensure that a failing classic discovery doesn't prevent LE scan
+ 0c8f3eb35eead6e4db7732020d7fb2863ba3787f Grant ACCESS_FINE_LOCATION to QtBluetooth
+ a2769b323dc890def9dffaf98c768cec12eba3c0 Suppress deployment-settings files on Android
+ 0282c2fc4ae437cb4f549f25f3e748a90e64f864 Android: Ensure that LE errors are forwarded from JNI to Qt
Change-Id: I1fad98c115f7a78b96ecc7fe314166d82f52ce01
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
fixed undefined errno when compiling with clang++ and libc++
Change-Id: I30be6e2da36f9189261535f103ce689462634f49
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When using QNearFieldTarget::sendCommand on Android an exception can
occur. In this case reportError is called and handleResponse is omitted.
A call to QNearFieldTarget::waitForRequestCompleted will result in
a full usage of the specified timeout, even if the exception occurred.
To avoid this behavior also add an (invalid) response in reportError.
Change-Id: Id80b7a97da5628d229b942803ec1a2fb13536d99
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Android API that is available to write to a characteristic requires
the user to first set the new value of the characteristic and then tell
Android to write the value to the device. If the phone processes an
incoming change for this same characteristic in between the setting of
the value and the actual write, it could happen that the characteristic
gets the incoming value and that incoming value is then sent to the
connected device. Something similar could occur for the incoming change
as the received value is not passed in the callback but it is set on the
characteristic and the user is expected to read the received value from
the characteristic.
To prevent these problems, a new connectGatt function that takes a
Handler as extra argument was added to SDK v26. The callbacks are then
always executed via this handler and thus on the associated handler
thread. If the user also performs all writes on this thread, the
described race condition can no longer occur.
This could have solved the problems, but Android 8.0 contained a race
condition in the callback part because it set the value of the
characteristic before passing the callback to the handler, still
allowing the same race condition for incoming changed. This was fixed in
Android 8.1.
This commit causes the code to use a Handler and the new connectGatt
function if it is running on SDK >= 27, which is associated with Android
8.1.
For older SDK versions, a different solution is implemented. In this
case, a temporary BluetoothGattCharacteristic is instantiated that can
hold the value to be written. This way, the write can no longer
interfere with changes that are being received. To instantiate the
BluetoothGattCharacteristic, a private constructor is invoked using
reflection. This private constructor is needed as only this constructor
allows to create an instance that has the required information for
Android to be able to write to the charatceristic (such as the
associated service and instanceId). This is also the reason why this
solution cannot be used on newer SDK's as this constructor is
blacklisted and a warning box will be shown when reflection is used to
get a reference to it. Because a temporary BluetoothGattCharacteristic
is instantiated that holds the written value, it is necessary to store
the value that was written and pass that in the callback.
More information on these Android issues and solution direction can be
found here:
https://stackoverflow.com/questions/38922639/how-could-i-achieve-maximum-thread-safety-with-a-read-write-ble-gatt-characteris
https://medium.com/@martijn.van.welie/making-android-ble-work-part-3-117d3a8aee23
Change-Id: I5a9eda501a20933e37f758a3114bf71ec3e7cfd4
Reviewed-by: Thiemo van Engelen <tvanengelen@victronenergy.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
| |
Change-Id: I9ddb290a10a620334abaf0500dd7b280e86b3a03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BlueZ 5.50 adds support for this feature.
This patch was provided by David Lechner via QTBUG-81696.
Fixes: QTBUG-81696
Change-Id: I2a73b173821e36534b3848f7d0e35df16f118011
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code to detect the error existed on the Java/JNI side. The code to
handle and report the error was available on the Qt side. Unfortunately
the essential signal and slot connection was never made though. This lead
to
[ChangeLog][QtBluetooth][Android] Fixed the missing
QLowEnergyService::error() signal emission if the error was detected
on the Java side. This probably cut 50% of all errors out.
Change-Id: I6ee4d7605a1d1e61b920da56d7f67373fb7f5be5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Apparently the file name convention has slightly changed.
Change-Id: Iab220cc2350ee3a43c11a03ea76b1e2f33e53674
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Android 10(SDK v29+) all types of Bluetooth device discovery
require ACCESS_FINE_LOCATION. This is highlighted by
https://developer.android.com/about/versions/10/privacy/changes#location-telephony-bluetooth-wifi
Fixes: QTBUG-81875
Change-Id: Icaecca1f72a994dc774dc2b90194da15cc0787b0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the classic scan does not start properly we immediately error out.
If the user has requested LE discovery in addition to the classic discovery,
we should continue with LE discovery.
By convention, we only bother the user with an error signal if none of the
two methods succeed.
Task-number: QTBUG-81875
Change-Id: Id867892210fbef6da0e4937c2aef20f726ba9a2a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The location permission and a running location service have
been a prerequisite for a successful LE scan since Android v23.
While the permission has always been checked before doing a bluetooth scan, the
state of the location service was not checked. LE discovery
without location turned on does not error out. It just reports zero
discoveries.
Starting with Android SDK v29, a classic Bluetooth discovery requires
a running Location service too. Due to BluetoothAdapater.startDiscovery()
returning an error code when location is turned off, it was time to
check the location service before triggering the discovery
to simplify the error handling for the API user.
This patch ensures that location is turned on before any type of device
discovery is started and the API reports an error reflecting this problem.
Task-number: QTBUG-81875
Change-Id: Id51fd502ae24cbadbc704451fdf49d999224c16f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Calling stopLeScan() causes a runtime exception.
The patch prevents a crash due to the exception and progresses
as if nothing has happened. An action that turned off the
internal Bluetooth device has stopped a runnung discovery anyway.
Fixes: QTBUG-67482
Change-Id: Iff377884c50cafa1f74dafe73e0acbb31b13e9bb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is a workaround for QTBUG-80533. Command line applications are no
longer supported on Android. As we use the heartrate examples as test
cases for bluetooth, we work around this problem by instanciating a gui
application which fixes the compile error on Android.
Change-Id: If06767eb6ff534077f193163991d9d506c17e50e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have to unlock the mutex locker after the pending connection is
handled in QBluetoothServerPrivate::handleClientConnection. Otherwise
the application will hang, if the slot that is connected to
QBluetoothServer::newConnection calls
QBluetoothServer::hasPendingConnections as this functions also tries to
lock the mutex.
Fixes: QTBUG-81827
Change-Id: I40632d0c1e4a6cf4436f6471e5a0933c53dda9f1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
If the service detail discovery fails, we do not only have to set a
proper error but the service state also has to be set accordingly.
Task-number: QTBUG-80770
Change-Id: I6abc28875c998b60efcfc513542765a52e19df90
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
| |
Change-Id: I6761dfc3892c530212681243b41779d412435ca5
|
|\
| |
| |
| | |
Change-Id: I0c9cb5225aea489c789a4e40abd164bebff0c73d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change b7b979d1735764930cc6f736cfa8e22b71547ea8 introduced a slightly
modified version of the OrgFreedesktopDBusPropertiesInterface::PropertiesChanged
signal. This signal was taken into use in one case but all other
instances of this signal were not modified and broken.
This patch modifies the remaining cases and converts the connect statements
to function pointer syntax. This forces the compiler to check that signal
and slot parameters match.
Change-Id: I41b45f7e2f7b66ff29f321acc38ff2ce1c81864e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiemo van Engelen <tvanengelen@victronenergy.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
+ b7b979d1735764930cc6f736cfa8e22b71547ea8 bluez: Fix out of sync property cache
+ 85bbb2e2e0e87e1b935a62da0eee44004952c542 Fix a few compiler warnings in lowenergydescriptor unit test
+ 27c0ae9ff94d545fb43446179e95276112b9f2cc bluez-dbus: Invalidate btle service when it has disappeared
+ f7075bc4536c9f72663378b94df55e6beb5a86fb Fix warning in QBluetoothServer on Linux
+ 0313535fd9ccb05b60c5e421c1c986e48564e254 Android: Fix failing re-addvertisement of BTLE service after disconnect
+ b74345a74c9b009398fefaef5642570716c9c3ed Bump version
+ 8159beeeb3290dc1c1b44b5a9792e19f272ad785 Add binary compatibility files for qtconnectivity 5.14 branch
Change-Id: I9e23fef36b1d9125a4e27c7c3cf43680a2f277da
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|/
|
|
|
|
|
|
| |
Update instance of old code using JNI_VERSION_1_4 to make the code
consistent.
Change-Id: I79bf1dc18c45dbdfe6e246e396adcf856dfee63f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
BC files built against 5.14.0 added.
Change-Id: Ida4b77e83f39e69271133a11a5cdaa03ec844ad5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
| |
Change-Id: I4a234be4292f92480add8fdcbecfaeba1946afad
|
|\
| |
| |
| | |
Change-Id: I301fc10a56c4fd1aa8879064dc4c71accca4d8e0
|
| |
| |
| |
| |
| | |
Change-Id: If0ed88f30df8764649a4d5fc735fcda252eb46f4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The BTLE server can disconnect by own choice and by remotely initiated
disconnect. Often the app might want to readvertise the same service
right after the disconnect. Such a readvertisement fails when the
BluetoothGattServer instance is not recreated, before calling
BluetoothGattServer.addService(). In the case of remote disconnects
we never recreated the BluetoothGattServer instance therefore the
readvertisement always failed. This patch fixes the issue by ensureing
the previous instance is properly discarded.
Change-Id: I39380ee6f1f39bd71a5b73ec82bb786b3e199665
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In file included from qbluetoothserver_bluez.cpp:41:0:
qbluetoothserver_p.h: In constructor ‘QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol, QBluetoothServer*)’:
qbluetoothserver_p.h:128:29: warning: ‘QBluetoothServerPrivate::m_lastError’ will be initialized after [-Wreorder]
QBluetoothServer::Error m_lastError;
^~~~~~~~~~~
qbluetoothserver_p.h:125:23: warning: ‘QBluetoothServer* QBluetoothServerPrivate::q_ptr’ [-Wreorder]
QBluetoothServer *q_ptr;
^~~~~
qbluetoothserver_bluez.cpp:69:1: warning: when initialized here [-Wreorder]
QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType,
^~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I4fca28f8f2974cb6a336b6fac1e06469edceb80c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a previous existing service UUID has disapperad we will now
invalidate that service and remove it from the service list
[ChangeLog][QtBluetooth][BlueZ-DBus] Invalidate btle service when it has
disappeared
Fixes: QTBUG-77766
Change-Id: Id03a054c1f781dbcef5614623c2dae9b156d12e2
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ic77df9c81ff0b56408d2636582f976f2140708e2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 2c6dcc643, a map containing dbus property values is kept
per device to be able to make QBluetoothDeviceInfo instances without
having to make dbus calls. However, this map could get out of sync. The
reason was that the code started to listen to PropertyChanged signals
after it received the initial set of properties. This meant that there
was a short amount of time where bluez could send out a signal with
changed properties and the DiscoveryAgent would not receive it. In order
to keep the map in sync, a PropertyChanged listener is now installed
when scanning is started, picking up all changes.
Change-Id: Iae5e219b187e94bf280a6dd76ccde49cafd1d9c5
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a \class command for QNearFieldTarget::RequestId whose members
were already documented.
Remove QDoc comment marker for QBluetoothDeviceInfo::serviceUuids()
overload as its declaration in the header file is omitted by a
QT_DEPRECATED_SINCE macro.
Fix linking issues and missing parameter documentation.
Fixes: QTBUG-79814
Change-Id: I9804fcbd559f1924a2a7b16fdbdfb23398605eaa
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: Ib02a916e3258fde37aae969b73df77eb9cb7eda8
|
| |\
| | |
| | |
| | | |
Change-Id: I636a838d6b38996e2133536cbe523c3bfebf6d96
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
+ 406b18fdb3704a9e9e66cefbc74e7cff55f1947c Fix QLEAdvertisingData::setManufacturerData on Android
+ 0a5bf7a41e5c2c4a36efeace83444ceaee79c945 Add changes file for Qt 5.12.5 and fix 5.12.4 change file
+ dd4593c61e4b77c4e3b1ee516a1e8825ebb0197b Fix build errors with clang-cl on Windows
+ d3ace86011d4e34eeafa795270ac027afd54f857 Doc: Replace WinRT with UWP in Qt Bluetooth module docs
+ 7390de230e3c86049824bef756e4af623a547d61 Add descriptor even if the read fails during service discovery
Change-Id: Ief5198d3c8c927226c59fdb2b8f44dac1f428b20
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| | |
| | |
| | |
| | | |
Change-Id: I28a758b2323407cb86bd86ec3f70214a8220d779
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With Clang-Mingw the value for EADDRINUSE was not known, unless
errno.h was included.
Change-Id: I8a75a9c7b8f4578ab6c829d424d59a1c6185376b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
After the recent refactoring the writing ability was severed.
Change-Id: Ib9f116cdbbbfd87593381cb62675cab4930a2ef1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Necessary changes to be compatible with AAB changes in Qt 5.14.
Change-Id: Ie5957a7e936644f43bd320f28053466794efcaf1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: Ic9af5cb329f2fe15b74c76fc33c2beaaa5de4993
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems recent Android releases (at least confirmed for Android 9)
require location permission for classic device discovery. Previously,
it was only required for BTLE discovery.
This patch ensures the permission check is done for every type
of device discovery on Android.
Task-number: QTBUG-69615
Change-Id: I9596c083ecfd9b5e861c1aa5e9900bab5f44237f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/bluetooth/doc/src/bluetooth-index.qdoc
Change-Id: If353b4ac63c72d6f94415e1349a206ade4ceb52e
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is possible that obtaining a paired device inside the callback fails,
if the device was paired to another than the currently active bluetooth
adapter. If we do not decrement the to be detected device count, the scan
will never finish.
Change-Id: I86140d082891482c759f33888b2483f3f5821253
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
leDescriptorRead() serves two pruposes. Firstly, it informs Qt of the
value/result of the read operation. During service discovery it is also
used to inform Qt that a descriptor was found. This info is used
to build up the internal data structure representing the service, its
characteristics and its descriptors.
If we have a non-readable descriptor the read failed (as expected)
and Qt was never informed about the existence of the descriptor. During
service discovery the primary purpose is to inform about the existence
of a descriptor though.
This patch ensures the notification comes through and we accept the fact
that the passed value is not known.
Fixes: QTBUG-78201
Change-Id: Id73a27c90905cb769f1cd168b48299d580587594
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-61884
Change-Id: Idd8e3287f06f3f30102ae8e644dadec1eb8769f4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-78690
Change-Id: I9bfa89f0df938cadc9fb74bb96f24e1c4debb61a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I8d26fc7c4b7a93c4f839683feedd76cfbc1b5979
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
|
|\ \ |
|
| |\ \
|/ / /
| | _
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/qbluetoothdevicediscoveryagent_darwin.mm
src/bluetooth/qbluetoothserver_osx.mm
src/bluetooth/qbluetoothserviceinfo_osx.mm
src/bluetooth/qbluetoothsocket_osx.mm
Change-Id: I24485ae835560fa1e57007fb684f6532db3e7922
|
| |\ |
|
| | |\
| |/ /
| | |
| | | |
Change-Id: I5fe797d411844a2b3338e6700b0ae2887080550f
|
| | |\ |
|