| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Q_FUNC_INFO in messages/(Q)asserts.
Change-Id: I12285bf97ac766964b656090980858f3fd5de2da
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Replace handwritten function names with Q_FUNC_INFO.
Change-Id: Ia12728eb53dc63ac1ca0d2a76bbf2baa06db0ea0
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Use Q_FUNC_INFO instead of handwritten 'signatures' in asserts/messages.
Change-Id: I639b4293b86120ddc260d3c9e85fd50340afbf60
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Use Q_FUNC_INFO in asserts/messages.
Change-Id: Ie766016a36c3cc47d4561a74ed8bf179357a19df
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Use Q_FUNC_INFO in asserts/messages.
Change-Id: I2d9429cff0b1cd5d28a04fe50328289a891d04f5
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace handwritten 'signatures' with Q_FUNC_INFO, remove spurious
debug messages. Get rid of 'transient delegate' trick.
Change-Id: I2c490271baba7247af11df128964b61d0255ef95
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Replace hand-written 'function signatures' with Q_FUNC_INFO.
Change-Id: I0c05d9fa76d120b5626420cadafb1a9fe1227b95
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Get rid of all 'hand-written' function/method signatures in qCWarnings
and Q_ASSERTS, use Q_FUNC_INFO instead. Fix error function for
characteristic/descriptor write errors - remove unused parameter.
Change-Id: I4f3f7c6c6a06802135f47a4b5cbb7c4313af4f34
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While writing with response, Core Bluetooth does not
update characteristic/descriptor values in write notifications.
I have to 'cache' this values and report them back.
Also this patch fixes minor bugs in '-performNextWriteRequest':
while handling errors it's not enough just to call 'performNextWriteRequest:'
again, it must be in return statement or followed by 'return'.
Change-Id: I6e7ab7fe6f63ea84268bf6c7ea67e2939d524f91
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Several problems found by qlowenergycontroller auto test:
- Core Bluetooth in its didWriteCharacteristicValue callback
does not have this new updated value, but the old one,
to avoid additional characteristic read I have to cache this
value in writeCharacteristic and report it later from the callback
as it's already done for client characteristic configuration.
- writeDescriptor with state != ServiceDiscovered (can happen after disconnectFromDevice)
should set an error.
- setNotifyValue did not check that value has the wrong length ( > 2 bytes) -
this also should be an error.
- Fix a key mismatch - in setNotifyValue remember descrptor's handle, not
the characteristic's handle.
- Remove annoying qCWarnings from didUpdateNotifyValue - it happens
very often that we set this value in 'automatic' mode, without 'writeDescriptor'
request.
Change-Id: If3955f0e1364587b96403d23f2f8da28e6723e87
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Remove debug messages from OSXBTCentralManager.
Change-Id: I980ffac49453b670fa93d4ddfb0e621e29dff4f3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
On OS X we have to first make Classic device scan and then LE device scan.
Shorten Classic discovery from 20s to 15s.
Change-Id: I653b2d9f6c911bdf09c900735273bd6d1e95b078
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
If client characteristic configuration descriptor has an indication/notification bit set
- enable ("automatically" == no explicit user's request) notifications.
Change-Id: I839aabd6f5513141f66c8e4467618b3edd523350
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
On OS X CBDescriptor's value is always NSData,
on iOS it can be NSData, NSString, NSNumber.
Change-Id: I6ffa4b813238ec26759508a012fa6e236db04c63
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Enable Core Bluetooth-based version for iOS.
Change-Id: Ica13fdc6c01744713483771e7c8ad6153c9fccdf
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Core Bluetooth has a special method to enable/disable char update notifications and
even more - Core Bluetooth does not allow to use writeValue:forDescriptor:
with ClientCharacteristicConfiguration - that's why need this 'workaround'.
Change-Id: I4a01690a76aabf62397321ca6ba22c4abb1c420c
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt's API assumes that several write operations must be
serialized (this is not guaranteed with Core Bluetooth AFAIK).
I can enqueu only write with response operations, otherwise
I never know when to do the next write.
Change-Id: Iaa83514748358437e2c39335ab142d084ff197e3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Core Bluetooth - based implementation.
Change-Id: Ie642a13ae9a4d75401dd10648fac6eeee4123a3b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Qt we work with handles (real for Bluez, emulated for Android/iOS/OS X).
Core Bluetooth has its own (quite primitive and inconvenient) data structures
(arrays of objects, containing nested arrays).
To make things not so ugly I'm adding several
maps to be able to find a characteristic/descriptor/service using a
handle from Qt's layer.
Also modify writeCharacteristic to use this new 'addressing scheme'.
Change-Id: Ic822c9aa82a4df1e9c4cf4c673451cac8006b9ba
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
writeCharacteristic - implemented with Core Bluetooth for OS X and iOS.
Change-Id: Ia228ff451e1e6d7b6fb7de6cad29198aa9257602
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement details discovery: characteristics, their values (if any),
descriptors. We have to emulate handles (QLowEnergyHandle) - while
Core Bluetooth internally has the notion of handles, it never exposes
them as a public API.
Change-Id: I09158433ce6835dd34fe8ad47d047212dab59e8e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|