Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get any replies to dbus-send

I am trying to create some scripts to discover and pair bluetooth devices on a embedded arch linux platform and seem unable to get any replies to dbus-send commands.

The error message is pretty much always the same (method does not exist), however the syntax of the send appears to be correct.

I have googled and searched here for the correct syntax and the errors, but have been unable to find any solutions.

[root@alarmpi ~]# dbus-send --system --dest=org.bluez --print-reply / org.bluez.Manager.GetProperties
Error org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist


[root@alarmpi ~]# dbus-send --system --print-reply --dest=org.bluez /org/bluez/134/hci0 org.bluez.Adapter.GetProperties
Error org.freedesktop.DBus.Error.UnknownObject: Method "GetProperties" with signature "" on interface "org.bluez.Adapter" doesn't exist

Bluez is installed, and I can use the hcitool and bluetoothctl utilities to manually discover and pair devices, however that method is not workable for an end-user and I need to create a web interface for them to perform the discovery and pairing.

It seems that dbus is the preferred method for doing this, as bluetoothctl does not accept command line arguments to allow it to pair a device address.

Any help / suggestions would be much appreciated.

like image 983
crankshaft Avatar asked Aug 22 '13 03:08

crankshaft


1 Answers

  1. Verify that bluetoothd is running,
  2. Install a program called d-feet which is a D-Bus debugger and see if the org.bluez is present on the system bus tab,
  3. If it is navigate to the destination Object, Interface and Method which is "/", "org.bluez.Manager" and "GetProperties" respectively,
  4. Double click the method name (GetProperties) and click execute without any arguments
  5. The output should be something like {u'Adapters': ['/org/bluez/709/hci0']}, if it's not - you have a problem with your bluetoothd,

Btw. your command is correct.

like image 147
racic Avatar answered Oct 14 '22 21:10

racic