How to send Bluetooth AVRCP vendor dependent and pass through commands from app?

6.5k views Asked by At

I would like to communicate with another Bluetooth device using the AVRCP vendor dependent or pass through command. From the API available, there does not seem to be any way to make such calls from an android application. Can anyone advise on whether this is possible and how this can be done if it is possible?

3

There are 3 answers

2
garzanti On

What you should do is to go directly and speak with the HCI layer of the BlueZ Bluetooth stack. You could do this through D-Buss daemon which you can do it from Userspace. Next you take the ARVCP specs for example 1.0, but you can find on Bluetooth SIG AVRCP 1.3 or 1.4 specs too, and start parsing the commands. This presentation should be helpful: Android Bluetooth Introduction and this stackoverflow question.

enter image description here

1
Matrix Bai On

It seems like you confront the most common problem between Bluetooth devices, the Bluetooth compatible problem. Because the Bluetooth profiles do not strictly defined the audio related behaviors, the different behaviors implemented by different manufacturer would lead this problem. That's why every Bluetooth device should pass the Bluetooth Compatible Test of Bluetooth organization, however, it can not eliminate all problems.

As an open source implementation of Bluetooth Protocol Stack, Blue Z is not the best one in my mind and abnormal behavior of Bluetooth device also making trouble. If you have some test tool like PTS (profile tuning suite), try to use it to find out which side lead the problem. If everything is ok in profile side, that's good news for you, the problem may lead by some bugs of the related application. And if something wrong in the profile communication, it means you can not modified in API level, you may need some dirty work in profile stack and if you are phone manufacturer it can solve you problem, if you are not you can not slove the problem neither.

0
user1116309 On

Refer the below link:

Adding AVRCP Plugin in Android GB