Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Bluetooth pairing fails
Qt 6.11 is out! See what's new in the release blog

Bluetooth pairing fails

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by
    #1

    I am attempting to pair my Linux Qt5 host with a device offering RFCOMM, and the service is already discovered. I try to pair with the device's address as follows:

    m_adapterPtr->requestPairing(remoteService.device().address(),QBluetoothLocalDevice::Paired);
    

    But this always results in:

    qt.bluetooth.bluez: Failed to create pairing "org.bluez.Error.AuthenticationCanceled"
    

    There are no signals emitted (other than state changed to pairing. Am I missing a step?

    A C TalklessT 3 Replies Last reply
    0
    • ocgltdO ocgltd

      I am attempting to pair my Linux Qt5 host with a device offering RFCOMM, and the service is already discovered. I try to pair with the device's address as follows:

      m_adapterPtr->requestPairing(remoteService.device().address(),QBluetoothLocalDevice::Paired);
      

      But this always results in:

      qt.bluetooth.bluez: Failed to create pairing "org.bluez.Error.AuthenticationCanceled"
      

      There are no signals emitted (other than state changed to pairing. Am I missing a step?

      A Offline
      A Offline
      Anonymous_Banned275
      wrote on last edited by Anonymous_Banned275
      #2

      @ocgltd Did you try QBluetoothLocalDevice::AuthorizedPaired

      Per doc - if pairing fails you do not get "pairingDone",
      I think there is an error SIGNAL I am about to try.

      I am having heck of a time making sure Bluetooth service is actually running.

      PS I just noticed - the error does not makes sense.

      AuthenticationCanceled - should it be " pairing not authorized " instead? bluez is weird ...

      1 Reply Last reply
      0
      • ocgltdO ocgltd

        I am attempting to pair my Linux Qt5 host with a device offering RFCOMM, and the service is already discovered. I try to pair with the device's address as follows:

        m_adapterPtr->requestPairing(remoteService.device().address(),QBluetoothLocalDevice::Paired);
        

        But this always results in:

        qt.bluetooth.bluez: Failed to create pairing "org.bluez.Error.AuthenticationCanceled"
        

        There are no signals emitted (other than state changed to pairing. Am I missing a step?

        C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #3

        @ocgltd What are you seeing in your slot attached to errorOccurred()?

        Are you sure you need to pair to use an RFCOMM service? This seems to indicate only a QBluetoothSocket is involved.

        ocgltdO 1 Reply Last reply
        0
        • C ChrisW67

          @ocgltd What are you seeing in your slot attached to errorOccurred()?

          Are you sure you need to pair to use an RFCOMM service? This seems to indicate only a QBluetoothSocket is involved.

          ocgltdO Offline
          ocgltdO Offline
          ocgltd
          wrote on last edited by
          #4

          @ChrisW67 The errorOccured signal is never emitted.

          I'm not sure if a need to pair (to eventually connect to the RFCOMM service), but regardless shouldn't I be able to pair with the device?

          A 1 Reply Last reply
          0
          • ocgltdO ocgltd

            @ChrisW67 The errorOccured signal is never emitted.

            I'm not sure if a need to pair (to eventually connect to the RFCOMM service), but regardless shouldn't I be able to pair with the device?

            A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by
            #5

            @ocgltd You and are "fighting same battle" - not that helps you... My latest "observation" - since I have one local adapter and multiple remote devices - I am making sure only one remote device is paired...not sure if that is even necessary....

            1 Reply Last reply
            0
            • ocgltdO ocgltd

              I am attempting to pair my Linux Qt5 host with a device offering RFCOMM, and the service is already discovered. I try to pair with the device's address as follows:

              m_adapterPtr->requestPairing(remoteService.device().address(),QBluetoothLocalDevice::Paired);
              

              But this always results in:

              qt.bluetooth.bluez: Failed to create pairing "org.bluez.Error.AuthenticationCanceled"
              

              There are no signals emitted (other than state changed to pairing. Am I missing a step?

              TalklessT Offline
              TalklessT Offline
              Talkless
              wrote on last edited by
              #6

              @ocgltd said in Bluetooth pairing fails:

              qt.bluetooth.bluez: Failed to create pairing "org.bluez.Error.AuthenticationCanceled"

              I too get same error but without error signals... Have you found out way to handle it?

              I guess workaround could be to monitor for (arbitrary) timeout once pairing request is created...

              1 Reply Last reply
              0
              • TalklessT Offline
                TalklessT Offline
                Talkless
                wrote on last edited by
                #7

                I've created bug report: https://bugreports.qt.io/browse/QTBUG-118895

                1 Reply Last reply
                0
                • TalklessT Offline
                  TalklessT Offline
                  Talkless
                  wrote on last edited by
                  #8

                  Fix will be available in Qt 6.7.

                  1 Reply Last reply
                  1

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved