How to turn Raspberry Pi into a Bluetooth speaker

By connecting the Raspberry Pi to a set of speakers, you can greatly expand their functionality. This project allows you to modernize any old speakers or hi-fi system by bringing sound directly to them.

In addition to adding Bluetooth audio support to the Raspberry Pi, you'll also add support for Apple AirPlay, Spotify Connect, and synchronized multi-room audio. To add all of these additional functionality to the Raspberry Pi, we'll use a Balena image called balenaSound.

Normally, getting Bluetooth, AirPlay, Spotify and audio synced to work on a Raspberry Pi can be difficult. This image provided by Balena greatly simplifies the setup process and will reduce the chance of errors.

Turn old speaker systems into Bluetooth speakers with Raspberry Pi

  1. Equipment list to prepare
  2. Download balenaSound image for Bluetooth audio
  3. Burn the balenaSound image onto the Raspberry Pi
  4. Check out the Raspberry Pi Bluetooth speaker on the Balena
  5. Connecting to a Raspberry Pi Bluetooth speaker
    1. Sound transmission over Bluetooth
    2. Play music via AirPlay
    3. Connect using Spotify Connect
  6. Multi-room audio setup

Equipment list to prepare

Below is a list of the devices that you will need to set up your Raspberry Pi-enabled Bluetooth speaker.

  1. Raspberry Pi
  2. Micro SD card
  3. Source
  4. Bluetooth adapter (Only when Pi 3, 4 or Zero W is not used)
  5. Wired Ethernet or WiFi dongle (Pi 3 and 4 with built-in WiFi)
  6. Raspberry Pi Case (Optional)

For this Raspberry Pi Bluetooth speaker guide, we used a Raspberry Pi 4 running the latest version of balenaOS.

Download balenaSound image for Bluetooth audio

In this section, TipsMake.com will guide you through the setup process balenaSound OS on Raspberry Pi. This software will allow you to stream audio to the speakers using the Raspberry Pi's Bluetooth.

To continue, you need to sign up for a free Balena account.

1. The first step is to create an application in the Balena web interface.

To make this process even faster, you need to click on this deployment link with Balena. This link moves the GitHub balenaSound repository to the deployment dialog.

2. On this screen, use the ' Default Device Type ' option to select the Raspberry Pi that you want to set as the default device. Once you have selected the default device, click the ' Create and deploy ' button to continue.

How to turn Raspberry Pi into a Bluetooth speaker Picture 1How to turn Raspberry Pi into a Bluetooth speaker Picture 1 Click the 'Create and deploy' button to continue

3. You will be taken to a page listing all the devices you have deployed with balenaSound. Since the Bluetooth speaker software has not yet been put into the Raspberry Pi, you will need to click on the ' Add device ' button .

How to turn Raspberry Pi into a Bluetooth speaker Picture 2How to turn Raspberry Pi into a Bluetooth speaker Picture 2 Click the 'Add device' button to add a Bluetooth speaker

4. This pop-up window will allow to create a balenaOS image for the selected device.

The first task is to choose the type of equipment. If the default settings are not correct, click the box and select the device. Next, you need to decide which version of the balenaOS image you want to use. For the purposes of this article, select the Production option .

You can use image Development to help fix any problems you may be having. If you want to use WiFi, click on the toggle button below the ' Network Connection ' heading .

If WiFi is enabled, you must specify an SSID and a Passphrase (passphrase) for the connection.

With all settings configured click on the option ' Download balenaOS '.

Burn the balenaSound image onto the Raspberry Pi

In this section, we will show you how to burn the image you downloaded in the previous section to your Raspberry Pi.

To burn the balenaSound image to the Raspberry Pi's SD card, I will use Etcher. This is a useful tool also developed by Balena.

1. In the Etcher software, click the Select Image button .

This button will display a file dialog allowing you to select the image you want to burn to the SD card. In this case, this is the balenaSound image.

2. Once you have selected an image, you will now have to select the device you want to burn the image to.

If you only have one compatible device, that device is automatically selected by the Etcher software.

3. With everything set up, you can click the Flash button to burn the image to the SD card.

