lazy man's bluetooth

It really pays off to look for a do-it-yourself solution before you go out and buy something to solve your problem. As nice as that sentiment is, sometimes the a lazy fix could really pull off.

I recently won a pair of Sony WH-1000XM3 headphones in a raffle so I was excited to finally listen to audio wirelessly. The only thing standing in my way was a lack of Bluetooh card in my 9 year old desktop build (still kicking!).

My first thought was to somehow use existing hardware I had laying around the house. I knew there had to be some way to pipe audio from one computer to another over the network, so I began digging around in pulseaudio documentation. The computer with the connected speakers (or in my case, a laptop with a paired Bluetooth headset) will act as your server, which will receive an audio stream from the client.

Equipment:

  • desktop computer (client)
    • Fedora 32 (Xfce spin)
  • Sony WH-1000XM3
  • Thinkpad X230 (server)
    • Fedora 32 (Xfce spin)

The setup:

First, install pulseaudio-module-zeroconf on both your client and server.

Next, you’ll want to load the appropriate pulseaudio modules on each device:

client (desktop)

$ pactl load-module module-zeroconf-discover

server (laptop)

$ pactl load-module module-native-protocol-tcp
$ pactl load-module module-zeroconf-publish

Since pulseaudio by default listens on port 4713/tcp, you’ll need open this port on your client’s firewall:

$ sudo firewall-cmd --add-port=4713/tcp --permanent
$ sudo firewall-cmd --reload

Putting it All Together

Check to make sure that your server’s configured audio device (WH-1000XM3) is listed as an output device on your client:

Next, make sure that your client is configured to use the correct output device in the playback tab:

Finally, change your audio stream’s output device to be your server’s paired Bluetooth device as needed: