2

I am having a difficult time understanding how to implement AVRCP with my project. I have searched quite a bit and read many datasheets, but I still seem to be missing something...

Here is what I want to do:

Simply put, i want to be able to connect with my android 4.3 device via bluetooth to stream music via A2DP (which seems pretty straight forward) as long as the bluetooth module supports A2DP. Additionally, i want to be able to control the media player app (Pandora, etc). Now, i know that AVRCP 1.0 supports only basic control commands (pause, play, next, prev, FF, RW), and I have found many bluetooth modules online that support sending these commands via simple UART AT commands or commands via an SPI bus. However, I also want to be able to get metadata from the android device (which is an AVRCP 1.3+ only capability), such as track name, album name, artist name, track length, and elapsed time.

Now, from what I understand, to get metadata, I need a bluetooth module that supports AVRCP 1.3 or higher. What I cannot understand is HOW one requests the metadata! From what I read, metadata, such as track name, artist, ablum, and track length, are are sent in response to a track change command. Can anyone confirm this? What about if I need to request the elapsed time?

Ideally, I am looking for a bluetooth module that support A2DP (24 bit if available) and AVRCP 1.3 or higher with a UART or SPI or I2C interface where I can send it play, pause, next, prev commands to control the music player and request artist, album, track name, elapsed time, track length metadata.

This is the only unit that I have found that mentions metadata in the datasheet: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/Bluetooth/Melody_5.0_Manual-RevD-RC10-Release.pdf (pg.16)

But I am still unclear how this works!

Any assistance here would be great!

radensb
  • 664
  • 1
  • 7
  • 25
  • AVRCP supports 2 roles.target and controller, to send all metadata information you need to define target role, refer [media.doc](https://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/media-api.txt?id=4.101). Check for the APIS, you need to register media player and pass the metadata and track information. If controller changes any parameter, Media interface SetProperty() would be called and PropertyChanged signal needs to be emit from your code to bluez with all values, docs are bit clear.In case you are using other stack than bluez, this will not work – ashish Feb 12 '14 at 08:27
  • possible duplicate of [send track informations via A2DP/AVRCP](http://stackoverflow.com/questions/15527614/send-track-informations-via-a2dp-avrcp) – Phrogz Mar 03 '15 at 16:57

2 Answers2

1

First, you should have a look at this document: https://developer.bluetooth.org/TechnologyOverview/Documents/AVRCP_SPEC.pdf

To get the metadata from the source, you must use the following command: GetElementAttributes()

To know how to use that function and which parameters to set, go to page 53 in the datasheet. Whit that function, you have access to the following attributes: Title, Artist Name, Album Name, Track Number, Total number of tracks, Genre, Playing time. The source will response with the desired attributes. For the list of all attributes with their specific ids, see appendix E on page 132.

Ajeett
  • 814
  • 2
  • 7
  • 18
Michaud
  • 19
  • 2
1

You may want to check out the BlueGiga WT-32i chip: https://www.bluegiga.com/en-US/products/bluetooth-classic-modules/wt32-bluetooth--audio-module/

It supports AVRCP 1.5, and in Section 6.8 of their manual (http://www.microtechnica.tv/support/manual/iWRAP5_User_Guide.pdf), it appears to have commands to retrieve track metadata.

Robert Hui
  • 744
  • 4
  • 8