| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Id38ad00f5d7c8de2817c27efc33fc69c1092b002
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Ib502cabf2aa68490de17fbf759e3d3864f4986e5
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Iac27177d365880bd5f14e93c4cd109231e9b090c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The characteristics read was using IAsyncOperation->put_Completed() to
process the results of descriptor reading. Each of these completed
callbacks is executed in its own thread. In our case each of the
callbacks is also calling QWinRTFunctions::await() to perform some
async operations.
As a result, if the service has a lot of characteristics, we could
end up spawning multiple threads, each of them doing some CPU-consuming
operations. Normally it's not a problem, but looks like for some
bluetooth peripherals reading the characteristics can take significant
time. Connecting to such devices can result in 100% CPU load for all
cores if the number of characteristics exceeds the number of logical
CPUs.
This patch removes the put_Completed() approach in favor of another
QWinRTFunctions::async() call. This will guarantee that all the
characteristics read operations are performed in the same worker
thread. As a drawback, characteristics reading becomes sequential,
which makes it slower.
Fixes: QTBUG-97242
Change-Id: I0d641b8c65e628bb09a26380f5b12ba2582f210e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 2a7ef291d696745887e71f8b0e27cb4c8701bdd2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I09162f09640d75ab73bd801a41a761cc882fa1c2
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I5bfe9ee0c6e8df953b0c44d8563eb7981cd6ddfa
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Qt Bluetooth requires QGuiApplication in certain cases,
make sure that this is covered by the module docs.
Task-number: QTBUG-86796
Change-Id: Ib7918321b84ae51b436d2e47921e3de6d6736ad3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 8a1b1ac7f694f50f75a56a1d10f204e66e62ea76)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I9574edb5aaeb25bbfabd0b18445d52c5fc33152b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I124a73aa3b5becde4cc7b10c3da4470142c61bf0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds support for control devices writing characteristic
values that are larger than the MTU. For instance if MTU payload is
20 bytes, the writes to a 40 byte characteristic will be split in
2 consecutive writes.
With this commit these writes are recorded at the server device
(peripheral) end, and later applied.
Task-number: QTBUG-96688
Change-Id: I43c261c9ea39cca7c744af3222959c85a57ba11d
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 38562c2ba5c3d25127e1a845da673299b40a6473)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I71aba7e3ac9e45984ffc2540bb1bdce9bbf09a5c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I3a5f020a88e819198956ae89382fc585309ca3c4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a separate worker that will do all the system calls in a
separate thread and emit a signal once it's done.
This will allow to avoid the crashes caused by disconnectFromDevice()
being called while connection is still in progress and spinning in the
QWinRTFunctions::await() method.
Basically this patch moves the connection code to a separate worker,
and introduces new macros to handle the errors.
It also makes use of the new early return condition of
QWinRTFunctions::await() that was introduced in
1f86957f1dd14cc538e7ad9ffee4eb63001af407.
As a drive-by: increased the characteristics read timeout, because
the initial one was not always enough even for a turned-on device.
Apart from that this patch also solves some other issues and crashes
that could happen due to async nature of some calls. For example:
- handle the fact that service discovery might finish after the
device was disconnected. No need to notify about discovered
services in this case.
- add missing checks for thisPtr != nullptr in some callbacks that
capture thisPtr.
Task-number: QTBUG-96057
Change-Id: Ia2d044a89e3427a53d0879e045b6230d16bac3ce
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a00ffdfc3569a5741bc42739570dea2ec52b7f0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Id60643cbe800b446e3e90ae6f229ffc88b1c51c2
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
| |
Change-Id: I9795a680a32178ff52edc4854ae45c2f736a7210
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I8c9f73703979ab2c97649a3d4b006c372ec72be6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
Current value should be empty to reflect the branch status.
Change-Id: Ife8bbd9f3c3ab625eb9900189151705a0c602281
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit e6d7342681d6d9cdad0d76dbc1c746d03260955e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Iefadaeb43a97dd04700a1091ea6a5c5bdcadf011
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I6d857339270474f618fffba7d05a4afe096488ab
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I8d01c4be80ab5f1763509ead89a560ef3a9e63ec
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I4d3d082081d8c36a30058167bf19611b23ef3827
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I645b0fb1e7e860a28263bffd7594fa038f553d66
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Id5fff565857328bc4537d4b7979aa8c682d93629
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I51a68eb6339dd3a99f28731fcf04fcfbbddb19bc
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I336aacb4f0d4fcd54c16d915b9c02fd51251ad59
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Change-Id: I05062d40a6ae8b09f0b267dff2203f36c885d23e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit d6dc79a13c9066b4c5cee217524da02f28dbf359)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Change-Id: Iaa73420d1fd3c3f40a508f36cc3d1efa307ccd18
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit b0816c6a5a8599025f0329e74127217e257fbfef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Ica50996eff050bce86d37f8da08998c31636c3c6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Ibbd914e75ee1c42668aabefc9e9fe2af5cd41859
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I515c08c6ba48a38f40ffd6d60988c2e8e8c6e33a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I24a19ff7b06312197a66517a9240d2aed74590ca
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Needed for subsequent change that will check and error out if the
version is lower than 3.16. We do that to ensure all policies
introduced by CMake up to version 3.16 have their behavior set to
NEW.
Task-number: QTBUG-95018
Change-Id: I874f5f7560eb5817b5f2582d09d6dce7f7e54d2d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 597ff62f3d75b8061a63238ec8794bf982bdf0a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: Ib2b080c3e43d6266915d1a51c049b7435f6bbb26
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I5657f87e99f06022f9d4b691b9d2d07e2868ab85
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The BT LE connectToDevice() method on Windows was a synchronous
operation for the caller by blocking while spinning the event loop
to keep rest of the application responsive.
Other platforms behave differently. This commit makes the connect
call to return immediately while scheduling the connection in the
background.
The QTBUG-83633 was originally about slightly different crash which
seems not be reproducible anymore, but this crash was found while
investigating that and is investigated in that item.
Task-number: QTBUG-83633
Change-Id: I092a94f2437351d27da758db6746f5b24d5fa9c7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 3fc3716e0cd209cd9475d632925a9148b40b2f1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I411ebae5bd969680e39f61c2758ca24b59466717
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The limitation to paired devices seems to be indeed present when
using Qt 5 UWP BT stack, but with Qt 6 Windows BT stack one can
also see the unpaired devices.
Change-Id: I034b997567bd96f22586c33c19a8aa03b8fdc58f
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit f01425d4d8a47921a43e2b74cc662116d1bb68b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces some minor cleanups:
* Fix used error code in case the remote device address is invalid.
* Introduce a helper function to handle connection errors. This allows
to avoid code duplications.
* Simplify CHECK_FOR_DEVICE_CONNECTION_ERROR_IMPL macro to use the new
helper function.
* Minor formatting and indentation cleanups.
Change-Id: I3c679bef56f719c2e97dc9399c3bae33032f3861
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit bcaae09e94373d45ac62d283b404f3b9c02cde30)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit amends 83a845aa0e5bb155fae3f1d5d27bb80801f90935.
The callback can be called after the worker was deleted.
Task-number: QTBUG-96057
Change-Id: Ifbd58b240667bd5ff805b4250cf98a9fd2f96e90
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 3573702aa81f3f7ea20e947dbd27c5d1122cc42a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
Explicitly declare numbers stored to floats as floats
Change-Id: Id1e9d5a5e393dbad0c0fec7aac3083d6e62403cc
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit ab63bfa4efda42bbbf0fdca486911fec1817acc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
There were few plain qDebugs and qWarnings in the bluetooth code
which content-wise seem indistinguishable from categorized logging
in the same code.
Change-Id: I0a1a5c7fb14bd5d8b767a5f982ed5c2b3768f265
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit a82c068a8ce41f92816c015e9dc5957f7c3ec654)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The connection method was infinitely trying to connect to a specified
bluetooth device, which does not make much sense and could lead to the
application being stuck.
This patch limits the connection attempts to a reasonable amount of
time. If the connection was not established within this time,
ConnectionError is set and controller state is reset to UnconnectedState
Fixes: QTBUG-80719
Fixes: QTBUG-89149
Change-Id: Ib8efb690a8b0485c8e9d4844799c7332ab81bf97
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 007dcbf074a9e4d72e2a29a4a28ac5e502830e20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: If02785178665b10280fd4ccd7e0c58501738aac7
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I505ced9e7af1db38bb78807492feccc612237c19
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I64bce7b3414d3d85c7843890ed47380f98179cb6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Change-Id: Ia6fd8e522798ef9736f3dfe559f69d4ee75b2f5b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 75c41779262a7aec38f46b6e1598a339a6ab759c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Change-Id: I231ed4f6b3f8a7826730e0073eb817a1231cc94a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit ceee32505e5aba407039eeaff503e14c4c71c6d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Change-Id: I6bd8a15d2d7bbdf3133993335c91dd47f8bc23fe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 58f7f0a6cdb29d3a63a5dfd2714ba82245370beb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I1f2a4e6db753acf002a94239f8dfb3857b2b0b31
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I23493d17830602fd523a0258bfb01897a9417a93
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|