Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.12.2, 5.13.0 Beta 1
-
None
-
-
17e2ac555af234d03144cad72d70a29c62357a38 (qt/qtconnectivity/5.12)
Description
Running Ping Pong BT example on two Android devices doesn't work (at least not on my setup) due to a few bugs:
Setup :
- Nexus 5x Android 8.1
- HTC 10 Android 8.0
- Install Ping Pong BT Example on both devices, run it as server on Nexus.
The problems:
- the Nexus device lists a few reserved UUIDs and the custom one, but none of these reserved UUIDs is an SPP UUID.
- the HTC device finds the UUID but it doesn't set the QBluetoothUuid::Rfcomm because it doesn't find any SPP UUID first.
- HTC try to use the QBluetoothServiceInfo prvided by the QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices but it fails in QBluetoothSocketPrivateAndroid::connectToService because if (!ensureNativeSocket(service.socketProtocol())) finds only L2capProtocol in the previous service protocols list and it returns an error.
The proposed fixes are:
- as long as the Android provides only a list of UUIDs (without any SDP) we should assume that all custom UUIDs are SPP.
- as long as Android allows only Rfcomm protocols we should set it to all (custom?) UUIDs and to the reserved SPP UUID.
Attachments
For Gerrit Dashboard: QTBUG-75035 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
258449,2 | Set rfcomm protocol to all custom UUIDs | 5.12 | qt/qtconnectivity | Status: ABANDONED | -2 | 0 |
258523,3 | Android: Increase chance of establishing serial connection w/o SPP uuid | 5.12 | qt/qtconnectivity | Status: MERGED | +2 | 0 |