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

Trouble getting Bluetooth example working on Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.0
    • None
    • Ubuntu 20.04.1 LTS
    • Linux/X11

    Description

      Hi @all, 

      I am not sure how to categorize my issue. I can not get the example btchat working on Linux (Ubuntu 20.04.1 LTS) . I can not connect to a HC-05 module connected to another computer via serial Interface. The Search wasn t providing any devices. So I had to do a minor modification to get at least available devices listed:

      replace

      m_discoveryAgent->start(QBluetoothServiceDiscoveryAgent::FullDiscovery)

      with 

      m_discoveryAgent->start().

      I really do not know why this was needed. At least after that I get some devices listed.

      After starting the program and pressing the connect button I get this warning below :

      qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.

      After double cliking on the device(HC05) I got this output in Application Output window:

      Discovered service on "TRICORE-BT" "98:D3:71:F5:F8:1F"

         Service name: "Serial Port Profile"

         Description: ""

         Provider: ""

         L2CAP protocol service multiplexer: 0

         RFCOMM server channel: -1

      And nothing else happens. Binding seems also not successful. please also note the -1 at RFCOMM server channel

      To rule out that the example has a bug, I tried the same thing on a windows machine. There everything worked fine. RFCOMM server channel was set to one.
      So the issue is related to my linux machine. What is missing on my machine ? Can you please help ?

       

       -

      Attachments

        1. BluetoothDebug.txt
          25 kB
          Fred Me
        2. syslog.txt
          3 kB
          Fred Me
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ablasche Alex Blasche
            freaf87 Fred Me
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes