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. 【Error:qt.bluetooth: Dummy backend running】A problem about using qbluetooth

【Error:qt.bluetooth: Dummy backend running】A problem about using qbluetooth

Scheduled Pinned Locked Moved Solved General and Desktop
qbluetooth
6 Posts 3 Posters 4.8k 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.
  • M Offline
    M Offline
    MartinChan
    wrote on last edited by MartinChan
    #1

    I am starting to do some work about bluetooth ,and I find an example on Qt tutorial and the code is like this:

    #include <QCoreApplication>
    #include <QBluetoothLocalDevice>
    #include <QDebug>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
    
        QBluetoothLocalDevice localDevice;
        QString localDevicename;
        if (localDevice.isValid()){
            localDevice.powerOn();
            localDevicename=localDevice.name();
            if (localDevicename.isEmpty()|localDevicename.isNull()){
                qDebug()<<"Nothing found in blue!";
            }
            localDevice.setHostMode(QBluetoothLocalDevice::HostDiscoverable);
            QList<QBluetoothAddress> remotes;
            remotes = localDevice.connectedDevices();
            qDebug()<<"The number of remoted devices is %d"<<remotes.size();
        }else qDebug()<<"My bluetooth didn't find!";
    
        return a.exec();
    }
    
    

    Nonetheless,the result told me:
    qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional.
    My bluetooth didn't find!

    It seems i didn't use any Virtual Machine tool or something else,so,how to solve it?

    miclandM 1 Reply Last reply
    0
    • M MartinChan

      I am starting to do some work about bluetooth ,and I find an example on Qt tutorial and the code is like this:

      #include <QCoreApplication>
      #include <QBluetoothLocalDevice>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          QBluetoothLocalDevice localDevice;
          QString localDevicename;
          if (localDevice.isValid()){
              localDevice.powerOn();
              localDevicename=localDevice.name();
              if (localDevicename.isEmpty()|localDevicename.isNull()){
                  qDebug()<<"Nothing found in blue!";
              }
              localDevice.setHostMode(QBluetoothLocalDevice::HostDiscoverable);
              QList<QBluetoothAddress> remotes;
              remotes = localDevice.connectedDevices();
              qDebug()<<"The number of remoted devices is %d"<<remotes.size();
          }else qDebug()<<"My bluetooth didn't find!";
      
          return a.exec();
      }
      
      

      Nonetheless,the result told me:
      qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional.
      My bluetooth didn't find!

      It seems i didn't use any Virtual Machine tool or something else,so,how to solve it?

      miclandM Offline
      miclandM Offline
      micland
      wrote on last edited by
      #2

      @MartinChan
      Unfortunately bluetooth is currently not (yet) supported on the windows platform.
      (see http://doc.qt.io/qt-5/qtbluetooth-index.html)
      "Currently, the API is supported on the following platforms: Android, iOS, Linux (BlueZ 4.x/5.x) and OS X"

      M 1 Reply Last reply
      0
      • miclandM micland

        @MartinChan
        Unfortunately bluetooth is currently not (yet) supported on the windows platform.
        (see http://doc.qt.io/qt-5/qtbluetooth-index.html)
        "Currently, the API is supported on the following platforms: Android, iOS, Linux (BlueZ 4.x/5.x) and OS X"

        M Offline
        M Offline
        MartinChan
        wrote on last edited by
        #3

        @micland :-( So,I can't get a bluetooth API when I use windows platform?Anyone can help??( ▼-▼ )

        miclandM 1 Reply Last reply
        0
        • M MartinChan

          @micland :-( So,I can't get a bluetooth API when I use windows platform?Anyone can help??( ▼-▼ )

          miclandM Offline
          miclandM Offline
          micland
          wrote on last edited by
          #4

          @MartinChan
          I think it's planned for futurue releases but the current version (5.7) comes not with builtin BT support on windows. So you can't use bluetooth on windows without a platform specific native implementation or a 3rd party library (perhaps someone else can suggest a Qt independant solution?)

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            There's a WIP branch for Windows that you can test against. You'll need to clone the QtConnectivity module from here and checkout the wip/win branch.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MartinChan
              wrote on last edited by
              #6

              Maybe there're two ways to solve this question:

              1)Windows SDK has included the bluetooth module,if you're familiar with Windows API development,it's a good choice to transplant it to Qt.

              2)There're some 3r-party sdk like Bluesoleil SDK.

              1 Reply Last reply
              0

              • Login

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