| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
Change-Id: Ie14506c0ad648413019c511d4d39dc8bd43d7405
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ic93d086cc6b6549e8de90f01a0bba5913207d7e5
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-numer: QTBUG-37779
Change-Id: Ieb3ed5dfea7d60b3875cbe97bb26f8060bebcc17
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I9fd9131c031328afa936a52e42371409e3fbac48
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: If6695194644fa0eceec80808115fd09af895a220
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I063668f9b95b95aa15a736b80e11d81c15cd1730
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With this change it will be possible to use a tag
injected from outside when running as a service.
Intent newIntent = new Intent();
newIntent.putExtra(NfcAdapter.EXTRA_TAG, tag);
QtNative.onNewIntent(newIntent);
Task-number: QTBUG-57646
Change-Id: I628d4357f023a0926e7d61914b39278342ac7161
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This includes the correct handling of client characteristic notifications (CCNs).
As per Bluetooth spec this descriptor is unique for each device.
If a characteristic was changed all chars with enabled CCNs are notified.
CCN settings are even retained while the remote device is not connected.
Change-Id: Iec612e6a5e70206a6be0263e10e615c26def7559
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I28a165c7b7503b1c8159dd0c46f3f7450e599c74
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I3aa89926c5237ee8da18b73f66f0c7a321a83c91
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I60e5bdce4256804754909c2538aebe581897e1e9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Emits the above signal when the remote client successfully updates
a characteristic.
Change-Id: I236b1f92b682028bc10be798192f46bffc981101
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I9684e4cc76336250b235a261fdc8924a2ca70086
|
| |\
| | |
| | |
| | | |
Change-Id: I6b8a6bdcc849b76a596d17d3b15e8e1efa58a28c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This amends d884d20c5530b67fbd2fba35cdb71a9f969196be
Change-Id: I6f600ed7739f698405076fb567bc71174e205125
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
a regression has been introduced by the service discoverer refactoring,
causing an empty service to stuck in DiscoveringServices state for ever
Change-Id: I1d339279e77f5409231d5fbd3677f9e2eb98a0a8
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The dreaded GATT_ERROR 133 (0x85) is a long standing issue in Android.
There have been continued efforts to reduce it up until Android N:
https://code.google.com/p/android/issues/detail?id=192561
Tests have shown that the new BluetoothGatt.connectGatt() overload
is much more reliable. Android v23+ gets some relief and Android v21+
gets unofficial/hidden relief.
Reports indicate that error 133 is timeing related. While the new
connectGatt() call seems to resolve this problem it is throwing
the timeing related error 22 more proactively. Very quick
connect()/disconnect()/connect() calls can cause the error. The patch
adds a more specific error code handling for error 22 to provide
some hints on what the user can do to prevent it.
Task-number: QTBUG-56078
Change-Id: Ib14d503701cee7ea766247b712106302cba896f3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0fed368384fbfd4e9e8be74b7a586cbf2ed10218
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If advertisement fails then we drop back into the unconnected state
and provide a more detailed error message for individual advertisement
errors.
Change-Id: Ic9de02b456409cd1a2dec11e53c884fe368ae267
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: Id2cabd9df7b5387fe5e6f1c898fe02e40f7c0a3d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: Id40033b0745a720466a8466ad3c82ad804cadd9c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I32a3c4c711ac62ee89570534ae8c658a681bbdb8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unfortunately, Android only provides access to a very generic connection
priority. The patch uses the minimalInterval() to determine the desired
priority. Everything below 30ms is high priority and everything above
100ms is low priority. Every other value is balanced priority.
QLowEnergyController::requestConnectionUpdate() was modified
to permit access when the controller is connected, discovered or
in the process of being discovered. The limiting factor is an
existing physical connection.
The documentation was updated to reflect Android's API limitations.
[ChangeLog][QtBluetooth][Android] Added access to BTLE connection
parameter settings.
Task-number: QTBUG-53476
Change-Id: I3e22c65bd9598296a9219463dd05f0d9fc73599d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Advertisement data and Advertisement parameter in Qt are
now connected to the Android/Java side. In addition the basic
service structure is supported.
Descriptors and char detail export are still missing.
Change-Id: I941cba5e832d76ff7beca811d08a2148367c6bf5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I4403a9d5c79fae2c6bbe9c478660ead01dc16fe4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Android Bluetooth LE Client support requires API v18 and Server support
requires API v21.
In fact earlier releases of Qt did not actually catch the v18 border
at all. It excisted since Qt 5.5 already.
Change-Id: I9baabf5138b2b0d48f8d09670c4feeef688681fd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Focus is on the Java side of things. The Gatt server & LE advertiser
can be started and stopped.
This patch builds the foundation for future changes. The C++ side is only
very rudimentary and a lot of debugging helper are left inside the
new code sections.
Change-Id: Ic56da3ec6471ccb438fc2088fbf5eeb3053d5cf1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-37779
Change-Id: I7fb49a6870768da956793b0d0681c371da939df9
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Windows 10 SDK versions < 14393 full service discovery is not
supported. While GetRfcommServicesWithCacheModeAsync enables us
to specify the lookup mode get_RfcommServices only returns cached
services.
To be able to offer some functionality for older version we use its
results but give a warning about the limited abilites of this API
in case of full service discovery.
Task-number: QTBUG-37779
Change-Id: I21a15f8bb1d058780c8322ece2c3d9a285ecab25
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The WinRT API does not provide functionality to obtain the state
of the devices host mode. In order to make the examples (for example
btscanner) work in winrt, the hostMode defaults to HostConnectable
and the local device is always valid on this platform.
Additionally the API only enables us to discover paired devices,
so every device that is found, has to be in "Paired" state.
Change-Id: I32359d0defdb9f8e1cc1a629d32da1214a669aff
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For some devices DeviceInformation is null. These
cases should not lead to a crash so we just ignore
these devices.
Change-Id: I9f55b6931c9790b4bdfe217fd506229d2125b78b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For the communication with a German ID card its required to execute
several commands in a row, whereby a state is generated. Every command
works on the state created by the command before. Depending on the
Android version the state gets lost when the connection is closed.
With this change it is possible to keep the connection as long as needed
and close it manually. Because of backward compatibility the connection
is created and closed automatically by default. With the use of
setKeepConnection(true) the communication with the target is also a
lot of faster.
[ChangeLog][QNearfieldTarget] Introduce (set)keepConnection() and
disconnect() to keep the state of a target and speed up communication.
Change-Id: I5778c9bdaf04cfeae78b3222bef4475f4cd7c436
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since qtbase supports checksum calculation defined in
ITU-V.41 an own implementation is not longer needed.
Change-Id: I0f62c872b4fb517493ba43a9bb7a6d35481fa40d
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>
|
|\| |
| | |
| | |
| | | |
Change-Id: Ia02a13525cadcb02d99c546ed84cfb34e69523c9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If during discovery the read of a characteristic fails, then this
characteristic was not added to the service. This happens in a special
case and not always, when we try to read from a notify only
characteristic.
Now the characteristic will be added even if the read fails.
Task-number: QTBUG-58056
Change-Id: Ib802eeb66aeae92da690c296faf57331123353e6
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
During discovery, if a descriptor read fails the current implementation
tries to read from a nil bytearray. Now the bytearray is checked before
access.
Change-Id: Ic04809fa81c25c7abdd8a82a1ccefe43de7f5605
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We are testing bit flags and don't require a logical AND.
[ChangeLog][QtBluetooth][Android] Fixed incorrect bit flag test. This
caused QBluetoothDeviceDiscoveryAgent to always request Location
permissions even when only a classic device search is needed.
Change-Id: I6d6bd63da9a002bcec430e1ce90d0f13d153fe9c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bluetooth LE discovery needs ACCESS_COARSE_LOCATION permission
since android 6.0. In the manifest file it is possible use it by
"<uses-permission-sdk-23 android:name="ACCESS_COARSE_LOCATION" />"
in general. But the bluetooth LE discovery requests it for every
android version. This change enables the request for android > 6.0
only (API-Level >=23).
Task-number: QTBUG-58085
Change-Id: I78ad2fe83eb16eaf45813137335f85c7b3930992
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The only thing we can do on macOS/iOS - call stopAdvertising (we
have nothing to disconnect from with CoreBluetooth).
Also, remove a really weird warning.
Change-Id: I589bdb819468fc659a9ed3e68170dc498ffc8cd9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Although this was not explicitly documented this is the behavior that
the associated heartrate example exhibits. This change ensures that it is
documented and enforced.
[ChangeLog][QtBluetooth][BlueZ] Fixed continued advertisement of
peripheral data once QLowEnergyController::disconnectFromDevice()
was called. Public documentation was added to publically state the
behavior.
Change-Id: I3678c92fbb0d12cca17cd65ef7566a3ae4b55dc2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | | |
Change-Id: I96679cba0d6ac0e02036dc587289c4037c3cf32b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
May occur relatively too often to remain unhandled
Change-Id: I89b1255605a29d959635e8d1965e9596b591b305
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
in f945ffc90f8f11d73dc87f2d82bb2d246d446e71, a very basic
scanRecord parser has been added, which calls GetByteArrayElements
without releasing the elemnts, causing JNI core exception
> E/dalvikvm: Failed adding to JNI pinned array ref table (1023 entries)
Change-Id: I272593c232f0c87c1983f1f568aa6c3599d44253
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some peripheral implementations do not respond with a response upon
reception of GATT requests. Since the Linux implementation does not
progress until a response is received, it stalls forever.
A new timeout was introduced to counter this. If the response is not
received within the timeout period an artificial GATT error response is
injected into the queue. In addition, a very large warning is printed
to highlight the fact and force the user to deal with it. In extreme
cases this could create strange ordering problems for extremely
delayed responses. Hence the implementation continues under
reservation.
A disconnect as response to the missing response from the peripheral
was briefly considered too. However user reports indicate that not every
user is able to change the peripheral implementation. This would block
further usage of QtBluetooth (especially if one characteristic is
non-conformant but the other characteristics of the same service are
OK).
Task-number: QTBUG-52692
Change-Id: I49ad7b75215101b3132ba97794e71021ee25a30e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |\ \
| | | |
| | | |
| | | | |
Change-Id: Ic04b8dc00f754fb85f50209c822c2f3734fbf99e
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
On some devices (e.g. HTC 10) calling
BluetoothAdapter.getDefaultAdapter() always fails first time.
Task-number: QTBUG-57489
Change-Id: I3a22a831f9a13d880756b598c408ab21a0f52126
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
getDefaultAdapter might fail and it will throw an exception if the bt is
not turned on, we must clear all pending exceptions otherwise next java
call will crash the application.
Task-number: QTBUG-57489
Change-Id: I191247528065acb3cdc4f6c0d36371ebf9f2e2c8
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
getServiceChannel() does not exist on more recent Android platforms.
The JNI call returns an exception and socketChannel is either 0 on debug
or undefined in release builds. The previous code did not reliably
recognize the case "0" (debug) or "random int" (release) as an error
state and hence channel variable was overridden with wrong value.
Change-Id: Ia81219376661be3fbbe0c9122f707bb82defa946
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As the signals about read/written characteristics and descriptors are
emitted from a different thread (XAML thread) the types have to be
registered in order to make the queued connection work.
Task-number: QTBUG-57385
Change-Id: I4542c8d1be03d2d3fe1b0a69b94ef0a2ff916026
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|