본문 바로가기

카테고리 없음

[Ubuntu 20.04LTS] Connecting airopods pro as headset

 

The package was removed from Debian Unstable at 2019-09-13, so it will not be until official port to Qt5.

You can install it from some third-party PPA:

sudo add-apt-repository ppa:smoser/bluetooth sudo apt-get install ofono-phonesim askubuntu.com/questions/831331/failed-to-change-profile-to-headset-head-unit

 

Failed to change profile to headset_head_unit

I got the Sony MDR-ZN770BN connected to my PC via bluetooth. But I can only use A2DP. When I switch it to HSP, I get message "Failed to change profile to headset_head_unit", so no skype calls possi...

askubuntu.com

I had the similar problem with Galaxy Earbuds+ and here is how I solved it:

My earbuds profiles were A2DP, AVRCP and HFP and no support for HSP. Pulseaudio only supports HSP out-of-the-box. That's why I couldn't switch to HSP/HFP. In order to make HSP/HFP work, you have to enable HFP on pulseaudio which needs ofono. Here is how I did it on Ubuntu 18.04:

  1. Install ofono:

sudo apt install ofono

  1. Config pulseaudio to use ofono:
  • Goto /etc/pulse/default.pa find the line load-module module-bluetooth-discover and change it in load-module module-bluetooth-discover headset=ofono.
  • Add the user pulse to group bluetooth to grant the permission: sudo usermod -aG bluetooth pulse (probably it's already correct)
  • 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>

  1. Provide phonesim to ofono. In order to make ofono work, you have to provide a modem to it! You can install a modem emulator called phonesim (implemented by ofono) to make it work:
  • install ofono-phonesim (in some distros it is called phonesim). in Ubuntu 18.04:

sudo apt install ofono-phonesim

  • Configure phonesim by adding the following lines to /etc/ofono/phonesim.conf:

[phonesim] Driver=phonesim Address=127.0.0.1 Port=12345

  • Restart ofono:

sudo systemctl restart ofono.service

  • Start phonesim:

ofono-phonesim -p 12345 /usr/share/phonesim/default.xml

Note that the command can be phonesim. To make sure phonesim is started correctly you can clone the ofono repo and use their test scripts:

cd /tmp git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git cd ofono/test ./list-modems

You should see the modem in the result. You might have to first enable the modem by executing enable-modem and online-modem scripts in the same directory.

  • Once the modem is enabled, you should be able to enable HFP profile.

4.autostart phonesim. Since you have executed phonesim manually, after every restart you should execute it again. Instead you can install ofono-phonesim-autostart which will start the phonesim as a service.

References:

 

askubuntu.com/questions/1242450/when-will-add-ofono-phomesim-to-the-focal-repository-20-04

 

When will add ofono-phomesim to the focal repository (20.04)?

HFP bluetooth does not work, and phonesim is in the xenial and bionic repositories. Does anyone know when it will be added to focal?

askubuntu.com

The package was removed from Debian Unstable at 2019-09-13, so it will not be until official port to Qt5.

You can install it from some third-party PPA:

sudo add-apt-repository ppa:smoser/bluetooth sudo apt-get install ofono-phonesim