| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/osx/osxbtledeviceinquiry.mm
Change-Id: Iefec1aafcb81174b0e1e257246ded08841bf3259
|
| |\
| | |
| | |
| | | |
Change-Id: Iab12802d94e2ced8b358cbeb3e70ce37d0eeec2b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This caused a compile time error when using clang.
Task-number: QTBUG-55297
Change-Id: Ic899a225852e05b4302812f007ff08964b03e90d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In general BluetoothAdapter.getDefaultAdapter should not throw an exception.
If the device does not support Bluetooth the function should return a
null reference only.
However some devices throw a RuntimeException as well. Specially the
smartphone HTC 10! Even that phone supports Bluetooth.
So we need to catch it to prevent unwinding of the stack.
This fix is a sibling of 669b427653f8f708269431917f720f7e76680191.
Task-number: QTBUG-45066
Change-Id: I6d5f71e5cc988eed02ae35665b6ef6c9e8769868
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'state' is an instance variable (the type is LEInquiryState), that holds the
previous inquiry state, while testing manager's state, we must use a local
variable 'cbState' (CBCentralManagerState) instead.
Change-Id: Ie1c4dbdb4fae571c94d7565a8de78657e252de7b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently the advertising packet (scan record) received from BLE devices
during scanning on Android devices is ignored. Consequently, the
serviceUuids() method of the QBluetoothDeviceInfo class returns an empty
list for BLE devices. However, this list provides important information needed
by clients to identify whether a given device is of interest.
This changeset implements parsing of the scan record received from the
Android Bluetooth layer. The Java byte array is passed over JNI to the
C++ adapter classes, where it's parsed to find any service UUIDs being
advertised by the device.
Parsing the scan record ourselves is required for compatibility (Qt uses
"old-style" LE scan API from Android api level 18.)
All found UUIDs are added to a list which is subsequently passed to the
user of the QBluetoothDeviceDiscoveryAgent class via the
deviceDiscovered(QBluetoothDeviceInfo&) signal.
Note: not all Android devices pass the full advertisement data. The
service UUID list may be empty in those cases.
[ChangeLog][QtBluetooth][Android] Parse list of advertised services found in
LE scan record and pass them to API client via
QBluetoothDeviceInfo::serviceUuids()
Task-number: QTBUG-56625
Change-Id: I253f1b841c7b15b3bbabc9e478de87c81979815e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-54457
Change-Id: Ib97dc769cef757a9997fa80a107ac8df4da958cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ibe1871578394fa1e0f039425036ab0dd5223be49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A device UUID is valid/works on iOS/macOS only: platforms where
CoreBluetooth hides addresses and generates 128-bit uuids instead.
We connect to a LE device using such a UUID. This patch adds a getter
to access a UUID of a remote device our controller works with
(similar to 'remoteAddress' method on other platforms).
Task-number: QTBUG-52690
Change-Id: I000e17bbea90c508922ac47ce5291e28d938de7c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Coincidentally this affects Windows Desktop and Linux systems without
Bluez as well.
Task-number: QTBUG-53331
Change-Id: Id2b7ddce2d8a7825008fd8cef5a21382bc228978
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Qt does not include source code of BlueZ itself, but links against
system BlueZ. Anyhow, because BlueZ is GPL'ed and also part of the
user space this is worth to mention ...
Change-Id: I1b82391bcc692db94a259e85ae8a6d64b136566a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
iOS and macOS support for BTLE Peripheral was added. In addition we make
it more obvious what features each platform supports. Eventually this
can be removed.
Task-number: QTBUG-57015
Change-Id: Idf7e96a02a04e0cef79e1bc4030be223210af479
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@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>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ie307c81f1ade857a7261ec5bb23d75cf392cb437
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-55860
Change-Id: I2d7b53c12a7fc02b37764885a1124a2b782f4ee1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Properly do the detection of bluez and the linux crypto API,
and don't run pkg-config at build time.
Change-Id: I0f082992c0f82e90e611283ff0c2cc0143e74bd6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is possible that the connectionStateChanged callback is called after
an error occurred (device is being connected too late). In this case the
controller must not emit the connected signal.
Change-Id: Id82decba72067b34a2078720802a762e15308a41
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We do not want to assert when a user tries to write an invalid value.
Setting the correct error and returning early is the proper way to
handle this situation.
Change-Id: Ia358023ed186bc4b7c5be0e6319182dbe563f576
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-37779
Change-Id: Ie368e85286a3d132c633ef759a2bdb0fb206172d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also give a hint that the sdbscanner tool is typically GPL2 only.
Change-Id: I3739aafcdde905a92772e0aea11dd4c90627259a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-56294
Change-Id: I2c27a050294e611f6ee540dbc58cf7f8b30b3fdf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For Windows (Phone) 8.1 the bluetooth capabilities are more complicated
and incompatible with the way we add them from qmake.
Change-Id: Iccffd2200c0e50b300da27b1207da844f9982091
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As Windows 10 (Mobile) asks for permission before the user is able
to use a Bluetooth (LE) device, the synchronous approach does not work any
more.
While implementing that new asynchronous way the sources were also
cleaned up to be more readable (separate declaration and definition of
QWinRTBluetoothDeviceDiscoveryWorker).
As device discovery and Bluetooth LE work as expected on Windows 10
(Mobile) it is enabled by default now.
Task-number: QTBUG-55862
Change-Id: I9e4a8d21d013b9eaf603380a784afdda3e1ab9ec
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-56191
Task-number: QTBUG-56219
Change-Id: I8ad3dc392d09055418b0dca3794386e53f287307
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch requires new private API in QtCore to handle
responses when requesting Location permissions.
Task-number: QTBUG-55035
Change-Id: I3a6434b9d2d4f66094ed2a4f59667665bd0a905c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
|\| |
| | |
| | |
| | | |
Change-Id: Ia2ce8bf47d9156c550f5360b1422b50313854338
|
| |\|
| | |
| | |
| | | |
Change-Id: I3eec9a22565585d4fc40831d609a3083ce99a52c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Attempt to connect to a service using a socket with UnknownProtocol
socket type will fail, but can result in an incorrect UnknownSocketError
reported and also can start a device discovery (then finally failing to
connect after all). Check this condition early before trying to actually
connect/do device discovery and report error properly
as UnsupportedProtocolError.
Task-number: QTBUG-55073
Change-Id: Ib39e1ca7ad401e07d6387201a4664a1185d38d39
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change all occurrences where the platform is
discussed to use the macro \macos (defined in the documentation
configuration in qtbase).
Change-Id: I97f7a0d6d2ca351395bed518f01d4365b986500a
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
SDP based scans and LE scans can find the saame device (address) with
different device names. This is caused by the fact that different
channels are used to retrieve the information. Those two channels
can advertise different device names.
Before this patch the first entry was added to the list of discovered
devices. When the second entry with different name came about, the
entry was never added to the list of discovered devices. Nevertheless
the deviceDiscovered() signal was triggered each time. This lead to a
situation where application which were listening to the signal only
never noticed the duplicated entries and showed a new discovered
device each time the address matched but not the remainder of the
device info.
This problem was made worse by the fact that the LE scan on Android
continues to fire the new device discovered signal once per second.
This patch distinguishes devices with the same address but different
names. They are treated as separate entries now.
Change-Id: I77259a888708309338110831e86bb7ce9253f2a6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QBluetoothDeviceDiscoveryAgent did not extract the
QBluetoothDeviceInfo::majorDeviceClass() and QBluetoothDeviceInfo::minorDeviceClass()
information.
The Android API provides info for all major device classes. However not each
major device class has its set of API for the minor device class information.
Caching is applied to match Android major device class values against their matching
Qt enum. When a matching entry is found, the value is added to the cache.
In principle, the mechanism is applied for minor device class values.
However since there are many many more minor device class fields, the caching
is a bit more proactive. The patch will proactively read and cache all minor
device class values for a given major device class. This avoids a large
overhead of very long if..else if...else if..else statements.
Change-Id: I26a6c29c6f5dca6d4f3b4b25902cda03a10ae5de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It cannot really be fixed sind Android's NFC API requires Activity
objects. We merely ensure that the service case is discovered early,
reported accordingly and documented properly.
Change-Id: If75856eea3da5c6283a3cb988daffd7a36cc02a7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ic0814c3f5a65ce9ac9236c41397400fc42abb572
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ibde0242b058f728fd7e060b37f427c208325db13
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit 709f6370884b110def2e4665df8fa7bbf5fae734 the plugin loader
is strict about requiring the correct interface id, to avoid loading
unrelated plugins in the loader thread (which they may not be prepared
to do).
Change-Id: I2e58ac58e289010555260eef078307a8a7bf4845
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Due to recent changes the worker is deleted by the
device discovery agent and does no longer handle its
own lifetime.
Change-Id: I3bd0e4880ab7ee48b900e2b38591c131f468f7a1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is possible that devices are found by the initial scan
and by the device watcher. In this cases the "device found"
signal should not be emitted.
Change-Id: Ic8aa5a088092adfa8a5b2ea5a3c91350a7897e6a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|