How to turn a speaker into Bluetooth-enabled using Raspberry Pi (2023)

If you prefer to listen to your favorite music while working in the office, traveling around with your friends, or just chilling out at home, a wireless speaker is definitely for you. You can enjoy all of the advantages of wireless speakers, such as freedom from cable wires and free mobility. The best part about wireless speakers is that you can easily convert any wired speaker into a wireless speaker.

But why all that hustle if you have a Raspberry Pi lying around? This post will guide you on using the Raspberry Pi to turn any speaker into a Bluetooth-enabled speaker.

Understanding the logic

Even though the whole process might seem complicated, it’s simple if you have the right tools and configurations. Therefore, we will follow the steps below.

  1. Get a Raspberry Pi board that has in-built Bluetooth support. These include Raspberry Pi Zero, Raspberry Pi 3, or newer. Alternatively, if you have an earlier Raspberry Pi board that doesn’t include Bluetooth support, you can opt to buy a Bluetooth USB dongle.
  2. Connect the Raspberry Pi to the non-Bluetooth speaker using an auxiliary cable (3.5 mm jack).
  3. Configure the Raspberry to output all audio only through the 3.5 mm jack (AUX cable). By default, the Raspberry Pi supports HDMI as the default audio output.
  4. Configure the Raspberry Pi to accept input audio from the Bluetooth receiver, then route all this audio to the 3.5 mm jack (AUX cable).

That’s it! We only need four steps to accomplish this whole project. Our final setup will look like this.

Turn any speaker into a Bluetooth enabled using Raspberry Pi

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (1)

Raspberry Pi and Speaker

Project requirements

The only requirements you need for this project include:

  • A Raspberry Pi with Bluetooth support (Raspberry Pi Zero, Raspberry Pi 3 or newer). Alternatively, you can use a Bluetooth USB dongle.
  • A non-Bluetooth speaker
  • A 3.5 mm Jack (Auxilliary cable)
  • An active internet connection

Step 1. Setup the Raspberry Pi

Tip: When working on this project, we tried two operating systems, Raspbian Buster (Based on Debian 10) and Raspbian Bulls Eye (Based on Debian 11). Everything executed smoothly on Raspbian Buster, but we experienced minor issues with Raspbian Bulls Eye. Luckily, we will provide all the solutions in this post.

Also Read

  • How to set up your Raspberry Pi as a Syslog server
  • How to install Magi Coin wallet on Raspberry Pi 4
  • How to install noobs on Raspberry Pi 4
  • How to Build a Raspberry Pi NAS
(Video) DIY Bluetooth Speaker | Raspberry Pi

You need to install the official Raspberry Pi OS on the Micro SD card to get started. If you have never done this before, please check our post on installingthe official Raspberry Pi OS. It will give you a detailed guide on formatting the SD card and using the Balena Etcher to flash the OS on the SD card.

Also, since we will do all the configurations via command-line, you don’t need to connect to a monitor or set up a VNC server – SSH will be enough. You only need to create an empty text file in the boot partition to enable SSH. You can check out our post – .

When done, connect all the peripherals to your devices, including the 3.5 mm jack for the speaker and

Step 2. Set up the audio output on the Pi

The Raspberry Pi supports two main audio outputs:

  • The 3.5 mm jack
  • HDMI

For this project, we need to use the 3.5 mm jack to get audio from the speaker. To do so, execute the command below to launch the Raspberry Configuration screen.

sudo raspi-config

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (2)

Raspberry Configuration

Use the arrow keys to select the “System Options.” Press Enter. On the new screen that appears, select “S2 Audio.”Press ‘Enter.’

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (3)

(Video) How to use Bluetooth Speaker with Raspberry Pi

Configure Audio

A new screen will appear, and you will need to select the audio output you want to use. In the image below, we have two options: HDMI and Headphones. If you are not connected via HDMI, you might only see one option—select “headphones” and press Enter.

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (4)

Choose Audio Output

Save the changes and click “Finish.”

To test whether audio is coming from the 3.5 mm jack, execute the command to test the speakers.

speaker-test -c2 -twav -l7

Step 3. Install BT-speaker software

As detailed above, we need to develop a way that the Raspberry Pi takes audio input from Bluetooth and directs it to the 3.5 mm jack so that we can listen to it on the speaker. There are different ways we can use to achieve that. Unfortunately, most methods are way too complicated, and they might not work in the end.

For this post, we will use a daemon known as BT-Speaker, available on the Github page of Lukas. It was developed with the default Raspberry Pi OS audio configuration in mind. Therefore, if you use an external sound card, there might be issues getting audio to play on the non-Bluetooth speaker.

