Skip to content

Latest commit

 

History

History
122 lines (89 loc) · 3.38 KB

File metadata and controls

122 lines (89 loc) · 3.38 KB

bluetooth headset

Here I discuss my futzing to get my airpods to work with Ubuntu.

The key thing seemed to be to switch from ad2p to hsp/hfp. And I guess really hfp, since there's apparently not support for hsp.

  1. Use bluetooth manager to pair with the airpods.

  2. If you right-click on the airpods, you want to be able to select "Audio profile" and then choose "Headset Head Unit" (rather than "High fidelity playback")

  3. Install ofono

    sudo apt install ofono
  4. Configure pulseaudio to use ofono by editing /etc/pulse/default.pa so that the line

    load-module module-bluetooth-discover
    

    becomes

    load-module module-bluetooth-discover headset=ofono
    
  5. Add the pulse user to the bluetooth group

    sudo usermod -aG bluetooth pulse
  6. Add the following to /etc/dbus-1/system.d/ofono.conf (before </busconfig>):

    <policy user="pulse">
        <allow send_destination="org.ofono"/>
    </policy>
    
  7. Install ofono-phonesim; I needed to add a ppa

    sudo add-apt-repository ppa:smoser/bluetooth

    Then I needed to edit /etc/apt/sources.list.d/smoser-ubuntu-bluetooth-groovy.list to change groovy (20.10) to focal (20.04).

    Then I could add ofono-phonesim:

    sudo apt install ofono-phonesim
  8. Start an ofono modem

    ofono-phonesim -p 12345 /usr/share/phonesim/default.xml
  9. Modify /etc/ofono/phonesim.conf to use it:

    [phonesim]
    Driver=phonesim
    Address=127.0.0.1
    Port=12345
    
  10. Restart oFono:

sudo service ofono restart
  1. Then I could go back to the bluetooth manager, right-click the airpods, and select "Audio Profile" and then "Headset Head Unit".

  2. After restarting my system, I needed to re-run the ofono-phonesim command, but then it still didn't work. I needed to clone ofono and run the script enable-modem:

    git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git
    cd ofono/test
    ./enable-modem

The key sites that helped:


  • airpods as headphones sound nice
  • airpods as headset: seems like both the headphones and the mic are really crappy quality...not worth the trouble
  • so best to just leave them as headphones
  • but on galago pro, while I could pair and connect/disconnect airpods, I'm having trouble getting pulseaudio to recognize them
  • what worked was [this answer]:
    • unpair the airpods
    • sudo pkill pulseaudio
    • re-pair the airpods
  • upgrading to PopOS 20.10 fixed this problem