| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
We previously failed to correctly extract service ID and service
class ID list. As a result, service discovery agent working with
uuid filter and in MinimalDiscovery mode would fail to find anything,
without filtering - would probably end up in services not having
any valid service ID or ID list.
Task-number: QTBUG-71052
Change-Id: I6b5a36399abfaf66297abe4a38efa7659cbb2aa0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
The initial patch was contributed by Thiemo van Engelen.
Change-Id: I45fad793ba092ab2820e606d8bf8807afa3e911e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
| |
To avoid unnecessary copies, const is used wherever possible.
Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This can allegedly happen when executing write with notification.
While never observed so far, can easily be predicted/emulated,
resulting in QLEC stuck in queued write/read requests and not
progressing any futher.
Task-number: QTBUG-68707
Change-Id: I3321257bb84a83a8ea25f9ae4e8acbdb95568cfa
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we're discovering service's details (included services,
characteristics, descriptors, etc.) some operations can result
in timeout, without CoreBluetooth reporting any error back.
To cope with this we need an additional logic - all such
operations must be guarded with a 'watchdog' timer (OSXBTGCDTimer).
Fortunately enough, we can re-use CBPeripheralDelegate's callbacks
to handle these timeouts. As a micro-bonus - a couple of bugs
in callbacks: whenever we are in service details discovery,
after having some error we have to finish with discovery anyway,
not to stick in 'discovering' state forever.
Task-number: QTBUG-68422
Change-Id: I13a377ebec3983ac48a33d6b89b67223d5ec412f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
And remove some essentially duplicated code.
Task-number: QTBUG-68422
Change-Id: I677581ebb0998d64a0081f568479efb7e8156474
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtBluetooth is using its own dispatch queue in CoreBluetooth
back-end - this is where CoreBluetooth is executing all callbacks
we're providing in delegate classes. Some operations like service
discovery/characteristic or descriptor read(s) amd write(s) e.t.c.
may sometimes fail to finish - no value read, no error reported
(so delegate's method - callback - is never called). To deal with
this we introduce the class OSXBTGCDTimer and GCDTimerDelegate
protocol; GCDTimer periodically inserts blocks into the serial
LE queue and checks for timeouts upon their execution.
Task-number: QTBUG-68422
Change-Id: Ic17bf91d4223ad1ffc7b9808da36c902a4158227
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I6e93fc7435a49b601a5c10519ed86d2a15125074
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
Change-Id: I6d2140aa8692bc7ce56f4366275fd02d008900f0
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I041606473b333500da29c821d7dc089313856f65
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/bluetooth/bluetooth.pro
Change-Id: Ibccccc974b545696ae053f1fbffcc973d8be43cc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Apple keeps breaking things, we keep fixing their usless diagnostic,
until they fix their framework for good.
https://openradar.appspot.com/33375728
https://openradar.appspot.com/33375690
etc.
Change-Id: I0051b4636c6082ac4d0a7d76fc8aebb952394626
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: I3bf7130a204aebd6a52dfe68bfea57767ba1b70e
|
| |\|
| | |
| | |
| | | |
Change-Id: I84bfe86751c27eabb4e75912ae3c0b4d3781faf1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
IOBluetooth is heavily based on CFRunLoops. An attempt to use it on a thread,
that does not properly run CFRunLoop results in callbacks never firing and
thus QBluetooth classes never finishing their jobs, including:
- device discovery
- service discovery
- RFCOMM/LCAP2
- Bluetooth server
- Bluetooth socket
etc.
While we cannot fix the core problem until we have a properly working
CoreFoundation event dispatcher, we can at least issue a warning so that
people do not waste their time debugging this well-known limitation.
Task-number: QTBUG-63630
Change-Id: Iefa4d675ea0962167bdfede640d2087dbdf37b18
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Like it was done for central manager - use the correct enumerators (types)
- with 10.13 SDK they also use 'generic' CBManagerXXX constants on macOS
instead of CBCentral/PeripheralManagerXXX constants.
Task-number: QTBUG-62658
Change-Id: I4b4de239930f5e731dc4977ff3353512290ff3b2
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A similar change was done earlier for iOS already. This is due to
deprecated API.
Task-number: QTBUG-62658
Change-Id: If1d4a0eae382e46e3224a6bd4a6e75309ff87cac
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The type of manage.state has changed on macOS (like on iOS before),
making an declataion invalid.
(cherry-picked from qtconnectivity/0c3cc5374d2703fde6a99d301fcff974122d057d)
Change-Id: I55caa32fa9f0a85090506cfbd788c1a80d41e8ce
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Apple broke source code compatibility by moving 'identifier' properties from
CBPeripheral and CBCentral classes into the new CBPeer class and marking it
as "since 10.13". As a result we have compilation errors in the code
that was valid since 10.7. To workaround this issue, we introduce a
category with 'identifier' property declarations for SDK >= 10.13
and target < 10.13.
Change-Id: Id7c9d33a9c8ae7627a06b4c1930e70cede1e5b07
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ica194c2568465a94d851ddeaf62ca71b33fe4464
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The previous version was doing exactly this, but in a far more
complicated manner.
Change-Id: Ia8f6a418a7fc6eab03207ced099288b8d4e5f3a7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| | |
Qt can no longer be built with the 10.9 SDK.
Change-Id: I51da5a48b9985255bb1015c2b401906100d497bd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The type of manage.state has changed on macOS (like on iOS before),
making an declataion invalid.
Change-Id: I55caa32fa9f0a85090506cfbd788c1a80d41e8ce
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Register QLowEnergyCharacteristic and QLowEnergyDescriptor
as meta types because they are used in signals.
[ChangeLog][QtBluetooth] Register QLowEnergyCharacteristic
and QLowEnergyDescriptor as meta types. It is therefore
necessary to declare them as meta types in the header files.
This commit will cause conflicts with existing meta type
declarations in applications using Qt. These declarations
need to be removed.
Change-Id: I18f33b1b2f159cffd6efbacc37178286b86a06e0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Invert CoreBluetooth's naming priorities: CoreBluetooth prefers the device's
GAP name over advertised name; we instead give the higher priority to
advertisement data (CBAdvertisementDataLocalNameKey).
[ChangeLog][QtBluetooth] Prefer advertised name if set
Task-number: QTBUG-58080
Change-Id: If40687c9c1de50986f61d5e6134001621bc5030b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
Fix syncqt warning:
QtNfc: WARNING: qtconnectivity/src/osx/osxbtperipheralmanager_p.h does not have the "We mean it." warning
Change-Id: I439515eac2a19b351d1bad18f783e448224d0918
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
Apparently, it cannot exceed the 512-octets limit on iOS.
Also, warn about notifications - the value is truncated for
a connected peripheral, we are limited by a central.maximumUpdateValueLength.
Change-Id: Ia3d09fe0306a2514cf2c6f391cc57e6d300b75fd
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With Qt's Bluetooth API it's possible to write values with different
lengths into the same characteristic. Imagine this scenario:
service->writeCharacteristic(handle, QByteArray("abcd"));
and then
service->writeCharacteristic(handle, QByteArray(2, 0));
If we read from the characteristic later, we get:
00cd.
A write request in CoreBluetooth is presented as an array of CBATTRequest,
each of them has its offset and value with length. After processing these
requests we truncate a characteristic's length if needed.
Task-number: QTBUG-56898
Change-Id: I674637eb78c806364d1a89a1db8ab3f31a8800ce
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From CoreBluetooth's point of view - this is just a callback, not a
descriptor write request (they even consider all descriptors immutable
in peripheral), but for Qt it should be a descriptor write operation,
and we must emit a signal.
Oh, and set endHandle correctly on a LE service object!
Change-Id: I71922507a6ece987ad8b5c317ef618301ae240c2
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Things like services uuids can be quite useful and we should extract them.
Also, do not ignore the device discovered the second time as it was done
in the past, the logic updating QBluetoothDeviceInfo with new info
(if needed) is already in the device discovery agent.
Change-Id: I89e735dae26848eb95395cf96099efd5b56b18b3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use request.value.bytes instead of data.bytes to write into ...
data.bytes.
- Report offset and invalid length on characteristic write
as separate errors.
- Check minimal/maximalValueLength.
- Allow characteristic writes within min/maxValueLength.
Task-number: QTBUG-56898
Change-Id: I624e55fe964e86b5bbf246ce2ee053dd247f7761
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
With the latest SDK on iOS we have to use CBManagerStateXXX, not
CBPeripheralManagerStateXXX/CBCentralManagerStateXXX.
Change-Id: I5be7f55c9ee64afe6a6260573fe9e939ac7440fb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's nice to re-use some generic functions, but it's not so if they are
actually not generic: data_from_bytearray returns NSData, not NSMutableData
and NSData (or whatever type they have under the hood) obviously does
not have replaceBytesInRange:withBytes: method and we get 'unrecognized
selector' exception as a result.
Task-number: QTBUG-56898
Change-Id: I8fcaaf2a020c6f5caa8a171b7ac6e534fcb070cd
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/osx/osxbtledeviceinquiry.mm
src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
Change-Id: I7dc75c187af73917f31c28b9edfaf8bcf9652a3e
|
| |\
| | |
| | |
| | | |
Change-Id: Iff285e35cdca30fee28c7927bc01498d70f9de9e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- With recent SDK changes CoreBluetooth is not in IOBluetooth anymore.
This makes corebluetoothwrapper_p.h even uglier, now we have to care
about v != 10.9 && v < 10.12; v == 10.9; v >= 10.12.
- Using osxbluetooth_p.h we can get rid of forward declarations (for
Obj-C classes) and weird includes like <IOBluetooth/IOBluetoothRFCOMChannel.h>
- use osxbluetooth_p.h instead (and it will correctly include
IOBluetooth/IOBluetooth.h etc.).
Change-Id: Ia85ef2e2cc1ac7b15a58864ed25d85a0772e5c86
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds missing includes that allows to build the module with
the 10.12 SDK and Xcode 8.
Change-Id: Ieab48f6a0582b916ceecbbb9a01a4169d6ba53f5
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
| |\|
| | |
| | |
| | | |
Change-Id: Ie9b0ebf1c5e925107e90b5d01b112916a8d1d83d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
iOS 10 (and tvOS 10) deprecates CBCentralManagerState enum
(and associated values). Replaced by CBManagerState enum.
Change-Id: I1c1bb0691403deaa6330949516846961c76865f5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adds the minimum compile requirements for the new
QBluetoothDeviceDiscoveryAgent API.
Change-Id: Idfe07bee63de9d2849ab68eb455d0be470591795
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Instead of hardcoded 10 second timeout use the latest Qt API enabling
arbitrary or infinite length for LE device discovery.
- Since now scan can take long or unlimited time, the previous approach
with detached CBCentralManager and DDA is not working anymore -
we can not report devices only at the end of scan.
Re-use LENotifier and signals/slots instead.
- Remove DDA timer, timeout logic is completely inside
osxbtledeviceinquiry object now.
Change-Id: I07735581ac175d1d5e5d788aaf697dcb41429e31
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\| | |
| | | |
| | | |
| | | | |
Change-Id: Ie6cc29263dd8d9d58bdbd14fb0d3b57d7abea9c7
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since now the use of Q_FUNC_INFO is not recommended (and indeed can
mix ugly with QT_MESSAGE_PATTERN), remove it (it now stays only in
3-parameter Q_ASSERTs and NSLogs.
The next patch will do the same kind of cleanup in C++ part.
Change-Id: Ief8bd7c90ea2ff2a99f246885691102062aa5e54
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since we now have OS X 10.9 and iOS 7.0 as the minimal required
(SDK and deployment target) - get rid of outdated code-branches
in _SDK_EQUAL_OR_ABOVE etc.
Change-Id: I5f546e8bb746f6b94f26a40460b3caa0af6a531c
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\| | |
| | | |
| | | |
| | | | |
Change-Id: I533ed177193b4c7a9a1b6110612103e40a24a597
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
CoreBluetooth for tvOS does not support peripheral role.
Change-Id: I82e7a61abfd907ea53faf33264951727f3cbe5a2
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\| | |
| | | |
| | | |
| | | | |
Change-Id: I073f6c45696fe28b83335fb65cca6270c458851d
|
| |\| |
| | | |
| | | |
| | | | |
Change-Id: I858ee0b39b7a488f08fc045635d2a39053f32d99
|
| | |\|
| | | |
| | | |
| | | | |
Change-Id: I77d7b5877ce36057c3882a0b397ff27d5c35ad53
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
-serviceForUUID: fails to find included service and returns a nil
for a valid service previously discovered.
Task-number: QTBUG-52324
Change-Id: I9f4f8b1f3d3a78879344ace0170e23c03921d648
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|