Linux set up bluetooth speaker to stream audio from your Android / iOS mobile phone

So how do you stream audio from your Apple iOS or Google Android phone to your laptop speaker? Let us see how to set up a Bluetooth speaker to stream audio from your Android / iOS mobile phone to your Linux based laptop or desktop that got better audio speakers.

ADVERTISEMENTS

Why stream audio from your Phone to your Linux laptop or desktop?

I have Logitech Z623 2.1 multimedia speakers. They are really lovely. However, whenever I connect to a VPN for my work, Google Music web player disables many tracks. So I play music on my Phone. However, sound quality is low and poor on my mobile. I don’t want to buy a smart speaker or external Bluetooth device to play music. So my search I landed me on the Arch Linux Bluetooth wiki help page for remote audio playback.

Linux set up a bluetooth speaker to stream audio from Android / iOS mobile phone

Indeed, you need Bluetooth enabled Linux laptop/desktop along with and PulseAudio sound software. Here are the steps.

Step 1 – Search Bluetooth Linux drivers

Since I am using Ubuntu Linux 20.04 LTS (command should work on Debian too) and I search modules using the apt command/apt-cache command:
apt-cache search pulseaudio | grep -i blue
Fedora Linux user try the dnf command
dnf search pulseaudio-module-bluetooth
RHEL/CentOS Linux user need use the yum command:
yum search pulseaudio-module-bluetooth
Suse/OpenSUSE Linux user try the zypper command:
zypper search pulseaudio-module-bluetooth
Arch Linux user search for a package with pacman as follows:
pacman -Ss pulseaudio | grep -i blue
Package name:

extra/pulseaudio-bluetooth 13.99.2+11+g05f567086-1 Bluetooth support for PulseAudio

Step 2 – Installing Bluetooth Linux drivers to stream audio from Android / iOS

So far, you learned how to search for Bluetooth support for PulseAudio and now install the software as per your Linux distro:
## Debian/Ubuntu Linux ##
sudo apt install pulseaudio-module-bluetooth
## CentOS/RHEL 8.x or Fedora Linux latest ##
sudo dnf install pulseaudio-module-bluetooth
## SUSE/OpenSUSE Linux ##
sudo zypper in pulseaudio-module-bluetooth
## Arch Linux user ##
sudo pacman -Syu pulseaudio-bluetooth

How to Stream Audio from Your Phone to Your Linux Laptop

Installing required Bluetooth driver on my Arch Linux

Step 3 – How to configure Linux to send sound through Bluetooth

Now the PulseAudio Bluetooth Linux driver installed and then edit the following file:
sudo vim /etc/pulse/system.pa
Append the following directives:

### Adding bluetooth audio streaming on Linux - Oct/14/2020 ###
load-module module-bluetooth-policy
load-module module-bluetooth-discover

Step 4 – Restarting the Bluetooth service on Linux

Note: No need to restart the Bluetooth as root user. In other words, run commands as regular user.

The syntax is as follows:
## Kill a running daemon on Linux ##
$ pulseaudio --kill
## Start the daemon if it is not running ##
$ pulseaudio --start

Step 5 – Pair your Android / iOS mobile phone with your computer

That is all, folks. We are all set. Next, pair your Google Android or Apple iOS devices such as iPad or iPhone to your Linux laptop or desktop. For instance:

  1. Turn on Bluetooth on your mobile phone by visiting the settings option.
  2. Open the Activities overview and start typing Bluetooth when using Gnome based Linux desktop.
  3. Click on Bluetooth to open the panel.
  4. Make sure Bluetooth is enabled and your computer will begin searching for devices:
    Linux set up bluetooth speaker to stream audio from your Android or iOS mobile phone

    Pairing my Google Pixel and iPhone 7 to my Linux desktop

  5. You need to confirm code on both your Phone and Linux desktop:
    Linux pair mobile phone using Bluetooth
  6. Make sure you choose your Bluetooth speaker/Airplay in your mobile app:
    Google Android Pixel blast music to Linux destop

    Android stream to Bluetooth

    Apple iOS stream music to Linux bluetooth speaker

    iOS Airplay

Conclusion

Now you know how to stream audio from your iOS/Android phone to your Linux powered computer. Make sure you check out the Arch wiki and PulseAudio documentation page for other Bluetooth config options for remote audio playback.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:

ADVERTISEMENTS

Discover more from UBERCLOUD

Subscribe now to keep reading and get access to the full archive.

Continue reading