| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/qlowenergycontroller_darwin.mm
src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm
The latter was auto-resolved by keeping, but is in fact removed on dev, so reremoved.
Change-Id: Ifa47f61836450d59ea8e47a92b84f57ab06863f7
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
Change-Id: I48ae70ffcb475ced4a05619310f496527cdd4166
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... somewhat prospective fix (I do not have the new iOS yet), so far build
never failed with my current SDK.
Fixes: QTBUG-76847
Change-Id: Iab75c3cd47144cd83b679b1dbf82339e29c07bd1
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead, use the shared implementation (and the declaration from the *_p.h)
Fixes: QTBUG-75348
Change-Id: Icbcbb752df1a9b8865ea4f4ef06f2b59dda577cd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implement the proper interface from QBluetoothSocketBasePrivate,
remove a dummy base class. Remove all public API from
qbluetoothsocket_osx.mm and re-use the code in qbluetoothsocket.cpp.
The code generally is the same, a bit of re-hashin/deletion.
Task-number: QTBUG-75348
Change-Id: I0034dfd283daf9d51775d8f9551b85d2d436aa85
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
handle and GATT_INSUFFICIENT_AUTHENTICATION and GATT_INSUFFICIENT_ENCRYPTION
statuses explicitly to close the established connection with AuthorizationError
Change-Id: I6077d2b4e90daaac527fff7145bc71d7a4e032a3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some code can be re-used from the shared public implementation.
*_osx_p.h is not needed either.
Task-number: QTBUG-75348
Change-Id: If373b74edebe9a9db90e820016cf779a1726baed
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- use the shared *._p.h file/class declaration for the private class
- use the shared *.cpp with the public class implementation
- get rid of *_ios.mm - iOS/tvOS/watchOS specific implementation
and use the shared (by macOS, iOS, tvOS, watchOS) *_darwin.mm source.
- get rid of somewhat weird 'isValid' in the private class, it is
is not taken care of in the public API anyway and today its
whole concept/usage looks (quite) buggy to me. I only have to
check that the default controller is not nil and has the
state 'ON'.
Task-number: QTBUG-75348
Change-Id: I5383e4f8df02ac12f069c2f59e252cb8a200800b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... to simplify future code de-duplication. In this patch we:
- For simplicity move all C++ delegate classes into their
own header. Since we have to hide Objective-C from C++ compiler
(while compiling *.cpp files), these updated delegates
have to use void * instead of Objective-C classes.
- Introduce a new RAII classes, that work with Objective-C
instances but have a header that can be included into the
*.cpp files, thus making it possible to share *_p.h files with
all back-ends.
I'm also switching to a new naming convention, which will later
propagate to the pre-existing code - given files are already in
a sub-directory 'osx', having a prefix 'osxbt' in a name is
excessive. Now it's becoming 'bt' (include "osx/btsomething.h").
Later 'osx' dir is to be renamed into 'darwin', which is what
it is these days. Namespace OSXBluetooth is to become DarwinBluetooth.
Task-number: QTBUG-75348
Change-Id: Iebaeab7d0c5e672efebab8218debdec761353633
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ifa3782b009430df67ef2e7ba78ea7d14cc053aa8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With some peculiar device we suddenly (during the service details discovery)
got a crash with CBDescriptor suddenly becoming something else - NSString,
NSMutableArray etc. - meaning the object was deleted and its memory re-used.
It would appear, CBPeripheral can suddenly change it's services tree and
it informs its delegate (aka 'us') about this change using the (previously)
missing method. In this method we cannot do much, due to the specificity of our
public API that allows concurrent discoveries, it's 'non-monolitic' (in several
steps) discoveries etc. etc. So the only thing we can do - stop everything,
remove all services, transition to QLowEnergyController::ConnectedState and
wait for a user to re-discover services.
Fixes: QTBUG-75043
Change-Id: Ie98d90aea112e40b4c6771e3f7315772dfd92b39
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ie734d2574c039a7f45d84455811472ea5b8c8e1c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Similar to the problem found in osxbtleinquiry - 'timers' waiting to
fire on "qt-LE-queue" know nothing about us, potentially deleting the
delegate object in response to Bluetooth switched off.
Task-number: QTBUG-73140
Change-Id: I1a39a1ca02d019f90a1b4214cdbbb76e26b9eea0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. When the central's state changes to powered off, we emit PoweredOffError
and QBluetoothDeviceDiscoveryAgent deletes Obj-C instance - a delegate
for CBCentralManager. But we can still have GDC timer waiting in a queue
and triggering the crash while using a dangling pointer. So we have to properly
cancel the timer.
2. CoreBluetooth under debugger warns about API misuse - calling stopScan,
apparently, is not allowed if CBCentralManager is in a state different
from 'powered on'.
Change-Id: Ib218105735995dc7988751fa04a6c76cab10cba8
Fixes: QTBUG-73140
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Id27c2c0eff4731b075d952328404fe9550487cac
|
| |
| |
| |
| |
| |
| |
| | |
Move all i-vars into implementation part of declaration.
Change-Id: I9ee71bc85308d899871dc680d438c504e591b091
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Trying to do several things (for example, discovering chars on
several services) in non-sequential manner is allowed but will
result in the broken 'object under watch' logic and thus a
failure to report some operation finished.
Task-number: QTBUG-72487
Change-Id: I9674f93e0c4d5cbfd50ac2f828d0d650031e056c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. We move the logic 'object we are watching after and the query's type'
into the GCD timer, since we'll need several timers in osxbtcentralmanager
(and after all it's not a timer really, it's 'a timeout watchdog' more like.
2. Move i-vars into the implementation to suppress compiler warnings.
Task-number: QTBUG-72487
Change-Id: I090e4cc2e0e747211aae8ec91c4e0ff4a53f570b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/osx/osxbtsdpinquiry.mm
Change-Id: I637adc5a5271e136af7d0ac6380086728ffb15c5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 patch deprecates the mentioned enum and all users of it. In addition,
QList usage is replaced by QVector (which is a design pattern in Qt).
Task-number: QTBUG-62425
Change-Id: I63e8dceb03ed231d0d06709896a1aad2b6bb31a3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
|