The question sounds similar to the unanswered question Is it possible to connect my phone via bluetooth and then call through the computer? and my purpose is similar. However, I was thinking about using WLAN or even the USB to connect my phone to the desktop.
The purpose is to make and take a call via the desktop, using the Bluetooth headset which is attached to the desktop.
What I have tried:
- See if KDE Connect supports this. (This would be ideal, but does not seem to be the case.)
- Check if scrcpy supports this. This seemed like a promising solution, but scrcpy does not transmit audio and usbaudio seems to transmit only from the phone to the PC (have not verified this).
- I saw the similar question How to set up Ubuntu PC as bluetooth headset to attend calls but did not understand how this is supposed to work. (Would both devices be connected via Bluetooth to the desktop?)
I am on Kubuntu, and would prefer a solution working on both 18.04 and 19.10.
It may work with scrcpy over TCP/IP (Display and control your Android device) and the tool sndcpy (Android audio forwarding (scrcpy, but for audio)). I have not yet time to test it myself, though.
A discussion regarding forwarding audio and scrcpy you can find on the Github page of scrcpy, another suggestion was to use scrcpy and use bluetooth for audio.
It is working for me with Kubuntu 20.04 and I'm using it exactly as you describe! All audio is routed through the Kubuntu laptop.
Android Phone <=two-way audio=> Kubuntu Laptop <=two-way audio=> Bluetooth Headset
You need two Bluetooth adapters in the PC because only single audio BT profile can be used on each device.
The Android phone is connected to the first BT adapter which is embedded in my laptop using Headset audio gateway HSP/HFP profile.
The headset should be connected to the second BT adapter (USB dongle) using Headset Head unit (HSP/HFP) profile.
These profiles can change automatically when a call is established and sometimes get stuck in the wrong profile and needs to be set manually.
Also you should see where the default pulseaudio sink and source are and try to find the correct configuration in the advanced settings of Volume control.
What is working: Phone calls, playing multimedia files in the phone, whatsapp calls (I only hear choppy sound - the problem is between phone and laptop, the remote part hears my voice OK), all audio playing in the laptop.
With "KDE Connect" it is possible receive the notifications connecting by WiFi.
The headset button stops/starts multimedia player on laptop and it is not working / not yet configured to answer the call.