2

I'm trying to configure a Pulseaudio service to work as a hands-free bluetooth device. With this functionality, I should be able to make phone calls with my computer's headphones and microphone.

https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#bluetooth

A2DP profile works just fine, the music from a smartphone is playing without any problem. But I'm unable to switch to HSP/HFP profile.

Gentoo Linux, 5.10.61-gentoo
GNOME: 40.3.0
pulseaudio: 13.0
bluetoothctl: 5.61

# lsusb | grep Bluetooth
Bus 001 Device 005: ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth

1 Answer 1

1

I will try to summarize here all things I had to go through to make this work on Gentoo, but it will be very similar for all other distributions with PulseAudio.

1. Bluetooth adapter model

Not every adapter supports HSP/HFP profiles. Find the model of your bluetooth adapter with lsusb and search on the internet which profiles it supports. If your bluetooth adapter is very old, it more likely doesn't support HSP/HFP.

2. Kernel configuration and bluetooth service

This is Gentoo and maybe Arch specific. Those things are usually already configured and working fine on common distributions.

Go through a Bluetooth article on Gentoo wiki.

3. PipeWire?

It took me a moment to realize what was happening here. My bluetooth device paired and connected to the computer just fine, but nothing from the audio sharing was working. Not even the basic A2DP profile. Then I found out that some unconfigured and unwanted instance of PipeWire was running and probably stealing bluetooth devices from PulseAudio. In this case either disable PipeWire completely or configure it properly to fully replace the PulseAudio server and skip the next step.

4. PulseAudio and oFono

Without ofono only the A2DP profile will work. HSP/HFP profile can maybe appear but it will be marked as unavailable in pavucontrol.

On other distributions make sure you have installed ofono package and pulseaudio bluetooth modules.

On Gentoo compile PulseAudio with ofono-headset use-flag. It will install net-misc/ofono package as a dependency. Then you have to start ofono service.

With OpenRC: rc-service ofono start
To make it persistent: rc-update add ofono default

Make sure your PulseAudio default.pa config contains loading of bluetooth modules:

.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

Then restart PulseAudio: pulseaudio -k

5. Bluetooth firmware

This was also my case. My adapter looked like it was working fine, since I could pair it with my phone, play music from the phone, etc. But when I switched to HSP/HFP profile, both audio streams were silent. Then I came across this documentation and noticed my adapter model is mentioned there.

I had to install firmware as described in Broadcom Bluetooth article on Gentoo wiki.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.