5

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 others headset_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 config load-module module-bluetooth-discover headset=ofono (and auto, 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 with bluez 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.

  • This might not help much, but I have a HSF/HSP headset which "just works" (in both HSF/HSP and AD2P modes) using PulseAudio 8 and BlueZ 5.43. I don't have any oFono packages installed. – Stephen Kitt Feb 2 '17 at 9:58
  • Actually this is important information, thanks for sharing and good to know it is possible to have it working. And are you on debian or other distro? Could you check the /etc/pulse/default.pa if it contains headset parameter at the end of the line load-module module-bluetooth-discover? – ciekawy Feb 2 '17 at 14:55
  • The PA 8 setup is on Fedora 24; I also have it working with PA 10 on Debian 9. Neither setup mentions headset anywhere in /etc/pulse/default.pa. – Stephen Kitt Feb 2 '17 at 15:02
  • I have one more question Stephen, I assume you're using i.e. skype for headset mode. Have you tried to just record from the micrphone (bluetooth source) using i.e. arecord or any other command? – ciekawy Feb 5 '17 at 17:50
  • I'm using WebRTC in Firefox in headset mode. Recording works with anything that goes through PulseAudio; I haven't tried recording through ALSA, I'll give that a shot tomorrow... – Stephen Kitt Feb 5 '17 at 18:07
1

My solution:

I just found my solution in Fedora 26, using Plantronics Legend and Pluggable Bluetooth USB, after a lot of searching.

I am going back through my history, and updating threads with my solution where I can. This worked for me, direct from Plugable (which is the USB module I am using).

See this post.

Command summary per above link

wget https://s3.amazonaws.com/plugable/bin/fw-0a5c_21e8.hcd
sudo mkdir /lib/firmware/brcm
sudo mv fw-0a5c_21e8.hcd /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd
sudo cp /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd /lib/firmware/brcm/BCM20702A1-0a5c-21e8.hcd

Then reboot.

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.