QT bluetooth not working on Raspberry Pi
Unsolved
Mobile and Embedded
-
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 -
@Avtansh-Sharma
Did you try to get a list of all local devices with http://doc.qt.io/qt-5/qbluetoothlocaldevice.html#allDevices ?