I would like my Ubuntu PC sending bluetooth audio commands (play/pause, next/previous song and turn up/down) to other device streaming music over bluetooth to it. In other words, I would like to implement my Ubuntu PC "pretending" to be kind of bluetooth headphones, which are able to change tracks, and pause and resume music.
I have the following setup illustrated with the pavucontrol screenshots below (pt2
is device connected via bluetooth):
In this configuration streaming works as expected (I can hear music streamed from pt2
), but I didn't find any way to be able to send it any signal such as pause/resume playing or change track.
I have already found out that there are many bluetooth protocols allowing specific functions. If I understood specs correctly, what I am interested in is A2DP, which is the way devices are connected now. But under profile dropdown, I have also options HSP/HFP headset head unit, HSP/HFPheadset gateway and off.
I am going to develop my own application in Python which will allow sending such commands, so I am interested in sending them via Python API or via bash commands.
I am asking this question because I am interested in a way how I can communicate with bluetooth devices.