How to set up Ubuntu PC as bluetooth headset to attend calls

13,895

Solution 1

Bluez has experimental support for this but I have not got it to work properly before.

apparently it's possible if you use Bluez 5 and install "ofono"

then in /etc/pulse/default.pa modify the line:

 load-module module-bluetooth-discover

to:

 load-module module-bluetooth-discover headset=ofono

then restart pulseaudio

For now it seems that: - if in /etc/pulse/default.pa you have added headset=ofono you will have the headset; - if not you will have a2dp (restart pulseaudio every time).

This info is from the bottom of this long thread, which was last updated a few days ago

Solution 2

I've solved it this way:

  1. in /etc/pulse/default.pa find the line load-module module-bluetooth-discover and change it to load-module module-bluetooth-discover headset=ofono
  2. Add the user "pulse" to group "bluetooth" to grant the permission: sudo useradd -g bluetooth pulse (probably it's already correct)
  3. VERY IMPORTANT: To grant the permission, 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/

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!**

Share:
13,895

Related videos on Youtube

Rilwan
Author by

Rilwan

Updated on September 18, 2022

Comments

  • Rilwan
    Rilwan over 1 year

    I am trying to use a Bluetooth headset on an Ubuntu PC. I am able to connect phone to pc via BT. I can stream music to PC. But cannot hear call audio. I have checked in Android phone logs, and BT sco link is established. But when making a call or virtual call (play audio through sco path in Android phone) the audio is not audible in PC headset. SCO packets are NOT appearing in btmon logs either. Anyone successfully done this?

    version- ubuntu 16.04
    Installed- bluez, ofono, pulseaudio
    pactl sink: Name- bluez_sink.22_22_8E_DE_B9_2B,
                Name: alsa_output.pci-0000_00_1b.0.iec958-stereo
    pactl source: Name-bluez_sink.22_22_8E_DE_B9_2B.monitor
                  Name: alsa_input.pci-0000_00_1b.0.analog-stereo
    
  • Rilwan
    Rilwan over 7 years
    Thanks Amias. I got so many pointers from the above link. There were multiple issues . I have resolved one by one. Great help.
  • FMaz
    FMaz about 7 years
    @Rilwan I am currently facing the exact same problem. Which issues did you resolve, in order to get this working? Also, what is your kernel version? I'd be glad for any help.
  • Rilwan
    Rilwan about 7 years
    I updated to 4.9.12-200.fc25.x86_64 . which linux flavour and version you are using ? Try updating if it is outdated . There has been a great improvement in latest dbus version and pulseaudio 10.0.
  • Duns
    Duns almost 5 years
    It worked for me, but only halfway: I can hear the other person, not speak with him.
  • George
    George about 4 years
    it changes for me too but still i can't hear the audio
  • Tarator
    Tarator almost 4 years
    This worked for me in Ubuntu 18.04 I can now use my Bose Soundlink Mini SE as Headset (with microphone working; headset_head_unit) or as High fidelity speaker (a2dp_sink).
  • Guillaume Chevalier
    Guillaume Chevalier over 3 years
    Same as @Duns for me: I can use my laptop as a headset now, but I cannot send microphone input from my laptop to my phone. For me, the problem is at least recognized from my phone and my phone disallows using this device as a bluetooth headset while in a call.