Bluetooth AVRCP receive play state change from target

Ikkibarzal
Posts: 2
Joined: Thu Jun 06, 2024 9:01 pm

Bluetooth AVRCP receive play state change from target

Postby Ikkibarzal » Wed Aug 07, 2024 2:22 pm

I'm trying to create a bluetooth audio source device, my code is based on the A2DP_source example from the IDF. I can receive volume changes set by the user on the target device (speaker or headset), but not play/pause commands. I am checking for these commands in the

Code: Select all

bt_av_notify_evt_handler
function but not receiving anything. I think it has to do with setting the capabilities during the starting sequence of the AVRCP when a device is connecting. The

Code: Select all

esp_avrc_tg_set_rn_evt_cap
function does not seem to accept PLAY_STATE_CHANGE (bit 1) as argument. I traced the error back to the file btc_avrc.c where the function

Code: Select all

btc_avrc_tg_check_rn_supported_evt
denies PLAY_STATE_CHANGE as it considers it to be not allowed. To my understanding VOLUME_CHANGE (bit 13) is the only supported command according to this function.

Is this a limitation of the IDF in it's current state? It seems kind of odd to have an entire AVRCP API and only support one type of command. Surely I'm doing something wrong. Any help would be apprectiated!

Who is online

Users browsing this forum: Basalt, Bing [Bot] and 346 guests