Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75035

Serial connections not always working due to discovery limitations on Android

    XMLWordPrintable

Details

    • Android
    • 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

        Activity

          People

            ablasche Alex Blasche
            taipan BogDan Vatra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes