8

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.

7
  • hcitool does not use bluez, it directly communicates to kernel, check if bluez is running (bluetoothd) as i think bluetoothd daemon is not running Commented Aug 22, 2013 at 3:51
  • Thanks, yes it is running: [root@alarmpi ~]# ps aux | grep bluetooth root 134 0.0 0.4 4220 1908 ? Ss Aug21 0:00 /usr/lib/bluetooth/bluetoothd Commented Aug 22, 2013 at 3:53
  • 1 more check , is "sdptool browse local" gives you the o/p Commented Aug 22, 2013 at 4:26
  • Thanks - that failed: ## sdptool browse local Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory ## - what does this error mean ?? Commented Aug 22, 2013 at 4:46
  • this means that bluetoothd is not running, or bluetoothd is not registered to dbus. Commented Aug 22, 2013 at 4:53

1 Answer 1

4
+25
  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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.