BT classic within IDF: AVRCP CT - send track/artist metadata without audio

jcsbanks
Posts: 291
Joined: Tue Mar 28, 2017 8:03 pm

BT classic within IDF: AVRCP CT - send track/artist metadata without audio

Postby jcsbanks » Mon Nov 11, 2019 12:24 pm

I've been reading the documentation and include files on Bluetooth classic and looking at examples, but am new to Bluetooth and struggling.

My desired use case is to get an ESP32 to become a Bluetooth source to be able to send track/artist strings/metadata to a bluetooth sink device that is a media player with a display. I don't want to send audio, just text. I want to be able to receive back from the player when it alters the volume or changes track. Effectively making an existing media player into a user interface to control the ESP32, but most importantly to be able to send strings from the ESP32 to the media player that it will display.

Any suggestions on examples/feasibility most appreciated. I know I will not be able to coexist BT classic whilst the ESP32 is in APSTA mode, so am likely to detect a different use case when BT classic is connected and disable WiFi.

jcsbanks
Posts: 291
Joined: Tue Mar 28, 2017 8:03 pm

Re: BT classic within IDF: AVRCP CT - send track/artist metadata without audio

Postby jcsbanks » Fri Nov 15, 2019 9:35 am

Anyone?

ESP_sushant
Posts: 6
Joined: Mon Aug 26, 2019 6:10 am

Re: BT classic within IDF: AVRCP CT - send track/artist metadata without audio

Postby ESP_sushant » Sat Nov 16, 2019 1:04 pm

Please see if following information is useful:
Bluetooth specification info:
1. AVRCP profile is used to exchange control information in Bluetooth A/V distribution scenarios.
2. AVRCP CT (controller) device sends commands and registers notifications to get info about events like change in volume, track change, metadata etc.
3. AVRCP TG (target) device sends response to the commands and send notifications back to the CT device.
4. A2DP profile sends actual audio packets from source to sink

Application specific info:
1. A2DP profile is not a concern here as audio data transfer is not required.
2.
ESP32 to become a Bluetooth source to be able to send track/artist strings/metadata to a bluetooth sink device that is a media player with a display
> This is bit tricky. To make this happen, as per spec, ESP32 needs to be configured as AVRCP TG device and then AVRCP CT device (media player) can request the required info by using commands and by registering notifications. But not sure if your existing media player can do that.
3.
I want to be able to receive back from the player when it alters the volume or changes track.
> It can be done by registering notifications on AVRCP CT device (ESP32) to get corresponding events from TG device (media player)

Relevant examples in ESP-IDF:
1. In following example, you can check how avrc_ct_init and arc_tg_init is done on the same ESP32 and how respective events are handled. You may skip the a2dp related part as it is not relevant here.
https://github.com/espressif/esp-idf/tr ... /a2dp_sink
2. Following example will configure ESP32 as AVRCP CT only:
https://github.com/espressif/esp-idf/tr ... 2dp_source
3. Using couple of ESP32 modules, you can run a2dp_source and a2dp_sink examples to check how AVRCP profile works (volume change notifications are simulated in it). Also, first you can play around these examples and check if your application can be fulfilled using BT AVRCP profile.

Please let us know if you have any further doubts/queries.

Thanks.

jcsbanks
Posts: 291
Joined: Tue Mar 28, 2017 8:03 pm

Re: BT classic within IDF: AVRCP CT - send track/artist metadata without audio

Postby jcsbanks » Mon Nov 18, 2019 8:22 am

Thanks!

Who is online

Users browsing this forum: axellin, Google [Bot], rodmcm and 22 guests