| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The QMetaType register my not be up and running by the time
we attempt these meta type registration.
Change-Id: I1a857a936a24b4b00a49574fac311c08c09b3d5a
Task-number: QTBUG-49455
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-45435
Change-Id: I3ded6bf88d3980481e386073ce160d5d54520034
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
|
|
|
|
|
|
|
| |
Add read descriptor/characteristic support for iOS and OS X.
Change-Id: If7547f3756dc37930052c9cefd243d6063bcab1c
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 runtime version checks, compile time can be not enough.
Change-Id: If59131b3a9039a7fe15ccba0346fa71d58f36736
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
On OS X QLowEnergyController can return the valid local address,
even if it was constructed without this parameter.
Change-Id: I40252a9f1f64506ae23d6dfe1e61fc786e895860
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>
|
|
|
|
|
|
|
|
| |
Cache a characteristic's value in update/write notification only
if characteristic has a 'Read' property.
Change-Id: Idc705e0c4f2ee704a80bf37b4e59e1dd09ca9e4f
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>
|
|
|
|
|
|
|
|
| |
Fix a bug - call setState on a service instead of stateChanged (which is
just a signal not actually chanding the service's state).
Change-Id: I243f1f6c6775a5592357a443a2f180e4afcf8219
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>
|
|
|
|
|
|
|
|
| |
It looks like isPrimary property is always 'NO' on CBService objects
discovered making this property ... hmm, TOTALLY USELESS?
Change-Id: Ia38323c204e6cf1c3def3bbb3deb08bb8cdf90e4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The initial version of service discovery failed to discover included services
correctly, actually this discovery requires some kind of 'graph traversal'
on the services tree. This patch re-implements the service discovery, discovering
included services also and avoiding ... loops in services referencing each other
(if it ever happens :) )
Change-Id: I60c6122fa5ddb922c21c99dd12024879cffad334
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for disconnectFromDevice.
It can happen that connect requesting is pending forever and not reporting
any error: there is no timeout in Core Bluetooth (quite reasonable),
a device (after it was found by LE scan) can be turned off or move out
of range before connected. If a user calls disconnectFromDevice on a controller
during this time:
- we still have to call cancelPeripheralConnection to make sure the pending
connection never succeeds
- we have to set the controller's state to unconnected, since, unfortunately,
delegate's callback is not guaranteed to work (descipe of Apple's docs
promising this behavior).
Fix for connectToDevice - small typo was breaking connectToDevice's logic.
Change-Id: I4040c79a37ff31ecb5fb2296fa0d39b81d26393d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Implement discoverServices and delegate's methods to work with a service
discovery on a peripheral.
- CBUUID (it's internal data) can be only 2 bytes long (16-bit shortened UUID)
despite of the docs saying 'CBUUID is a 16-bit UUID'.
- property 'isPrimary' did not exist prior to 10.9 SDK (OS X).
Change-Id: If692d147c0479ed69a331514617e3ef2a986cdf4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement connect to device/disconnect from device methods,
add CentralManager class dealing with CBCentralManager (with
additional external logic).
- Improve error handling while in 'connecting' state.
- Use the proper error (ConnectionError) instead of UnknownError +
make the error handling more uniform while isConnecting == true.
- Use isNull on QBluetoothUuid, no need in ugly 'hasUuid'.
Change-Id: I84a704a746b4677ccb870b9c132db5f7359030c6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
QLowEnergyController/Private for OS X and iOS.
This patch contains dummy empty classes required.
While LE controller is not fully implemented, I have to
disable (marking as insignificant) auto test on this class,
otherwise changing the (empty) class to pass the test adds more problem.
Change-Id: I54f764f7f6468b1acf58e80555ae454922de9f3b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|