| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I8d26fc7c4b7a93c4f839683feedd76cfbc1b5979
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
|
|\
| |
| |
| | |
Change-Id: I83175151c0eef1a11d2f21648cc04c86e46777c1
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
intended to distinguish an arbitrary disconnection
from disconnection due to insufficient authorization/encryption
Change-Id: Ifcf73d0444fe6fd3a8d5d90155f3db572d6e23d1
Reviewed-by: Evgeniy Gagarin <eeiaao@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make our private controller class to inherit the shared
base as other platforms do. Rename it into PrivateDarwin.
Remove QLowEnergyController's code duplicate on Darwin.
Get rid of Darwin's copy of QLowEnergyService.
As a bonus, a number of bugs/inconsistencies were fixed
in setting the state and not emitting stateChanged.
Reduced the usage of 'isValid'.
Task-number: QTBUG-75348
Change-Id: I77495870597b61fecae8bca1617590fd9ad2def4
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QLowEnergyController ctor with localDevice overload was obsoleted
but the new API did not provide an equivalent createCentral() overload.
This patch fixes the problem.
Fixes: QTBUG-63019
Change-Id: I4c5a249bbf20c78da5507fecc874daa67e3dce46
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change enables the optional use of the Win32-based Bluetooth
backend on Windows. By default, the WinRT backend is used, if
supported by the platform. The use of the Win32 backend must be
selected by the -native-win32-bluetooth configuration option.
Task-number: QTBUG-40698
Change-Id: I6904bf077467d826e3ff5ad026ebae5f955f2e37
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ie99a67b63f8259227f42f5b464c6bbc16e79313b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we are running on a Windows version with Creators Update or newer
(>=15063) we can use new bluetooth low energy API that allows us to
do device discovery without the requirement of having paired the
device.
Instead of connecting to the device and fetching its services, we can
use UUIDs from advertisement packages to get an initial service list.
By using that approach we can get rid of the pairing process in
'connectToDevice' and replace it with 'GetGattServicesAsync' if no
services are yet available. The old behavior was kept as a fallback for
the case where the device has already been paired.
If the backend is built with an older Windows Kit or the machine
running the application does not support the new API we fall back to
the old implementation which still requires pairing.
Task-number: QTBUG-58660
Change-Id: Ice262d4d993a0119efb8b6c8fe9a21830717569f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ia5d83a88d6231984d9745d1c64f03553499a5882
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While the central role implementation properly invalidates all the
LowEnergyServicePrivate instances, peripheral mode was leaking service
instances. This is triggered when the peripheral disconnects from a client
or when the user calls disconnectService(). On the other hand
stopAdvertising() does not do that.
This patch fixes the service instance leak and ensures that the class
docs specifically state the behavior difference between stopAdvertising()
and disconnectService().
Change-Id: Ia52b141096dc1db3d0cefe3ed18c230eecccd9c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
qlowenergycontroller.cpp:295:82: warning: unused parameter 'role' [-Wunused-parameter]
static QLowEnergyControllerPrivate *privateController(QLowEnergyController::Role role)
Change-Id: I4d3d2ad1e2dbabd0101efd6294a2481491587926
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The manual override env variable was renamed. The new name is
more fitting for the use case.
Task-number: QTBUG-46819
Task-number: QTBUG-66908
Change-Id: I9202ebf3f847d5c7dcc9e3c84b060b35343dd2fd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I4e86dcfe5088b0bd5087de309c435250c76d4718
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds the ability to detect the underlying version of bluetoothd.
The bluetoothd version provides the means to decide whether the DBUS LE
API is sufficient to fullfil the QLEController requirements.
Bluez DBus LE API is usable since Bluez 5.42. Prior versions
only had experimental DBus LE APIs.
Task-number: QTBUG-46819
Change-Id: Ic047fba27c01ee40571abb0c4eb45828f4a64475
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I3a3557c6b8d565322358825d4b07c61cf6b97c9f
|
| |
| |
| |
| |
| |
| |
| | |
This patch removes repeated code patterns.
Change-Id: Ica931958b1d4072429ed197d5e44ad77670c3485
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QLEControllerPrivate objects use the same function (apart from Apple
platforms) and unit tests do not have to register those types at all
anymore.
Change-Id: I06a4a035f5a8fba9a146a3c05d1157b47c22e056
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ic2ee2a76e2da4c236415f1eb3b98ab642ee3d1fc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I63d107092e3e404f6b2c38f28d5d9b286711db77
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This utilizes the new QLowEnergyController interface and separates the
existing Bluez implementation more clearly from other platforms.
The existing addServiceHelper() class is moved out into the individual
backends to avoid compiling the class into the new dbus backend.
Change-Id: I1eea99e493958c61cb1fae830c08a3eb26bda9c3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The base class is renamed to QLEControllerPrivate and
the existing QLEControllerPrivate becomes
QLEControllerPrivateCommon.
This is necessary to re-enable Q_DECLARE_PRIVATE. The macro uses by
convention the "Private" class prefix which is currently broken
because not every implementation uses QLEControllerPrivate as
d-pointer type. This also avoids a SC/BC break in
qlowenergycontroller.h as the d-pointer remains the same and the
functions declared via Q_DECLARE_PRIVATE still return the same
type.
Change-Id: I84890b06280b2c473a4d370606d3bbc58a258eea
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I5f126fabebf36b61a25e23ddc12c4dae21156cbc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|/
|
|
|
|
|
|
| |
This permits alternative implementations selectable at runtime.
Currently this is only used by Bluez.
Change-Id: I3ddeb7f888f3b09bdc62f10d5b9a36320500f329
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
| |
Change-Id: Ica194c2568465a94d851ddeaf62ca71b33fe4464
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Unlike ConnectionError, this shall be used to mention errors
occurred due to the remote device's intent (term, power loss, etc)
Change-Id: I6918879e3918a5131841f012b2824c30b99e472d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices require the Generic Access (GAP) and Generic Attribute (GATT)
services to be defined. Otherwise they refuse a proper interaction.
This is done implicitly by Android and BlueZ. The reason why BlueZ does
not do this for QtBluetooth is because QtBluetooth sets up its own GATT
infrastructure.
Normally a QLEController in central role cannot do that via public API
as the QLEController::addService() function blocks on peripheral use
cases. This patch sets the profiles up.
In the future the feature really requires a better form of API
(beyond the above env variable) or should be enabled by default
but since we need this earlier than Qt 5.10 a more subtle
approach was chosen. For now the feature can
only be enabled if the QT_DEFAULT_CENTRAL_SERVICES was set.
Another limitation is that the characteristics of the added services
are completely static.
Task-number: QTBUG-61554
Change-Id: Id03bddb2e54cc4f0869838e13ddf281311ad3a26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DBus does not expose this information. The Bluetooth Management API
advertises the information but requires CAP_NET_ADMIN. The Management
class monitors DEVICE FOUND events and records the random bit flag
of each new device. QBluetoothDeviceDiscoveryAgent can subsequently
add this information to the internal data set.
Ultimately this makes QLowEnergyController::setRemoteAddressType
obsolete. This function was only ever required on Linux.
Task-number: QTBUG-46776
Change-Id: If10df86d332dfc7cc98b7c783eb28487c3fa9045
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
| |
Change-Id: I3aa89926c5237ee8da18b73f66f0c7a321a83c91
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, Android only provides access to a very generic connection
priority. The patch uses the minimalInterval() to determine the desired
priority. Everything below 30ms is high priority and everything above
100ms is low priority. Every other value is balanced priority.
QLowEnergyController::requestConnectionUpdate() was modified
to permit access when the controller is connected, discovered or
in the process of being discovered. The limiting factor is an
existing physical connection.
The documentation was updated to reflect Android's API limitations.
[ChangeLog][QtBluetooth][Android] Added access to BTLE connection
parameter settings.
Task-number: QTBUG-53476
Change-Id: I3e22c65bd9598296a9219463dd05f0d9fc73599d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Advertisement data and Advertisement parameter in Qt are
now connected to the Android/Java side. In addition the basic
service structure is supported.
Descriptors and char detail export are still missing.
Change-Id: I941cba5e832d76ff7beca811d08a2148367c6bf5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although this was not explicitly documented this is the behavior that
the associated heartrate example exhibits. This change ensures that it is
documented and enforced.
[ChangeLog][QtBluetooth][BlueZ] Fixed continued advertisement of
peripheral data once QLowEnergyController::disconnectFromDevice()
was called. Public documentation was added to publically state the
behavior.
Change-Id: I3678c92fbb0d12cca17cd65ef7566a3ae4b55dc2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/osx/osxbtledeviceinquiry.mm
Change-Id: Iefec1aafcb81174b0e1e257246ded08841bf3259
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-54457
Change-Id: Ib97dc769cef757a9997fa80a107ac8df4da958cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A device UUID is valid/works on iOS/macOS only: platforms where
CoreBluetooth hides addresses and generates 128-bit uuids instead.
We connect to a LE device using such a UUID. This patch adds a getter
to access a UUID of a remote device our controller works with
(similar to 'remoteAddress' method on other platforms).
Task-number: QTBUG-52690
Change-Id: I000e17bbea90c508922ac47ce5291e28d938de7c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ie6f0e1afdcd81cbd0d3c514d7f02a61109b58d1a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Adds the minimum compile requirements for the new
QBluetoothDeviceDiscoveryAgent API.
Change-Id: Idfe07bee63de9d2849ab68eb455d0be470591795
|
| |\|
| | |
| | |
| | | |
Change-Id: Id86ae2d8b9f8ebd2a37e8e5fc279916bc92d9982
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I60f7c4751cb2b1a298a22d2b6d44c1c07967e47c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As we cannot obtain any meaningful information (like bluetooth
address) or perform operations like pairing using the WinRT API
QBluetoothLocalDevice is not implemented for Windows phone.
As we assume the presence of a valid bluetooth adapter though
isValidLocalAdapter has to return true to enable the functionality.
Change-Id: I84d38852d2fa632e0e7cf72bbdd57f1b7a9707fd
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|/
|
|
|
|
|
|
| |
Document that connected/disconnected signals are unreliable on iOS/OS X
in the peripheral role.
Change-Id: Idd4b10ecdd91a85c7dfc0ec981b0a2aeab3ea8fe
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id854c4c412555722bbc01783c0768586eb3ea4ec
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-51152
Change-Id: I5e4eee324f0008291be734db7a9d984071ca57c9
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/bluetooth/qlowenergycontroller_bluez.cpp
Change-Id: I00f45a2a22a045e7836f2caeb76cc5599ced6279
|
| |
| |
| |
| |
| |
| |
| |
| | |
The private class used a member in its constructor that was only set
afterwards.
Change-Id: I19b7ca2a5048771a447d63a56ad10ad56c311e91
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Fixes a few qdoc warnings and improves the available content.
Change-Id: I286cfdeb85d3be2d100e00150efedf7645096f69
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- This is how we get at the signature resolving key:
1) On connection from a client, we read the key from the
respective BlueZ settings file (BlueZ 5 only, as I did
not manage to find out where BlueZ 4 keeps this information).
2) Also monitor the HCI traffic for key updates (due to re-pairing).
- While there is an autotest for the actual hashing procedure, the
overall feature cannot be easily tested for various reasons (there is
no signed write support in our client API, for one). However, to help
with manual testing, the server part of our autotest now exposes a
characteristic that supports signed writes.
- This feature requires a Linux kernel >= 3.7.
Change-Id: I7ede9b430de167fe1f4519eedf8670d88d79aa25
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\ \
| | |
| | |
| | | |
Change-Id: If9cf6718cbd619dd7ce38db2da274fe9d0a41fb7
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Implemented for BlueZ only.
Change-Id: I358a98bbc7499d5ce5437fb0d4672fde46c3b831
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/qlowenergycontroller.cpp
Change-Id: I28b116deb3fa87169432eb2d94b70894359a9057
|