Additionally, it is pretty advanced and does not work like the typical Bluetooth device. If a device disconnects from the Raspberry Pi, this daemon will immediately allow any other device to connect. It works with the “First Come, First Serve” policy. Also, there is no need to click “Pair” or “Unpair.” The daemon handles all this for you. You can read more about this tool on the official Github page.

Let’s now look at how to install the BT-Speaker on our Raspberry. Follow the instructions below depending on your Rasbian OS.

Raspbian Buster

Assuming you are already connected via SSH, execute the command below to download the BT-Speaker installation script.

sudo wget https://raw.githubusercontent.com/lukasjapan/bt-speaker/master/install.sh

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (5)

Download Script

(Video) Turn your Raspberry PI into a Bluetooth audio receiver

Make the script executable by running the chmod command below.

sudo chmod +x install.sh

When done, execute the script.

sudo bash install.sh

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (6)

Run Installation Script

After successfully installing the script, skip to Step 4 below.

Raspbian Bullseye

We had to modify the script forRaspbian Bullseye (based on Debian 11) since it was developed to run on Raspbian Buster. First, execute the commands below to install some packages that the script will not install.

sudo apt updatesudo apt install python3-pipsudo pip3 install gobjectsudo pip3 install ConfigParser

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (7)

Install Packages

When done, run the command below and paste the newly modified script.

(Video) Raspberry Pi - Adding Bluetooth

sudo nano install.sh
#!/bin/bash +xset -eecho "Installing dependencies..."apt-get updateapt-get --yes --force-yes install git bluez python3 python3-cffi python3-dbus python3-alsaaudio sound-theme-freedesktop vorbis-toolsecho "done."echoecho "Adding btspeaker user..."id -u btspeaker &>/dev/null || useradd btspeaker -G audio -d /opt/bt_speakergetent group bluetooth &>/dev/null && usermod -a -G bluetooth btspeakerecho "done."echocd /optif [ -d bt-speaker ]; thenecho "Updating bt-speaker..."cd bt-speaker && git pull && git checkout ${1:master}elseecho "Downloading bt-speaker..."git clone https://github.com/lukasjapan/bt-speaker.gitcd bt-speaker && git checkout ${1:master}fiecho "done."# Prepare default configmkdir -p /etc/bt_speaker/hookscp -n /opt/bt-speaker/config.ini.default /etc/bt_speaker/config.inicp -n /opt/bt-speaker/hooks.default/connect /etc/bt_speaker/hooks/connectcp -n /opt/bt-speaker/hooks.default/disconnect /etc/bt_speaker/hooks/disconnectcp -n /opt/bt-speaker/hooks.default/startup /etc/bt_speaker/hooks/startupcp -n /opt/bt-speaker/hooks.default/track /etc/bt_speaker/hooks/track# Install and start bt-speaker daemonechoecho "Registering and starting bt-speaker with systemd..."systemctl enable /opt/bt-speaker/bt_speaker.serviceif [ "`systemctl is-active bt_speaker`" != "active" ]; thensystemctl start bt_speakerelsesystemctl restart bt_speakerfisystemctl status bt_speaker --full --no-pagerecho "done."# Finishedechoecho "BT-Speaker has been installed."

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (8)

Run the installation script

After a successful installation, proceed to Step 4 below.

Step 4. Connect to the Raspberry Pi – Bluetooth speaker

Run the command bt_speaker.service to confirm whether the service is running.

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (9)

Check Status Service

Up to this point, everything is set up, and you can now connect your Bluetooth device (Phone, PC, etc.) to the Raspberry Pi via Bluetooth, and you should hear the sound on the speaker. To make the Raspberry Pi Bluetooth discoverable, run the command below.

sudo hciconfig hci0 piscan

Note: The name that will appear on your Bluetooth device (say Phone or Laptop) will be the hostname of the Raspberry Pi and not the Speaker name. You can edit that by changing the contents of the /etc/hostname file on your Pi.

How to turn a speaker into Bluetooth-enabled using Raspberry Pi (10)

iPhone Bluetooth

(Video) How To Turn a Raspberry Pi into a Wireless Speaker #raspberrypi #diyelectronics #tech #shorts

Conclusion

We believe this article has given you a great guide on enabling Bluetooth on a non-Bluetooth speaker using the Raspberry pi. To get a more detailed guide on managing Bluetooth devices that connect to the Raspberry, please check out our post – How to set up Bluetooth on a Raspberry Pi. If you encounter any issues, let us know in the comments below.

FAQs

How to turn a speaker into Bluetooth-enabled using Raspberry Pi? ›

Connect to the Raspberry Pi – Bluetooth speaker

