[Interest] Bluetooth example (btchat) not working on linux
Andreas Ortmann
ortmann at finf.uni-hannover.de
Mon Sep 22 10:44:53 CEST 2014
I'm using Qt5.3 on 64 bit linux installed with the online installer
package qt-opensource-linux-x64-1.6.0-4-online.run.
The output of querying for Bluez5 is attached.
Greetings,
Andreas
On 09/22/14 09:50, Blasche Alexander wrote:
> 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
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
method return sender=:1.2 -> dest=:1.65 reply_serial=2
array [
dict entry(
object path "/org/bluez"
array [
dict entry(
string "org.freedesktop.DBus.Introspectable"
array [
]
)
dict entry(
string "org.bluez.AgentManager1"
array [
]
)
dict entry(
string "org.bluez.ProfileManager1"
array [
]
)
dict entry(
string "org.bluez.Alert1"
array [
]
)
dict entry(
string "org.bluez.HealthManager1"
array [
]
)
]
)
dict entry(
object path "/org/bluez/hci0"
array [
dict entry(
string "org.freedesktop.DBus.Introspectable"
array [
]
)
dict entry(
string "org.bluez.Adapter1"
array [
dict entry(
string "Address"
variant string "50:63:13:C7:92:69"
)
dict entry(
string "Name"
variant string "stealth-wire"
)
dict entry(
string "Alias"
variant string "stealth-wire"
)
dict entry(
string "Class"
variant uint32 1835276
)
dict entry(
string "Powered"
variant boolean true
)
dict entry(
string "Discoverable"
variant boolean true
)
dict entry(
string "DiscoverableTimeout"
variant uint32 0
)
dict entry(
string "Pairable"
variant boolean true
)
dict entry(
string "PairableTimeout"
variant uint32 0
)
dict entry(
string "Discovering"
variant boolean false
)
dict entry(
string "UUIDs"
variant array [
string "00001200-0000-1000-8000-00805f9b34fb"
string "00001800-0000-1000-8000-00805f9b34fb"
string "00001801-0000-1000-8000-00805f9b34fb"
string "0000110e-0000-1000-8000-00805f9b34fb"
string "0000110c-0000-1000-8000-00805f9b34fb"
string "00001133-0000-1000-8000-00805f9b34fb"
string "00001132-0000-1000-8000-00805f9b34fb"
string "0000112f-0000-1000-8000-00805f9b34fb"
string "00001104-0000-1000-8000-00805f9b34fb"
string "00001106-0000-1000-8000-00805f9b34fb"
string "00001105-0000-1000-8000-00805f9b34fb"
string "00005005-0000-1000-8000-0002ee000001"
string "0000110a-0000-1000-8000-00805f9b34fb"
string "0000110b-0000-1000-8000-00805f9b34fb"
]
)
dict entry(
string "Modalias"
variant string "usb:v1D6Bp0246d0517"
)
]
)
dict entry(
string "org.freedesktop.DBus.Properties"
array [
]
)
dict entry(
string "org.bluez.Media1"
array [
]
)
dict entry(
string "org.bluez.CyclingSpeedManager1"
array [
]
)
dict entry(
string "org.bluez.HeartRateManager1"
array [
]
)
dict entry(
string "org.bluez.ThermometerManager1"
array [
]
)
dict entry(
string "org.bluez.NetworkServer1"
array [
]
)
]
)
dict entry(
object path "/org/bluez/hci0/dev_00_1A_7D_D0_20_FD"
array [
dict entry(
string "org.freedesktop.DBus.Introspectable"
array [
]
)
dict entry(
string "org.bluez.Device1"
array [
dict entry(
string "Address"
variant string "00:1A:7D:D0:20:FD"
)
dict entry(
string "Name"
variant string "TT-BH03"
)
dict entry(
string "Alias"
variant string "TT-BH03"
)
dict entry(
string "Class"
variant uint32 2360324
)
dict entry(
string "Icon"
variant string "audio-card"
)
dict entry(
string "Paired"
variant boolean true
)
dict entry(
string "Trusted"
variant boolean true
)
dict entry(
string "Blocked"
variant boolean false
)
dict entry(
string "LegacyPairing"
variant boolean false
)
dict entry(
string "Connected"
variant boolean false
)
dict entry(
string "UUIDs"
variant array [
string "00001108-0000-1000-8000-00805f9b34fb"
string "0000110b-0000-1000-8000-00805f9b34fb"
string "0000110c-0000-1000-8000-00805f9b34fb"
string "0000110e-0000-1000-8000-00805f9b34fb"
string "0000111e-0000-1000-8000-00805f9b34fb"
]
)
dict entry(
string "Adapter"
variant object path "/org/bluez/hci0"
)
]
)
dict entry(
string "org.freedesktop.DBus.Properties"
array [
]
)
dict entry(
string "org.bluez.MediaControl1"
array [
dict entry(
string "Connected"
variant boolean false
)
]
)
]
)
dict entry(
object path "/org/bluez/hci0/dev_CC_FA_00_7B_9E_D3"
array [
dict entry(
string "org.freedesktop.DBus.Introspectable"
array [
]
)
dict entry(
string "org.bluez.Device1"
array [
dict entry(
string "Address"
variant string "CC:FA:00:7B:9E:D3"
)
dict entry(
string "Name"
variant string "Nexus 5"
)
dict entry(
string "Alias"
variant string "Nexus 5"
)
dict entry(
string "Class"
variant uint32 5898764
)
dict entry(
string "Icon"
variant string "phone"
)
dict entry(
string "Paired"
variant boolean true
)
dict entry(
string "Trusted"
variant boolean true
)
dict entry(
string "Blocked"
variant boolean false
)
dict entry(
string "LegacyPairing"
variant boolean false
)
dict entry(
string "Connected"
variant boolean false
)
dict entry(
string "UUIDs"
variant array [
string "00001105-0000-1000-8000-00805f9b34fb"
string "0000110a-0000-1000-8000-00805f9b34fb"
string "0000110c-0000-1000-8000-00805f9b34fb"
string "0000110d-0000-1000-8000-00805f9b34fb"
string "0000110e-0000-1000-8000-00805f9b34fb"
string "00001112-0000-1000-8000-00805f9b34fb"
string "00001115-0000-1000-8000-00805f9b34fb"
string "00001116-0000-1000-8000-00805f9b34fb"
string "0000111f-0000-1000-8000-00805f9b34fb"
string "0000112f-0000-1000-8000-00805f9b34fb"
string "00001132-0000-1000-8000-00805f9b34fb"
string "00001200-0000-1000-8000-00805f9b34fb"
string "00001800-0000-1000-8000-00805f9b34fb"
string "00001801-0000-1000-8000-00805f9b34fb"
string "e8e10f95-1a70-4b27-9ccf-02010264e9c8"
]
)
dict entry(
string "Modalias"
variant string "bluetooth:v000Fp1200d1436"
)
dict entry(
string "Adapter"
variant object path "/org/bluez/hci0"
)
]
)
dict entry(
string "org.freedesktop.DBus.Properties"
array [
]
)
dict entry(
string "org.bluez.ProximityReporter1"
array [
dict entry(
string "LinkLossAlertLevel"
variant string "none"
)
dict entry(
string "ImmediateAlertLevel"
variant string "none"
)
]
)
dict entry(
string "org.bluez.Network1"
array [
dict entry(
string "Connected"
variant boolean false
)
]
)
dict entry(
string "org.bluez.MediaControl1"
array [
dict entry(
string "Connected"
variant boolean false
)
]
)
]
)
dict entry(
object path "/org/bluez/hci0/dev_70_18_8B_FE_DE_4A"
array [
dict entry(
string "org.freedesktop.DBus.Introspectable"
array [
]
)
dict entry(
string "org.bluez.Device1"
array [
dict entry(
string "Address"
variant string "70:18:8B:FE:DE:4A"
)
dict entry(
string "Name"
variant string "SONY:CMT-BT60"
)
dict entry(
string "Alias"
variant string "SONY:CMT-BT60"
)
dict entry(
string "Class"
variant uint32 2360340
)
dict entry(
string "Icon"
variant string "audio-card"
)
dict entry(
string "Paired"
variant boolean true
)
dict entry(
string "Trusted"
variant boolean true
)
dict entry(
string "Blocked"
variant boolean false
)
dict entry(
string "LegacyPairing"
variant boolean false
)
dict entry(
string "Connected"
variant boolean false
)
dict entry(
string "UUIDs"
variant array [
string "0000110b-0000-1000-8000-00805f9b34fb"
string "0000110c-0000-1000-8000-00805f9b34fb"
string "0000110d-0000-1000-8000-00805f9b34fb"
string "0000110e-0000-1000-8000-00805f9b34fb"
]
)
dict entry(
string "Adapter"
variant object path "/org/bluez/hci0"
)
]
)
dict entry(
string "org.freedesktop.DBus.Properties"
array [
]
)
dict entry(
string "org.bluez.MediaControl1"
array [
dict entry(
string "Connected"
variant boolean false
)
]
)
]
)
]
More information about the Interest
mailing list