Qt for Linux built in: Cannot get QBluetoothLocalDevice

I have an embedded Linux device using Linux 3.17 kernel and WiLink 8 wireless module as bluetooth device (UART used) (see Gumstix AirStorm-y). Also, I have Qt 5.3.2 and Bluez 4.101 installed.

My problem is that when I start my Qt application, I cannot get information about my bluetooth device using QBluetoothLocalDevice

. For example, it QBluetoothLocalDevice::allDevices()

always returns an empty list, but QBluetoothLocalDevice::address()

always returns "00: 00: 00: 00: 00: 00". If I try to follow the chat example, I get an error 'Cannot bind chat server to "00:00:00:00:00:00"'

.

I'm sure my bluetooth device is up and running:

hci0:  
Type: BR / EDR Bus: UART  
BD Address: 5C: 31: 3E: CE: C3: CE ACL MTU: 1021: 6 SCO MTU: 180: 4  
UP RUNNING PSCAN  
RX bytes: 657 acl: 0 sco: 0 events: 37 errors: 0  
TX bytes: 979 acl: 0 sco: 0 commands: 37 errors: 0  

I can also scan with hcitools.
Dbus also works correctly, when I do dbus-send --system --dest=org.bluez --print-reply / org.bluez.Manager.DefaultAdapter

I get:

method return sender =: 1.5 -> dest =: 1.12 reply_serial = 2  
object path "/ org / bluez / 1743 / hci0"

In my application everything else works fine (I have a QTCPserver and a file manager with a QFileSystemWatcher), this is only the BLuetooth part that I cannot get to work with.

+3


source to share





All Articles