简体   繁体   English

蓝牙 A2DP + AVRCP 1.3+ 模块

[英]Bluetooth A2DP + AVRCP 1.3+ module

I am having a difficult time understanding how to implement AVRCP with my project.我有困难的时候了解如何与我的项目实施AVRCP。 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.简单地说,我希望能够用我的Android 4.3设备通过蓝牙A2DP通过连接到流媒体音乐(这似乎相当直截了当)只要蓝牙模块支持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.现在,我知道 AVRCP 1.0 仅支持基本控制命令(暂停、播放、下一个、上一个、FF、RW),并且我在网上找到了许多支持通过简单的 UART AT 命令或通过 SPI 总线的命令发送这些命令的蓝牙模块。 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.但是,我也希望能够从 android 设备(这是 AVRCP 1.3+ 唯一功能)获取元数据,例如曲目名称、专辑名称、艺术家姓名、曲目长度和经过的时间。

Now, from what I understand, to get metadata, I need a bluetooth module that supports AVRCP 1.3 or higher.现在,据我所知,要获取元数据,我需要一个支持 AVRCP 1.3 或更高版本的蓝牙模块。 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.从我读,元数据,比如曲目名称,艺术家,ablum和轨道长度,是在应对一个轨道变化命令发送。 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.理想情况下,我正在寻找支持 A2DP(24 位,如果可用)和 AVRCP 1.3 或更高版本的蓝牙模块,带有 UART 或 SPI 或 I2C 接口,我可以在其中发送播放、暂停、下一个、上一个命令来控制音乐播放器和请求艺术家、专辑、曲目名称、经过时间、曲目长度元数据。

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)这是我发现,在数据表中提到的元数据的唯一单位: 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!这里的任何帮助将是巨大的!

First, you should have a look at this document: https://developer.bluetooth.org/TechnologyOverview/Documents/AVRCP_SPEC.pdf首先,你应该看看这个文件: https : //developer.bluetooth.org/TechnologyOverview/Documents/AVRCP_SPEC.pdf

To get the metadata from the source, you must use the following command: GetElementAttributes()要从源获取元数据,必须使用以下命令:GetElementAttributes()

To know how to use that function and which parameters to set, go to page 53 in the datasheet.要了解如何使用该功能以及要设置哪些参数,请转到数据表中的第 53 页。 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.有关所有属性及其特定 ID 的列表,请参阅第 132 页的附录 E。

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/您可能想查看 BlueGiga WT-32i 芯片: 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.它支持 AVRCP 1.5,在他们的手册 ( http://www.microtechnica.tv/support/manual/iWRAP5_User_Guide.pdf ) 的第 6.8 节中,它似乎有检索轨道元数据的命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM