| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CoreBluetooth has CBPeripheralManager/CBMutableService both on iOS (since 6.0) and OS X
(>= 10.9). This lets me implement the Qt's BTLE 'advertisement'
API and peripheral role for both iOS and OS X.
Change-Id: I3e69a5870535a45bc16bbd9862ca84300b01daca
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| |\|
| | |
| | |
| | | |
Change-Id: I97b51eb3fe2040711c00da67bbb1954fc2e65c1f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now we have this class in QtCore, no need in my "home-made" version anymore.
Change-Id: Id26944dd6970cc2a8ac9d02675f8af9adecc3d44
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0baa4bbbc5d398f388a1e0aff9ba88f82a23c1cc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Builds but not tested
Moved Q_DECLARE_METATYPE outside of namespace to fix namespaced builds
Change-Id: I19c1dba904da8fad155f0f612b863e8f5e0c422e
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: I4005833edebd10b778ac06ded49a88e633e5f435
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ATM CBCentralManager's delegate does its work on the main queue. With
CoreFoundation event dispatcher it's now possible to use QtBluetooth from
non-gui thread (more generally - from a thread other than main).
This makes main queue useless - and we have to move to a dedicated dispatch
queue. Also, we have to make sure we do not have race conditioins/dead-locks.
This patch:
1. decouples OSXBTLECentralManager and QLowEnergyController so that these
two objects working (potentially) on different threads do not share any data
and do not have to use locks, removes the explicit 'delegate' interface/inheritance
and replaces them with LECentralNotifier class - to be able to use Qt's signal/slot mechanics
for inter-thread communication.
2. all OSXBTLECentralManager's are now executed on qt_LE_queue queue
to avoid any race-conditions (since they potentially update manager's
internal state).
3. Results/errors are now reported using LECentralNotifier's object
(QLowEnergyController has corresponding slots connected to the notifier)
Task-number: QTBUG-49476
Change-Id: Ie07cdc13ad559c96a7d2ff010843fb7bcce07c99
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move CBCentralManager's delegate to its own dispatch queue, not the main one,
so that even if somebody _blocks_ the main thread somehow, waiting for discovery
to finish, the discovery can, indeed, finish. Also, make DDA aware of the fact
that now actual scan and 'this' are working on different threads, thus we must
be thread-safe.
Task-number: QTBUG-49476
Change-Id: I9bcc74131f51389c8a014577c65e0943bbc8da42
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace pendingStart and isActive + all places they have to be modified
with scanPhase and enum {startingScan, activeScan, noActivity}.
Change-Id: I29edff3b99fc877d0d52a5974aa64c9ff2faa584
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On iOS when we receive centralManagerDidUpdateState with the state
== PoweredOff, iOS also shows an alert on screen, asking to enable
Bluetooth via the "Settings" app. If we do not report an error and
a user indeed enables BT, we can continue to work.
Change-Id: Ic1f63f205b56fc356bc7fa645359b583c00195a6
Task-number: QTBUG-48713
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: I4e78a2b263fb779253556201fd20fe47a2afc58e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New SDK removed deprecated properties/methods and we have a compilation error
as a result.
Use performSelector instead of direct calls to make sure:
1. it compiles
2. it calls an existing method.
Task-number:QTBUG-48518
Change-Id: I10a2d062f9e71229a1e218d9d167a4132b97b6ab
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/osx/osxbtdeviceinquiry.mm
src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
Change-Id: Iaba26c6affe194eafbb666c7474b566d4980298b
|
| |
| |
| |
| |
| |
| |
| | |
Add read descriptor/characteristic support for iOS and OS X.
Change-Id: If7547f3756dc37930052c9cefd243d6063bcab1c
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Use d_ptr; test inquiryLE in 'isValid' also (just to be consistent).
Change-Id: If5a8977cfc7adfb06150a2bf8a2e14d0613e26c7
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CBCentralManager does not have a timeout while scanning and we had
to use a delayed selector (via performSelector) to interrupt the scan. This is a bug in
the case we're in NSModalPanelRunLoopMode mode (for example) - selector
never gets performed (it waits for the default mode) or performed too late.
Found in our btchat example. Now we use external QTimer instead to
check if it's time to stop a scan.
Change-Id: I159bf5821398f3aa76f03a52a8334dea97cbf688
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
lupdate cannot parse .mm files. Therefore tr markup must be inside of
C++ files.
Some error strings where slightly modified to make use of already
existing translations for other backends such as Bluez and QNX.
Change-Id: I97fe6cfe2227e32fdbc61edd253080a1cd68edc9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add OS X version check, compile time check is not enough if Qt is built
for older versions.
Change-Id: Ieebd3f05f0fd9942516ea1d9b40ee929905cb799
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Add runtime checks, compile time is not enough.
Change-Id: I1821c9718d4e4af1e2d7989bd1ee7a1f11d5c051
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Compile time check of SDK version is not sufficient if Qt is build
for older device.
Change-Id: I0e4d0baf903c6291e67462890107b0e5cc30e7c4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|