Before you click this button, make sure you have selected the correct drive, as this will wipe the drive. Once the image has been written to the SD card, you can now plug it into your Raspberry Pi and turn it on.

Check out the Raspberry Pi Bluetooth speaker on the Balena

Now that you have balenaOS up and running on your Raspberry Pi, it will begin to download and prepare the Bluetooth audio service.

In this section, the article will quickly show you how you can use the Balena interface to check the status of your Raspberry Pi.

1. Start by visiting the Balena control panel page.

On this page, click on the balena-sound app .

How to turn Raspberry Pi into a Bluetooth speaker Picture 3How to turn Raspberry Pi into a Bluetooth speaker Picture 3

2. This page will list all the devices that you are running with BalenaSound application.

Using this list, you can quickly view the status of the devices. As you can see from the image below, the Raspberry Pi is currently updating.

You should see the Raspberry Pi you set up in the previous step listed here, click on the list to display more information.

How to turn Raspberry Pi into a Bluetooth speaker Picture 4How to turn Raspberry Pi into a Bluetooth speaker Picture 4 You should see the Raspberry Pi set up in the previous step

3. On this page you can see various details of the BalenaSound image running on the Raspberry Pi.

In the Services section , you can see that the Bluetooth audio service is active on the Pi, as well as additional services like Spotify and Airplay.

Using this interface, you can stop, restart, and start any of these services with relative ease.

How to turn Raspberry Pi into a Bluetooth speaker Picture 5How to turn Raspberry Pi into a Bluetooth speaker Picture 5 You can see various details of the BalenaSound image running on the Raspberry Pi

Connecting to a Raspberry Pi Bluetooth speaker

Thanks to the image balenaSound, you have 3 ways to play music through the connected speakers. These three methods of playing audio are Bluetooth, AirPlay and Spotify Connect.

Sound transmission over Bluetooth

Connecting to the Raspberry Pi speaker via Bluetooth is a simple process. BalenaSound helps with this process by being constantly spontaneous over Bluetooth. Any Bluetooth enabled device can connect to the Raspberry Pi and play music through the connected speakers.

1. To find the Raspberry Pi Bluetooth speaker, perform a scan from a Bluetooth enabled device.

For this example, the article will show you how the device will appear on the iPhone.

How to turn Raspberry Pi into a Bluetooth speaker Picture 6How to turn Raspberry Pi into a Bluetooth speaker Picture 6

You should see the device appear with the name ' balenaSound ' followed by a unique ID.

2. Since the Raspberry Pi appears as a Bluetooth speaker, you can now send any audio output over the connection to play through the speaker.

Play music via AirPlay

BalenaSound also comes with built-in support for Apple AirPlay.

AirPlay is a protocol for sending things like music over the network to another device. This protocol is common between Mac and iPhone devices.

How to turn Raspberry Pi into a Bluetooth speaker Picture 7How to turn Raspberry Pi into a Bluetooth speaker Picture 7

In the list of AirPlay devices, you can identify your Raspberry Pi by looking for ' balenaSound AirPlay ', followed by a unique ID number.

Connect using Spotify Connect

Instead of using Bluetooth to connect to the Raspberry Pi speaker, you can also use Spotify.

The balenaSound software has a built-in Spotify Connect client, which means you'll be able to find it listed as a viable audio output device.

How to turn Raspberry Pi into a Bluetooth speaker Picture 8How to turn Raspberry Pi into a Bluetooth speaker Picture 8

Just like with Bluetooth, you can find the Raspberry Pi speaker by searching for ' balenaSound ' followed by a unique ID.

Multi-room audio setup

The balenaSound software we are using for this guide has built-in support for multi-room audio. This means you can play audio to a Raspberry Pi, and that sound will be synced to all other Pis on the same network.

The software running on the Raspberry Pi will automatically search and connect to any other Raspberry Pi running the balenaSound operating system. To do this, each Raspberry Pi needs to be a device within the same app in Balena.

Additionally, this feature works with Bluetooth, Spotify and Airplay.

Hopefully at this point, you have successfully set up your Raspberry Pi Bluetooth speaker.

Hope you are succesful.

4.2 ★ | 26 Vote