Run the command bt_speaker. service to confirm whether the service is running. Up to this point, everything is set up, and you can now connect your Bluetooth device (Phone, PC, etc.) to the Raspberry Pi via Bluetooth, and you should hear the sound on the speaker.

How do I turn my Raspberry Pi into a Bluetooth speaker? ›

Connect to the Raspberry Pi – Bluetooth speaker

Run the command bt_speaker. service to confirm whether the service is running. Up to this point, everything is set up, and you can now connect your Bluetooth device (Phone, PC, etc.) to the Raspberry Pi via Bluetooth, and you should hear the sound on the speaker.

Can a Raspberry Pi be a Bluetooth speaker? ›

Do you have an old pair of PC speakers, or an old Hi-Fi, that you would like to convert into a pair of Bluetooth® speakers to play music from your phone? A Raspberry Pi can be easily used as an audio bridge between a Bluetooth® device and an analog speaker system, to make this possible.

How do I make my speaker Bluetooth capable? ›

Pair with Bluetooth Receiver

If you have powered speakers, plug them in after turning on your Bluetooth receiver. Next, set your Bluetooth receiver to pair. Finally, turn Bluetooth on on your device and find your Bluetooth receiver and pair. At this point, you should be able to broadcast audio to your speakers.

Does Raspberry Pi have Bluetooth module? ›

Among the different boards, one of the most popular, the Raspberry Pi 4, has a range of powerful features such as dual-display support, Gigabit Ethernet, 802.11ac Wi-Fi, and Bluetooth 5.0 functionality.

How do I change the audio output on my Raspberry Pi? ›

The Raspberry Pi supports audio output over either HDMI (default) or 3.5mm audio jack (headphone jack).
...
To change the output mode, follow the steps below:
  1. Navigate to your screen.
  2. Click the "Settings" button on the top right.
  3. Set "Audio Output" to "3.5mm jack".
  4. Click the "Save" button.
Jul 13, 2022

How do I change the audio output on my Raspberry? ›

If you want to change your audio output setting, simply rerun sudo raspi-config . Alternatively, you can change the audio output setting directly by running: Auto (HDMI if connected, else 3.5mm jack): sudo amixer cset numid=3 0. Use 3.5mm jack: sudo amixer cset numid=3 1.

What frequency does Raspberry Pi use for Bluetooth? ›

Bluetooth transmits in the 2.4GHz band on 79 channels between 2.402 and 2.480GHz.

Does Raspberry Pi have audio port? ›

The Raspberry Pi 4 has a 3.5mm headphone jack for connecting speakers or headphones, or breaking out to another audio connector format for your own project needs.

Does Raspberry Pi 4 have Bluetooth? ›

This product's key features include a high-performance 64-bit quad-core processor, dual-display support at resolutions up to 4K via a pair of micro-HDMI ports, hardware video decode at up to 4Kp60, up to 4GB of RAM, dual-band 2.4/5.0 GHz wireless LAN, Bluetooth 5.0, Gigabit Ethernet, USB 3.0, and PoE capability (via a ...

Can I add Bluetooth to a non Bluetooth device? ›

Bluetooth Transmitter: The easiest way to add Bluetooth functionality to non-Bluetooth devices is by using a Bluetooth transmitter. A Bluetooth transmitter is a small device that plugs into a non-Bluetooth device's audio output port (such as a 3.5mm headphone jack or RCA ports).

How do I change my audio output to Bluetooth? ›

Right-click the Start button and select Settings. Head to System > Sound. Scroll down to Advanced sound options and click App volume and device preferences. You will see the selected input and output device for your system sounds, browser, or other apps you are using.

Can you turn an old stereo into Bluetooth? ›

You can add Bluetooth to any older music system by purchasing a Bluetooth adapter. There are several options for this that range from cheap and simple to more expensive and higher quality. Setup is usually easy, and most systems can transmit high-quality audio.

Which Raspberry Pi models have Bluetooth? ›

The Raspberry Pi Zero W extends the Pi Zero family and comes with added wireless LAN and Bluetooth connectivity.

Which Raspberry Pi has best Bluetooth? ›

For the best support for Bluetooth on the Raspberry Pi, we recommend using a Raspberry Pi 3 or newer, or the Pi Zero W. The in-built Bluetooth functionality of these Raspberry Pi's tends to be more reliable than the USB Bluetooth dongles.

How many devices can Raspberry Pi Bluetooth? ›

In the Bluetooth spec there is no limit on the number of connections that can be made.

How do I change my speaker output? ›

