How to open /dev/rfcomm0
-
Hi
I want to get my location from a gps Bluetooth device . First i create a connexion with the device using Bluetooth manager which create a /dev/rfcomm0 then i tested this ode but it didn't seems to open the device :
@
#include <QtCore/QCoreApplication>
#include <QFile>
#include <QDebug>int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QFile file("/dev/rfcomm0");
if (file.open(QFile::ReadOnly)) {
qDebug() << "yatta";
}
else qDebug() << ":(";return a.exec();
}@
this is the output i get :
@Starting /home/morpheus/Qtproject/gps-build-desktop/gps...
:( @
I m planning on using the QNmeaPositionInfoSource class to get all necessary infos .Thanks in advance .
-
I've once tried to feed the raw NMEA data of my BT GPS through QNmeaPositionInfoSource without much success. I recently wrote gpsdpositioninfosource as part of cacheme which you'll find "here":https://api.pub.meego.com/public/source/home:harbaum/cacheme/cacheme_0.7.1.tar.gz?rev=f6f5ba90aa3bf9e217cadc7d212e0291&
This connects to gpsd which in turn can access your bluetooth gps via /dev/rfcomm