[Interest] Bluetooth example (btchat) not working on linux

Blasche Alexander Alexander.Blasche at digia.com
Mon Sep 22 09:50:10 CEST 2014


Based on your description the following call fails:

QBluetoothLocalDevice device(QBluetoothAddress());

It is supposed to find the local default adapter but it fails. I have a couple of questions:

What Bluez version do you use?
What version of Qt are you using?

If you use Bluez 4 please send me the output of the following command:

dbus-send --system --dest=org.bluez --print-reply / org.bluez.Manager.DefaultAdapter

If you have Bluez5 please send me the output of:

dbus-send --system --dest=org.bluez --print-reply / org.freedesktop.DBus.ObjectManager.GetManagedObjects

Note that the Bluez5 command will produce somewhat longer output.

--
Alex

________________________________________
From: interest-bounces+alexander.blasche=digia.com at qt-project.org [interest-bounces+alexander.blasche=digia.com at qt-project.org] on behalf of Andreas Ortmann [ortmann at finf.uni-hannover.de]
Sent: Sunday, September 21, 2014 22:57
To: interest at qt-project.org
Subject: [Interest] Bluetooth example (btchat) not working on linux

Hi,

I cannot get this example code working running under linux with Qt 5.3.
http://qt-project.org/doc/qt-5/qtbluetooth-btchat-example.html

Captured debug output when running on the Desktop:
starting
/home/andi/ims/sensor-fusion/bt/build-btchat-Desktop-Debug/btchat...
qt.bluetooth.bluez: Device does not support Bluetooth or
"00:00:00:00:00:00" is not a valid local adapter
Cannot bind chat server to "00:00:00:00:00:00"


If I cross-compile it for android, start it on the android device and
run "rfcomm connect hci0 XX:XX:XX:XX:XX:XX 5" on a terminal on the linux
desktop, I can communicate with the app running on android by
reading/writing to the file descriptor /dev/rfcomm0.

Can someone given me some hint what could be the problem?

With best regards,
Andreas
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list