Instructions
  1. Left Click on the sound icon in the taskbar.
  2. Above the volume bar, there should be an audio device listed.
  3. Clicking on the drop-down list should show all the available audio devices that can be selected.
  4. Select the preferred device by left-clicking on it.
Oct 12, 2022

How do I control speakers with my Raspberry Pi? ›

The simplest way to play audio on the Raspberry Pi is with wired speakers or headphones. These can be connected to the Raspberry Pi with the onboard headphone jack. From the desktop, make sure to set the Audio output to Analog by right-clicking the sound icon on the menu bar's top right portion.

How do I enable audio output? ›

1. Enable or Disable a Sound Output Device From the Settings App
  1. Open the Settings app and navigate to System > Sound.
  2. Scroll down to the Advanced section and select All sound devices.
  3. Select the audio device you want to enable.
  4. Click the Allow button next to Audio.
Jan 1, 2023

How do I change the audio input device? ›

To install a new microphone, follow these steps:
  1. Make sure your microphone is connected to your PC.
  2. Select Start > Settings > System > Sound.
  3. In Sound settings, go to Input and in the Choose your input device list, select the microphone or recording device you want to use.

How do I change audio output to audio input? ›

Select Start (Windows logo Start button) > Settings (Gear-shaped Settings icon) > System > Sound. In Sound settings, go to Input > Choose your input device, and then select the microphone or recording device you want to use.

How do I add a Bluetooth device to my Raspberry Pi? ›

If Bluetooth isn't already active, click Turn Bluetooth On in the drop-down menu to switch it on. Once Bluetooth is active, click the Make Discoverable option. This will allow other Bluetooth-capable devices to find your Raspberry Pi, allowing them to connect. With Bluetooth enabled, click the Setup New Device option.

Can Raspberry Pi transmit radio? ›

Setting up a private radio station is easy using a Raspberry Pi. This process should take thirty to sixty minutes to complete. By the time you finish this tutorial, you should be able to broadcast your FM radio station within a radius of around fifty meters.

What audio output for Raspberry Pi? ›

Raspberry Pi DAC+ is a high-resolution audio output HAT that provides 24-bit 192kHz digital audio output. A Texas Instruments PCM5122 is used in the DAC+ to deliver analogue audio to the phono connectors of the device.

How do I enable audio jack on Raspberry Pi? ›

Go to the RPi main menu, click on Games and select Boing. You should see lights running up and down and hear continuous thumping audio either through your headphones or the monitor speakers.

Which Raspberry Pi for audio streaming? ›

Raspberry Pi: To build this audio box, you can either use a Raspberry Pi B or the newer version Raspberry B+. This article will focus on using the new model B+.

Can a Raspberry Pi drive speakers? ›

Raspberry Pi can not be used directly with the speaker, so this speaker is a built-in power amplifier dual-channel speaker, driver-free, USB power supply. Come with a volume decoder, it can adjust the volume.

Why is there a shortage of Raspberry Pi? ›

The current shortage of Raspberry Pi can be attributed to various factors, including the ongoing global semiconductor shortage, increased demand for home electronics during the COVID-19 pandemic, and the popularity of Raspberry Pi in many industries.

Why are raspberry pis so expensive? ›

The shortage in stock is due to supply chain issues which affected any components which used semiconductors. The Raspberry Pi range was not alone in this: graphics cards, along with other PC components, also saw stock shortages and high demand. It's also difficult to buy a bare board.

Is Raspberry Pi 4 discontinued? ›

RS Group has been an important partner for Raspberry Pi, manufacturing our products under licence since launch in February 2012. Our licence agreement with RS Group came to an end in June 2022, with the result that they no longer manufacture Raspberry Pi products.

How do I make my device support Bluetooth? ›

Turn on Bluetooth
  1. In Settings: Select Start > Settings > Bluetooth & devices , and then turn on Bluetooth .
  2. In quick settings: To find the quick setting for Bluetooth, select the Network, Sound, or Battery icons ( ) next to the time and date on the right side of your taskbar. Select Bluetooth to turn it on.

How do I install Bluetooth without a Bluetooth adapter? ›

On the computer, open the Bluetooth software. The Bluetooth software is typically located in Control Panel. For more information about opening the Bluetooth software, see the "How to open the Bluetooth software" section. Click the Devices tab, and then click Add.

Can you manually add a Bluetooth device? ›

Make your BT device discoverable. Let Android search for and find the device and then initiate a connection. Android will ask for the PIN for pairing with the device; enter the PIN. Once pairing was successful, Android stores the pairing information for future use, so that you can.

How to connect Bluetooth speaker to computer without Bluetooth? ›

