4

I finally managed to get music from my phone to play on Ubuntu using BlueZ. I'm now looking for a way to control the playback - play/pause/next/prev/get song name/etc from the Ubuntu machine. This should be supported by the AVRCP profile, and the bluez site says it supports AVRCP 1.5 (that's the latest AFAIK).

However I cannot find any documentation on how to use that AVRCP profile - either through API/d-bus or using some program.

I found a document, which describes some d-bus API: https://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/media-api.txt

But when I use the d-feet tool to browse the services, I don't see those play/pause/next APIs. Only volumeUp/Down which don't seem to work.

My bluez version is 4.x. Is AVRCP supported only in BlueZ 5?

Any help/documentation on this would be much appreciated!

1 Answer 1

2

After lots of digging I figured a few things out:

  • AVRCP is working fine, but in Bluez > 5. Ubuntu currently (14.04) has Bluez4, so building from source is needed.
  • The way to communicate with the Bluez stack is through DBus messages, the d-feet tool is very handy in this
  • PulseAudio and oFono are also needed in order to get the most of the bluetooth stack - all need to be built from source, because some of the bluetooth features are not supported in the prepackaged versions.
3
  • I don't see any DBus messages for playing or pausing. Any ideas?
    – Andrew
    Sep 5, 2015 at 22:23
  • @SantaClaus when you open d-feet, go to org.bluez, select org/bluez/hci0/dev_XXXXXX, org.bluez.MediaControl -> it's there. If you don't have that MediaControl interface, make sure you have bluez version > 5 and also pulseaudio 6 (it's probably pulseaudio that provides this, but I'm not sure).
    – LachoTomov
    Sep 7, 2015 at 7:37
  • I had really old versions of both (I guess the versions in apt-get on debian wheezy are old), and that was the problem. Thanks!
    – Andrew
    Sep 8, 2015 at 0:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .