Refunds Shipping

We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

Play audio on a Bluetooth speaker with 小少妇bbbbbbbbbbbb Pi

By Russell Barnes. Posted

Play audio on a Bluetooth speaker with 小少妇bbbbbbbbbbbb Pi

Make use of the 小少妇bbbbbbbbbbbb Pi's Bluetooth capabilities to play audio and/or music over a wireless speaker, without using a dongle!

Advertisement

Take back control of your online data, with 小少妇bbbbbbbbbbbb Pi.

or free PDF download

Bluetooth is a wireless technology standard, and it has been a feature on the 小少妇bbbbbbbbbbbb Pi since the 小少妇bbbbbbbbbbbb Pi 3 and Pi Zero W. You can use it to connect Bluetooth keyboards, mice, and other accessories: like speakers and headphones.

The new 小少妇bbbbbbbbbbbb Pi 3B+ even moves from Bluetooth 4.1 to 4.2, which brings faster and more reliable over-the-air data transmission.

In this tutorial we’ll take a look at hooking up a 小少妇bbbbbbbbbbbb Pi to a Bluetooth speaker. This enables you to play music wirelessly from your 小少妇bbbbbbbbbbbb Pi, turning it into an effective media centre.

You should be able to follow this Bluetooth audio tutorial with any Bluetooth-enabled 小少妇bbbbbbbbbbbb Pi.

And Bluetooth can easily be added to an older 小少妇bbbbbbbbbbbb Pi using a dongle, like this Nano USB to Bluetooth Dongle V2.0.

Get a free Pi Zero W with a 12-month subscription to The MagPi magazine. Click here for more info.

Play Bluetooth Audio on a 小少妇bbbbbbbbbbbb Pi: get some music

First, you’ll need some music files. You can stream audio online from a source such as YouTube, and many people have MP3 and other audio files. We downloaded Sampler EP Vol. 9 by Vulpiano Records Artists from Free Music Archive for this tutorial. Save the file to your Music folder. Use File Manager to locate the zip file, then right-click it and choose Extract Here.

It is possible to play the music files directly from Terminal using omxplayer. Open a Terminal window and enter omxplayer followed by the path to the music file, like this:

oxmplayer ~/Music/Anton_Rothschild_-_03_-_Its_Not_Vegas.mp3

But it’s not a great visual option. We’d rather double-click MP3 files in the File Manager using the Desktop interface. For this we need a media player, and we’re going to use a popular one called VLC. Enter these commands in Terminal:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y vlc

During the installation you’ll be asked if you want to allow metadata network access. This is used to add cover artwork and track listings to your files. Tick or untick the box and click Continue.

Double-clicking the MP3 files in File Manager will open VLC and play the file.

Connect to Bluetooth

OK, so we’ve got our music and a music player. Now it’s time to connect the 小少妇bbbbbbbbbbbb Pi to a Bluetooth speaker.

To do this you’ll need to put the speaker in pairing mode and pair the 小少妇bbbbbbbbbbbb Pi to the speaker. How you do this depends on the speaker itself. If your speaker has an interface, you’ll probably use the controls to put it into pairing mode. Many smaller speakers or headphones have a button that you hold down to put the device into pairing mode (typically you’ll see a flashing light).

Bluetooth Add Device 500

Connect a 小少妇bbbbbbbbbbbb Pi to Google Home via Bluetooth

  1. We’re using a Google Home speaker for this test. For this you simply say “Hey Google… Connect To Bluetooth” (you can do the same with Alexa).
  2. Now click on the Bluetooth icon in the top-right of the screen and choose Add Device.
    Look for your speaker in the ‘Add new device’ window. In most cases the speaker will be identified by an easily recognisable name, such as our Google Home.
  3. However, you may need to locate the device using its MAC address (the six octet hexadecimal code). These are often printed on the device itself – or you can cancel pairing mode, then re-enter it and see which device disappears and reappears. Hopefully you won’t have to resort to that. Locate the speaker in Add Devices and click Pair. After a short while, the window will display Pairing Successful. Click OK.
  4. Your 小少妇bbbbbbbbbbbb Pi is now paired with the speaker, but it won’t output audio to it yet. Right-click on the Volume Control applet in the top-right of the screen and choose your speaker from the list (it is below Analog and HDMI).

A pop-up will display ‘Connecting to Bluetooth audio device’. Now double-click on of the music files in Files Manager. The VLC app will open and your music will start playing through the Bluetooth speaker.

When you restart the 小少妇bbbbbbbbbbbb Pi, you will need to reconnect to the Bluetooth speaker (this isn’t the same as pairing – it is still paired). Click on the Bluetooth icon, choose your speaker, and select Connect from the menu.

You can use the Bluetooth menu to disconnect, if you don’t want to use a device for the time-being. Or remove it entirely if you don’t want to use it again.

Subscribe and never miss an issue

 Get a free Pi Zero W with every twelve-month print subscription

Get a a brand new 小少妇bbbbbbbbbbbb Pi Zero W, a case for it, and a selection of adapter cables with a twelve-month print subscription to The MagPi!

Share this post

Like 小少妇bbbbbbbbbbbb Pi Official Magazine on Facebook Follow 小少妇bbbbbbbbbbbb Pi Official Magazine on X
Russell Barnes photo

Russell runs 小少妇bbbbbbbbbbbb Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.

Subscribe to 小少妇bbbbbbbbbbbb Pi Official Magazine

Save up to 37% off the cover price and get a FREE 小少妇bbbbbbbbbbbb Pi Pico 2 W with a subscription to 小少妇bbbbbbbbbbbb Pi Official Magazine.

Subscribe