In almost every Bluetooth speaker or any other Bluetooth device, an AUX port is always present to connect with a PC/Laptop/Mobile and with almost every Bluetooth speaker and wireless headphones there is an AUX cable provided.
...
Method 1: Connect Using an AUX Cable
  1. A Gold-plated connector.
  2. Aluminium Build.
  3. Braided Cable.
Aug 10, 2021

Can you change the audio output? ›

Change the Sound Output Device Using the Settings Panel

Press Win + I to open Settings. In the System tab, click on Sound. The Sound panel lists all the audio devices connected to your PC and can play sound. Click on the device you want to set as your Output device.

How do I force Bluetooth audio codec? ›

How to Change Bluetooth Codec on Android
  1. Go to your device Settings.
  2. Tap on System.
  3. Navigate to Developer options (you may need to turn on the Developer options first).
  4. Find the Bluetooth audio codec menu.
  5. Select your preferred option.
Jan 28, 2022

Can I convert wired speakers to Bluetooth? ›

Don't throw out your old wired speakers. Convert them into wireless with a Bluetooth adapter. This easy and simple to use device means you can upgrade your old hi-fi system without having to break the bank or spend hours researching the best new speakers to buy. We recommend a TaoTronics Bluetooth adapter.

How to make a Bluetooth audio transmitter? ›

DIY Bluetooth Audio Adapter - BluFi
  1. Step 1: Gather Around Some Stuff. ...
  2. Step 2: The XS3868 PCB. ...
  3. Step 3: The 3.7V Booster PCB. ...
  4. Step 4: Finishing the XS3868 PCB. ...
  5. Step 5: Finishing the 3.7V Booster Circuit. ...
  6. Step 6: Testing the XS3868 Circuit. ...
  7. Step 7: Integrating the Booster Circuit With the XS3868 Circuit. ...
  8. Step 8: The Headers.

What is a Bluetooth adapter? ›

A USB-based device that transmits and receives Bluetooth wireless signals. It plugs into the USB port to support Bluetooth mice, keyboards and other Bluetooth devices. Also called a "Bluetooth dongle." See dongle.

Can a Raspberry Pi power a speaker? ›

Simply connect the standard 3.5mm stereo plug into your Raspberry Pi, Wave shield, etc. For power, plug the USB connector into anything that can provide USB power - This can be the Raspberry Pi at low volumes, but you're better off using a high output USB port from a USB hub or similar device.

Do all Raspberry Pi 4 have Bluetooth? ›

Raspberry Pi 4 comes with Gigabit Ethernet, along with onboard wireless networking and Bluetooth.

Does Raspberry Pi 4 have audio input? ›

The Pi Model B+, Pi 2, Pi 3 and Pi 4 features a 4-pole 3.5mm audio jack which also includes the composite video signal.

Does Raspberry Pi have audio output? ›

Your Raspberry Pi can either send sound to the screen's built-in speakers through the HDMI connection (if your screen has speakers), or to the analogue headphone jack.

Do USB speakers work on Raspberry Pi? ›

Adding this USB-powered speaker to your Raspberry Pi is one of the easiest ways to play great audio out of your project. It's also an ideal affordable speaker option for your Raspberry Pi 400!

Why are raspberry pis sold out? ›

The orders for Raspberry Pi are significantly increasing, however, low-volume Raspberry Pi stock cannot meet the requests from all the clients, thus a large gap in supply and demand formed and needs to be filled.

Why is Raspberry Pi so expensive? ›

The shortage in stock is due to supply chain issues which affected any components which used semiconductors. The Raspberry Pi range was not alone in this: graphics cards, along with other PC components, also saw stock shortages and high demand. It's also difficult to buy a bare board.

What outputs does Raspi 4 have? ›

Raspberry Pi 4 has two micro HDMI ports, allowing you to connect two separate monitors. You need either a micro HDMI to HDMI cable, or a standard HDMI to HDMI cable plus a micro HDMI to HDMI adapter, to connect Raspberry Pi 4 to a screen.

Videos

1. Raspberry Pi - Building a Bluetooth Speaker
(Basement Electronics)
2. Raspberry Pi as a wireless bluetooth receiver
(Wasabi Studio)
3. How to Make Any Speaker Bluetooth Powered
(MerwinMusic)
4. Pairing Bluetooth Devices From A Raspberry Pi Command Line
(Develop IT)
5. Raspberry Pi Bluetooth Speaker: Play Audio wirelessly using Raspberry Pi
(Circuit Digest)
6. 3. Play Audio On a Bluetooth Speaker With Raspberry Pi 3
(RADAS)
Top Articles
Latest Posts
Article information

Author: Annamae Dooley

Last Updated: 05/28/2023

Views: 6540

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.