Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HFP/HSP profile in linux [closed]

I have Ubuntu 16.04 and already installed BlueZ 5.37, PulseAudio 10.0, and ofono 1.20 (clone from github).

And I need to use phone like modem for transmitting my phone calls to computer. I paired my telephone with PC, made device trust and connect (all actions are successfully). I think problem with ofono, because I can play music (which use the A2DP) but if i want use hends free or headset profile - I have no sound on PC.

In pacmd (PulseAudio console tool) list-cards I see my bluetooth device, but Headset Audio Gateway HFP/HSP is not avalible. Also I tested it on different devices and computers.

Thank you in advice.

like image 660
Leonid Komaryanskiy Avatar asked Aug 03 '17 13:08

Leonid Komaryanskiy


2 Answers

I've solved in this way:

  1. Install ofono
  2. In /etc/pulse/default.pa find the line load-module module-bluetooth-discover and change it to load-module module-bluetooth-discover headset=ofono.
  3. If the user pulse is not a member of group bluetooth, then add it: sudo useradd -g bluetooth pulse
  4. VERY IMPORTANT: add this to /etc/dbus-1/system.d/ofono.conf before </busconfig>:
    <policy user="pulse">
     <allow send_destination="org.ofono"/>
    </policy>
    

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

The good news: Now in pavucontrol I can see that the profile changes automatically from A2DP to HSP / HFP if I make a phone call, and then it magically returns to A2DP!

The bad news: it works only one time per booting (and checking if ofonod is running), then I have to reboot my Debian system.

like image 95
Andrea Avatar answered Nov 12 '22 05:11

Andrea


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: plugable-usb-bluetooth-adapter-solving-hfphsp-profile-issues-on-linux

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.

like image 28
Eric Kirchner Avatar answered Nov 12 '22 03:11

Eric Kirchner