I'd like to receive/record audio from bluetooth device on my linux box. The one I have works properly as a headset (microphone works properly in particular) i.e. on macOS yet I cannot get it working with linux - raspbian jessy in particular - yet from what I can see it affects other distros as well.
- the device is paired and connected properly using
bluetoothctl
- A2DP profile works correctly
pactl ls
reports among othersheadset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: no)
- while trying to switch to
headset_head_unit
pulseaudio reports[pulseaudio] module-bluez5-device.c: Refused to switch profile to headset_head_unit: Not connected
I've found and tried various suggestions as for upgrading bluez
, pulseaudio
, use ofono
etc. yet without any success. Most common comments are that HSP/HFP support has been dropped in recent bluez
and the ofono
should be used (yet I'm not sure how ofono is supposed to help here as AFAIK it is related when BT susystem is being used as a client i.e. connected to mobile phone). I can see a number of unresolved bugs i.e. for freedesktop here and here, redhat, ubuntu and debian and also similar questions asked on stackexchange.
While there are some successes reported, I was not able to move forward trying i.e.
- use
pulseaudio
configload-module module-bluetooth-discover headset=ofono
(andauto
,native
variants as well), versions 7, 8, 10 bluez
5.24, 5.42, 5.43 (was not able to found other versions for debian as i.e. there is some success reported withbluez
5.35)- re-pairing and reconnecting the headset device with
bluetoothctl
Also there is some confusion in the reports as probably some people are mixing using linux bluetooth stack as client/server - at least this is my understanding of using ofono
.
While there are also some problem reports regarding bluetooth on RPI 3 in particular, I would like to find first any sign if the HFP/HSP is ever possible with current bluez
/pulseaudio
. Having any success report with clear steps i.e. on debian (and even better on raspbian) would help me a lot. Even any successful setup on any other distro may help me to build the same on my box. Looks like the problem affects pulseaudio
/bluez
stack for more then a year and it is hard to believe people cannot use their BT headsets i.e. for VOiP calls for so long... Not sure if I've provided all the important details from my investigation so in case of comments I can update this question.
Also wonder if there is some bug report with some active development and chances for solution.
UPDATE:
Most probably after removing ofono
I've finally managed to be able to switch the connection to headset_head_unit
yet while trying to record or play sound the device shows some activity (i.e. pulsating builtin led) but no data is being received/send (i.e. parec
creates empty wav
of size 44b which is just wav header). I've tested same device using a2dp_sink
profile and can play sound without any problem. I wonder how it can be debugged.
/etc/pulse/default.pa
if it containsheadset
parameter at the end of the lineload-module module-bluetooth-discover
?headset
anywhere in/etc/pulse/default.pa
.