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 in windows
Forum Update on Monday, May 27th 2025

Bluetooth Pairing in windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 653 Views
  • 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.
  • S Offline
    S Offline
    Stefano84
    wrote on last edited by
    #1

    Hello everyone,
    i need help regarding automatic pairing of bluetooth devices in windows 10.
    I use QT Creator 4.11.
    The problem is this: after finding bluetooth devices with the QBluetoothServiceDiscoveryAgent class I can't understand if these devices are paired. The QBluetoothLocalDevice :: Pairing function always returns the QBluetoothLocalDevice :: Unpaired value even if the device is paired.
    Also I do not understand how to automatically pair the device. That is, I want to pair the device without going through the operating system but writing code in qt.
    Can anyone help me out?
    Thanks so much.

    A 1 Reply Last reply
    0
    • S Stefano84

      Hello everyone,
      i need help regarding automatic pairing of bluetooth devices in windows 10.
      I use QT Creator 4.11.
      The problem is this: after finding bluetooth devices with the QBluetoothServiceDiscoveryAgent class I can't understand if these devices are paired. The QBluetoothLocalDevice :: Pairing function always returns the QBluetoothLocalDevice :: Unpaired value even if the device is paired.
      Also I do not understand how to automatically pair the device. That is, I want to pair the device without going through the operating system but writing code in qt.
      Can anyone help me out?
      Thanks so much.

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

      @Stefano84 at client side you start a service discovery searching for the UUID advertised by your bluetooth device and once you have found it you use the resulting QBluetoothServiceInfo instance together with QBluetoothSocket and connect to the device.

      This Example will help you.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Stefano84
        wrote on last edited by
        #3

        Hi anil_arise,

        thanks for your answer. I knew the example and in fact I started from that. But the example does not solve my problem. I can find bluetooth devices but I can't pair them.
        Do you have any suggestions to give me?
        I use MiniGW 64bit as a compiler.
        Someone suggests me to use MSVC2017 64bit.
        What do you think about it?

        Thank you.

        J.HilkJ 1 Reply Last reply
        0
        • S Stefano84

          Hi anil_arise,

          thanks for your answer. I knew the example and in fact I started from that. But the example does not solve my problem. I can find bluetooth devices but I can't pair them.
          Do you have any suggestions to give me?
          I use MiniGW 64bit as a compiler.
          Someone suggests me to use MSVC2017 64bit.
          What do you think about it?

          Thank you.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @Stefano84

          I use MiniGW 64bit as a compiler.
          Someone suggests me to use MSVC2017 64bit.
          What do you think about it?

          Bluetooth on windows used to only work with MSVC due to uwp api's that where used.
          I don't know if that changed in the latest version nor do I know what version of Qt you use at all.


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          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