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

SDP service discovery fails if target device does not support browsing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.6.2, 5.7.1
    • 5.6.0
    • None
    • Bluez5

    Description

      QBluetoothSocket::connectToService(QBluetoothAddress, QBluetoothUuid, OpenMode)
      

      Requires an SDP scan of the target device to find the Serialport service. Currently a complete device discovery (sdptool browse) is done. However not all target devices support this mechanism. As a consequence the sdpscanner returns with the following error:

      qt.bluetooth.bluez: Bluez 5 detected.
      ###### Starting service discovery process
      qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
      qt.bluetooth.bluez: Discovered:  "00:06:66:74:43:01" "RNBT-4301" Num UUIDs 1 total device 0 cached RSSI 0 Class 7936
      qt.bluetooth.bluez: Discovered:  "F1:58:67:AA:C7:13" "MX Master" Num UUIDs 6 total device 1 cached RSSI 0 Class 0
      qt.bluetooth.bluez: Discovered:  "D2:A7:46:09:0B:A6" "estimote" Num UUIDs 0 total device 2 cached RSSI -79 Class 0
      qt.bluetooth.bluez: Discovered:  "F5:40:1B:04:2D:93" "estimote" Num UUIDs 0 total device 3 cached RSSI -76 Class 0
      qt.bluetooth.bluez: Discovered:  "D6:3F:66:38:F3:A7" "estimote" Num UUIDs 0 total device 4 cached RSSI -86 Class 0
      qt.bluetooth.bluez: Discovered:  "EF:9C:A2:06:84:53" "estimote" Num UUIDs 0 total device 5 cached RSSI -83 Class 0
      qt.bluetooth.bluez: Discovered:  "E6:7B:B6:79:D8:1E" "estimote" Num UUIDs 0 total device 6 cached RSSI -88 Class 0
      qt.bluetooth.bluez: Discovered:  "D2:A1:6A:70:81:AE" "estimote" Num UUIDs 0 total device 7 cached RSSI -79 Class 0
      qt.bluetooth.bluez: Discovered:  "74:DE:53:83:C6:94" "74-DE-53-83-C6-94" Num UUIDs 0 total device 8 cached RSSI -86 Class 0
      qt.bluetooth.bluez: Discovered:  "51:53:27:C6:6B:92" "51-53-27-C6-6B-92" Num UUIDs 0 total device 9 cached RSSI -92 Class 0
      qt.bluetooth.bluez: Updating RSSI for "D2:A7:46:09:0B:A6" QVariant(short, -90)
      qt.bluetooth.bluez: Discovered:  "00:06:66:74:41:14" "RNBT-4114" Num UUIDs 0 total device 10 cached RSSI -68 Class 7936
      qt.bluetooth.bluez: Updating RSSI for "F5:40:1B:04:2D:93" QVariant(short, -84)
      qt.bluetooth.bluez: Updating RSSI for "D2:A7:46:09:0B:A6" QVariant(short, -79)
      qt.bluetooth.bluez: Discovered:  "71:AF:87:C0:92:A6" "71-AF-87-C0-92-A6" Num UUIDs 0 total device 11 cached RSSI -97 Class 0
      qt.bluetooth.bluez: Discovered:  "DF:97:E0:5D:14:B7" "DF-97-E0-5D-14-B7" Num UUIDs 0 total device 12 cached RSSI -94 Class 0
      qt.bluetooth.bluez: Updating RSSI for "D2:A7:46:09:0B:A6" QVariant(short, -87)
      qt.bluetooth.bluez: Updating RSSI for "F5:40:1B:04:2D:93" QVariant(short, -75)
      qt.bluetooth.bluez: Updating RSSI for "00:06:66:74:41:14" QVariant(short, -76)
      qt.bluetooth.bluez: Updating RSSI for "E6:7B:B6:79:D8:1E" QVariant(short, -78)
      qt.bluetooth.bluez: Updating RSSI for "D2:A7:46:09:0B:A6" QVariant(short, -78)
      qt.bluetooth.bluez: Discovered:  "FC:8E:17:60:87:46" "EST" Num UUIDs 1 total device 13 cached RSSI -93 Class 0
      qt.bluetooth.bluez: Updating RSSI for "F5:40:1B:04:2D:93" QVariant(short, -83)
      qt.bluetooth.bluez: Updating RSSI for "00:06:66:74:41:14" QVariant(short, -64)
      qt.bluetooth.bluez: Updating RSSI for "00:06:66:74:41:14" QVariant(short, -83)
      qt.bluetooth.bluez: Discovered:  "D2:AC:5E:BB:76:B8" "EST" Num UUIDs 0 total device 14 cached RSSI -92 Class 0
      qt.bluetooth.bluez: Discovery on:  "D2:AC:5E:BB:76:B8" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "FC:8E:17:60:87:46" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "DF:97:E0:5D:14:B7" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "71:AF:87:C0:92:A6" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "00:06:66:74:41:14" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      Newly connected device "00:06:66:74:41:14"
      qt.bluetooth.bluez: Discovery on:  "51:53:27:C6:6B:92" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      Newly disconnected device "00:06:66:74:41:14"
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "74:DE:53:83:C6:94" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "D2:A1:6A:70:81:AE" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "E6:7B:B6:79:D8:1E" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "EF:9C:A2:06:84:53" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "D6:3F:66:38:F3:A7" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "F5:40:1B:04:2D:93" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "D2:A7:46:09:0B:A6" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "F1:58:67:AA:C7:13" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      qt.bluetooth.bluez: Discovery on:  "00:06:66:74:43:01" Mode: QBluetoothServiceDiscoveryAgent::DiscoveryMode(FullDiscovery)
      qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3
      ###### Service Discovery Finished
      Newly connected device "00:06:66:74:41:14"
      Newly disconnected device "00:06:66:74:41:14"
      Newly connected device "00:06:66:74:41:14"
      Newly disconnected device "00:06:66:74:41:14"
      

      However targeted service scan is still possible as proven by
      https://bugreports.qt.io/browse/QTBUG-47593?focusedCommentId=317934&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-317934

      Since the above QBluetoothSocket::connectToService() call only requires a specific target scan it should still be possible to find the service.

      This requires changes to sdpscanner, QBluetoothDeviceDiscoveryAgent on Bluez5 and the QBluetoothSocket implementation.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-53041
          # Subject Branch Project Status CR V

          Activity

            People

              ablasche Alex Blasche
              ablasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes