17

My desktop's speaker is much better than my phones, so I want to use my desktop speakers in place of my cellphone's. It is inconvenient for me to use USB or the audio jack, so I am left with Bluetooth. I have paired my phone using bluetoothctl, but when trying to connect I get this:

[bluetooth]# pair 00:00:00:00:00:00 
Attempting to pair with 00:00:00:00:00:00
[CHG] Device 00:00:00:00:00:00 Connected: yes
Request confirmation
[agent] Confirm passkey 000000 (yes/no): yes
[CHG] Device 00:00:00:00:00:00 Modalias: bluetooth:a000Aa000000000
[CHG] Device 00:00:00:00:00:00 UUIDs: 00000000-0000-1000-8000-00000a0a00aa
[CHG] Device 00:00:00:00:00:00 UUIDs: 00000000-0000-1000-8000-00000a0a00aa
...
[CHG] Device 00:00:00:00:00:00 UUIDs: 00000000-0000-1000-8000-00000a0a00aa
[CHG] Device 00:00:00:00:00:00 UUIDs: 000000000-0000-1000-8000-00000a0a00aa
[CHG] Device 00:00:00:00:00:00 Paired: yes
Pairing successful
[CHG] Device 00:00:00:00:00:00 Connected: no
[CHG] Device 00:00:00:00:00:00 RSSI: -75
[bluetooth]# connect 00:00:00:00:00:00 
Attempting to connect to 00:00:00:00:00:00
Failed to connect: org.bluez.Error.Failed

I have replaced my mac address with 00:00:00:00:00:00, but the actual mac address does match the one reported by my phone. I have done the same with the pairing pin, the Modalias and the UUIDs, although I have no clue what the last two are.

10
  • Shall we suppose you're looking for help configuring Bluez? Commented May 24, 2015 at 18:35
  • 2
    If it allows me to route the audio from my phone to my desktop speakers, then yes! Commented May 24, 2015 at 21:24
  • All I know thus far is that Bluez audio is highly experimental. I never tried this but I am highly interested to know. Have you tried this ? Commented May 25, 2015 at 12:04
  • No, nor do I know how to set it up. Commented May 26, 2015 at 0:38
  • The link explains how to setup A2DP. Bluez must be configured beforehand. Commented May 26, 2015 at 16:15

1 Answer 1

5

Thanks to two modules from pulseaudio* which bond with bluez this is actually really easy to do, now.

Install the requisite packages:

sudo pacman -S bluez bluez-utils pulseaudio-bluetooth

Add your user to the pulseaudio group:

sudo usermod -a -G pulseaudio $USER

Turn on or restart the bluetooth daemon:

sudo systemctl restart bluetooth

Enable your bluetooth device:

sudo hciconfig hci0 up

If you have more than one bluetooth device, you should replace hci0 with the correct identifier, which can be found by running hciconfig with no arguments.

Now we can connect our devices using the interactive bluetoothctl utility.

First, we will make our Arch machine discoverable by its hostname:

$ bluetoothctl
[NEW] Controller AA:BB:CC:DD:EE:FF arch [default]

[bluetooth]# agent on
Agent registered

[bluetooth]# default-agent
Default agent request successful

[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller AA:BB:CC:DD:EE:FF Discoverable: yes

Your Arch box should be discoverable now for your phone. Select the device and return to the your prompt to confirm:

Request confirmation
[agent] Confirm passkey 748794 (yes/no): yes
[CHG] Device FF:EE:DD:CC:BB:AA ...
... snipped ...
[agent] Authorize service 0001... (yes/no): yes
... snipped ...
[agent] Authorize service 0001... (yes/no): yes
[CHG] Controller AA:BB:CC:DD:EE:FF Discoverable: no

I've had some disconnect issues that were resolved by simply running the trust command after connecting.

[phone]# trust
[CHG] Device FF:EE:DD:CC:BB:AA Trusted: yes
Changing  trust suceeded

That's it, you should be able to play audio through your desktop speakers.

2
  • It works, but is there anyway to improve latency? Commented Feb 17, 2017 at 18:54
  • 1
    the hci utils are now in AUR via bluez-utils-compat Commented Jan 23, 2019 at 5:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.