Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT bluetooth not working on Raspberry Pi
Qt 6.11 is out! See what's new in the release blog

QT bluetooth not working on Raspberry Pi

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 1.4k 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.
  • A Offline
    A Offline
    Avtansh Sharma
    wrote on last edited by Avtansh Sharma
    #1

    Hi,

    I ran following code on Raspbian .
    Hardware:- Raspberry Pi3

    #include <QCoreApplication>

    #include <QBluetoothAddress>
    //#include <QBluetoothLocalDevice>
    #include <QDebug>
    #include <qbluetoothlocaldevice.h>
    int main(int argc, char *argv[])
    {

    QCoreApplication a(argc, argv);
    

    QBluetoothLocalDevice aa;
    aa.powerOn();
    qDebug()<<"name:"<<aa.name();
    qDebug()<<aa.address().toString();

    qDebug()<<"hi";
    }

    Output is:-

    name: ""
    "00:00:00:00:00:00"
    hi

    --
    Regards,
    Avtansh Sharma

    jsulmJ 1 Reply Last reply
    0
    • A Avtansh Sharma

      Hi,

      I ran following code on Raspbian .
      Hardware:- Raspberry Pi3

      #include <QCoreApplication>

      #include <QBluetoothAddress>
      //#include <QBluetoothLocalDevice>
      #include <QDebug>
      #include <qbluetoothlocaldevice.h>
      int main(int argc, char *argv[])
      {

      QCoreApplication a(argc, argv);
      

      QBluetoothLocalDevice aa;
      aa.powerOn();
      qDebug()<<"name:"<<aa.name();
      qDebug()<<aa.address().toString();

      qDebug()<<"hi";
      }

      Output is:-

      name: ""
      "00:00:00:00:00:00"
      hi

      --
      Regards,
      Avtansh Sharma

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Avtansh-Sharma
      Did you try to get a list of all local devices with http://doc.qt.io/qt-5/qbluetoothlocaldevice.html#allDevices ?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Avtansh-Sharma
        Did you try to get a list of all local devices with http://doc.qt.io/qt-5/qbluetoothlocaldevice.html#allDevices ?

        A Offline
        A Offline
        Avtansh Sharma
        wrote on last edited by
        #3

        @jsulm I tried using link

        QBluetoothLocalDevice aa;
        aa.powerOn();
        QList<QBluetoothHostInfo> b;

        b=aa.allDevices();

        b had zero count. i.e QT was unable to detect any device.

        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