Bluetooth profile locked to A2DP (high-quality audio sink) but cannot change to HFP/HSP (low-quality bidirectional headset)

EDIT: also try connecting using Blueman. I don't know why PulseAudio has so much trouble but simply opening Blueman, right-clicking on my headphones in the overview, and selecting Audio Profile > Headset Head Unit (HSP/HFP) fixed it for me. I have since stopped and removed oFono and it still seems to work.


I had a similar (the same?) problem with my Bose QC35 II and fixed it by following these instructions ("Using HFP with oFono").

I'm on Debian buster so things might be a little bit different for you.

  1. Install ofono and ofono-phonesim:

    sudo apt-get install ofono-phonesim
    
  2. Clone the oFono Git repository (currently at cf850de632):

    git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git
    cd ofono
    
  3. List the available modems you have:

    ./test/list-modems
    
  4. It'll probably have no modems, which is not surprising on a modern Linux desktop. But for reasons I don't really understand you really do need to have some sort of modem to get headphones to work, so we're going to simulate one now.
    Start by simulating one (you can probably pick a different port if you want):

    ofono-phonesim -p 12345 /usr/share/phonesim/default.xml
    
  5. Modify /etc/ofono/phonesim.conf to use this simulated modem. My Debian version was so kind to put something in there already but commented it out. This is what it looks like for me now (without the comments):

    [phonesim]
    Driver=phonesim
    Address=127.0.0.1
    Port=12345
    
  6. Restart oFono:

    sudo service ofono restart
    
  7. Check that the device is now listed:

    ./test/list-modems
    
  8. Enable the device:

    ./test/enable-modem /phonesim
    

    If you get an error like this, make sure your phonesim is up and running:

    Connecting modem /phonesim...
    Traceback (most recent call last):
      File "./test/enable-modem", line 20, in <module>
        modem.SetProperty("Powered", dbus.Boolean(1), timeout = 120)
      File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__
        return self._proxy_method(*args, **keywords)
      File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
        **keywords)
      File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
        message, timeout)
    dbus.exceptions.DBusException: org.ofono.Error.Failed: Operation failed
    

    Check that the device is now powered on using ./test/list-modems.

Hopefully it works now! You may need to restart other services too (bluez, pulseaudio).

I can now pick my headphone as an input device. It will cause the device to use very low quality audio but at least it works. Make sure to switch back to "High Fidelity Playback (A2DP Sink)" when you're done with the microphone as you'll otherwise get very low quality audio output.


In my case the problem was caused by a missing driver.

Try

lsusb | grep Bluetooth

If your chipset is a Broadcom BCM20702AX series, then try

dmesg | grep -i bluetooth | grep -i firmware -A2

In my case, driver was missing and you can find it here. More info here