Listen to Bluetooth Audio on Your Raspberry Pi 3, Pi Zero, or Earlier Pi

YouTube on the Pi

Editors Note: The instructions in this post are valid for Raspbian Jessie versions up to March 18, 2016. Bluetooth audio now works out of the box with the May 10, 2016 and later versions. See our post about it here.

The Raspberry Pi is a handy little computer for so many uses, but Raspbian doesn’t come already set up for listening to audio over Bluetooth headphones or speakers. However, it’s not hard to do, it’s a lot of fun, and it works!. As I’m writing this, I’m listening to 40s Big Band music on my Pi 3 through my Bluetooth headphones.

The instructions in this post are for the February 26, 2016 version of version of Raspbian or Noobs, but they work with all previous versions of Raspbian Jessie. They work for the Raspberry any Pi version, although the Zero and the original Pi are not really powerful enough to stream from the internet. They work great for playing mp3 files with a media player like VLC.

Except for the Pi 3, you’ll need a Bluetooth adapter like the Plugable Bluetooth adapter. For the Pi Zero, you’ll also need a way to connect to the Internet like a Plugable USB-Ethernet adapter or WiFi adapter, along with an OTG cable and a powered hub like the compact Plugable 4-port USB 2.0 hub. Whichever Pi you use, you end up with is a great little music server that opens the door to a lot of fun projects.

Getting Ready

Download the latest version of Raspbian Jessie and put it onto an 8 GB or higher mircoSD card. Make the necessary connections to the Pi and boot it up. If you installed the Jessie image directly without using Noobs, be sure to expand the file system by opening a terminal window, then typing:

sudo raspi-config

Select the first option, then reboot.

Next, open a terminal and run the following commands to make sure everything is up-to-date. If you open this page in the browser on your Pi, you can copy and paste these commands directly into your terminal to avoid typos.

sudo apt-get update
sudo apt-get upgrade

Accept all offered upgrades from the upgrade command.

If you are using a Jessie version earlier than the February 26, 2016 version on a Pi 3, you will also need to issue this command:

sudo apt-get install pi-bluetooth

If you aren’t sure which Jessie version you have, go ahead and issue the command. If pi-bluetooth is already installed, you will get a message to that effect.

Set Up Bluetooth

1. Open a terminal and issue the following command to install the Bluetooth support software:

sudo apt-get install blueman pulseaudio pavucontrol pulseaudio-module-bluetooth

Install Bluetooth Audio Components

2. Plug in your Bluetooth adapter if you are using a Pi 2 or Zero.

3. Restart your Pi.

4. Click Menu > Preferences > Bluetooth Manager to open the Bluetooth Manager Window.

Start Blueman

5. Follow the manufacturer’s instructions to make your Bluetooth headphones or speaker discoverable. Be sure to turn off Bluetooth on any other device you have previously used the adapter with to ensure it doesn’t automatically connect with that device.

6. In the Bluetooth Devices window that appears, click Search. You should see your headphones or speaker in the listed devices.

Select Connect

7. Right-click on your device and select Connect. Your device should connect. Blue, green, and blue symbols should appear at the right.

Headphones connected

8. You should now be able to listen through your speakers or headphones. On the Pi 2 or Pi 3, try opening your favorite YouTube video in the web browser. The Pi Zero and original Pi don’t really have enough horsepower for YouTube, but you should get good results playing mp3 files with VLC. To install it, open a terminal and type:

sudo apt-get install vlc

9. Open Menu > Sound & Video > PulseAudio Volume Control to adjust volume and balance for your Bluetooth device. You should see your headphones or speaker listed under the Output Devices tab. You can mute the Pi’s speaker output by going to the Configuration tab and selecting Off for bcm2835 ALSA.

Select PulseAudio Volume Control

Volume Control Screen

These instructions have been tested on the Pi 2, Pi 3, Pi Zero, and an original Pi B. The VLC player works well for playing mp3 files on any of those, and Youtube videos can be enjoyed on the Pi 2 and Pi 3, although there can be occasional skipping in the sound.

I hope this guide has been helpful. If you have any questions or comments, please comment below. Thanks!

45 comments on “Listen to Bluetooth Audio on Your Raspberry Pi 3, Pi Zero, or Earlier Pi”

  1. SeeJaph Reply

    Adapters List empty, no bluetooth adapters found on R-Pi 3, running fully updated and upgraded NOOBS. Sorry it didn’t work.

    • David Roberts David Roberts Reply

      Assuming you installed Raspian from Noobs, Bluetooth should work since the Bluetooth adapter is built into the Pi 3. Please open a terminal and type:

      hcitool dev

      You should see the Bluetooth address of the built-in the adapter. If you don’t see it, try typing

      sudo hciconfig

      It should show the adapter and show that it is UP. If it is up, it should work. Otherwise there may be a problem with the Bluetooth adapter or the software.

  2. SeeJaph Reply

    Oh, you skipped mentioning the very first step for the Pi 3 Bluetooth setup:

    sudo apt-get install pi-bluetooth

    The Pi 3 and NOOBS latest edition does not include the bluetooth drivers for the hardware. pi-bluetooth downloads the adapter driver files.

    Once the pi-bluetooth is installed, then run the command:

    sudo apt-get install blueman pulseaudio pavucontrol pulseaudio-module-bluetooth

    update and upgrade if you like, then restart the Pi 3.

    The Raspberry Pi 3 comes up as headphones to Samsung SmartPhones.
    After pairing the SmartPhone through devices, and starting the:
    Local Services,
    Advanced Audio receiver and
    Headset Emulation, then apply the changes.

    Attempting to play songs through the Pi 3 to the HDTV, the devices
    panel displays data being received, and a good strong connection,
    as the cell phone is sitting directly beside the Pi 3.

    No audio plays through the TV, and if you attempt to close the devices panel,
    the Pi 3 hangs – Dead. Unplug to reboot.

    Also, there appears to be no way to switch back from headphones (receiving audio) to source (transmitting audio to headphones).

    Nice try though. The bluetooth adapter came up after adding the missing command.
    More information here:

    https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=138271

    • David Roberts David Roberts Reply

      Edit: I just tried with a fresh copy of Raspbian from the latest Noobs version, and it came with pi-bluetooth already installed. Following the instructions in the blog post worked as expected. However, it does appear to be necessary to install it for Jessie versions earlier than the Feb. 26, 2016 version.

      Thanks for you comment. I’ll have to look into that. I used a freshly downloaded copy of the Feb. 26 version of Jessie on a Pi 3, and it worked with just the steps I gave above. I didn’t use the lite or Noobs version. From my past experience (which could be irrelevant in the latest version), even if something Bluetooth is missing, installing Blueman resolves any dependencies.

      I’ll do some testing on this and make any necessary revisions to the post.

      Thanks!

  3. danceswithrobots Reply

    When I try to conect I get an error message Connection failed: Resource temporarily unavailable.

  4. David S Contreni Reply

    Well I got it to work. But I’ve never been able to use blueman to get anything connected. (So far a keyboard with trackpad, and a bluetooth speaker.) Bluetoothctl seems to do the job tho. In the case of the RP3, I removed the existing keyboard and started over. I was able to play YT videos over Iceweasel and I was able to reconnect my keyboard/trackpad. But streaming YT videos over wifi with a bluetooth keyboard and a bluetooth speaker connected results in absolutely awful stuttering. Non-bluetooth wireless keyboard worked fine however.

    Unfortunately, I couldn’t get any sound out of Sonic Pi or Scratch.

    • David Roberts David Roberts Reply

      Hi David,

      Thank you for your comment. I’ve had some bad experiences with blueman, but many of them seem to be fixed in the most recent version of Jessie. With keyboards, it seems to work pretty well as long as you right-click and select Pair, and not try to use the useless setup assistant. We’ve done a blog post on this: http://plugable.com/2016/02/25/get-rid-of-raspberry-pi-cables-with-plugable-keyboards-and-raspbian-jessie.

      The setup assistant also seems to fail for audio devices as well, but right-clicking and selecting Connect works.

      I’m not surprised about the stuttering with Wifi and keyboard. I had a wired Ethernet and keyboard connection when I tested, and I still had an occasional skip with Youtube. I think it is just the CPU hitting its limits.

      I haven’t tried Sonic Pi or Scratch. Probably need to be configured to use BT.

  5. Sascha Frey Reply

    After insallation : sudo apt-get install blueman pulseaudio pavucontrol pulseaudio-module-bluetooth my Pi 3 doesnt boot anymore.. all i got i a blinking cursor in the left corner..

    • David Roberts David Roberts Reply

      Hi Sascha,

      The apt-get command uses Raspbian’s built in install system, and it only installs applications that are designated in the Raspbian repository for your system, so it would be unexpected for it to cause your system to stop booting. I would start out by checking that the SD card is firmly seated and hasn’t received any mechanical damage. Also, if you have another microSD, try installing a fresh Raspian image on that and try booting to make sure something hasn’t happened electronically with the Pi.

    • Sean Kirkpatrick Reply

      Sasha, I had this problem and was losing my mind… Until I realized it was because Raspberian thought my SD was out of storage space. I had forgotten to “Expand” my file system under preferences after doing a clean install. That fixed the issue. My storage went from 60 megabytes to 64 gigabytes.

      • David Roberts David Roberts Reply

        Thanks very much for this useful advice! The Raspbian configuration program used to come up automatically in earlier versions on the first boot. To access it, use this command:

        sudo raspi-config

        Then select the first option.

    • David Roberts David Roberts Reply

      Thanks for your comment. It the versions of Jessie I tried (the two most recent), the Pulse Audio Manager wasn’t necessary to get audio working. It is a useful option that gives you more control over how Pulse Audio works.

  6. larand54 Reply

    Connecting to my laptop and android phone works except for pairing where the kodes are different on the phone.
    My headset PHILIPS SHB7150 cannot be detected what’s the reason?

    • David Roberts David Roberts Reply

      Thanks for asking! It’s possible that your headset is automatically connecting to your phone or laptop as soon as you turn them on. Try temporarily turning off Bluetooth in the phone and laptop, make the headphones discoverable, and see if the Pi can detect it. If this doesn’t work, you may want to try connecting another Bluetooth device to make sure Bluetooth is working OK in your Pi.

  7. Dimitri Reply

    Hi David ! Thanks for your tutorial on the Jessie release.
    Do you think it’s possible to connect to Bose Soundlink ? ( I’ve tried for hours to stream thourgh Kodi before to understand it was not possible).
    Anyway, I will try this evening.

    • David Roberts David Roberts Reply

      Hi Dimitri,

      It should be possible to connect a Bose Soundlink. Let me know if it doesn’t work.

  8. Peter Reply

    Thanks for this David. Do you know if it’s possible to do similar bluetooth audio setup using openELEC on an rpi 2?

  9. Tracy Reply

    I spent hours trying to get bluetooth audio working with no avail. Your simple instructions made it clear to me that something has to be there to USE the device or it won’t connect!! I tried a handful of headsets and speakers and none worked UNTIL I installed pulseaudio … then all of them were able to connect!!

  10. Sean Kirkpatrick Reply

    This is a great tutorial and helped me get set up 🙂 I have one question, and I hope someone can help me out.

    When I restart my Pi3, I have to manually re-pair to my bluetooth speaker, even though I have it listed as trusted.

    Is there a way to set it up to automatically pair with the speaker at reboot?

  11. mongo Reply

    I can connect my speaker with bluetooth, but it doesn’t show up in output devices and no audio through it. Any suggestions?

  12. markbee Reply

    I followed your tutorial and it works great for the latest Raspian Jessie image with a Raspi3. Unfortunately I’m still not able to connect the microphone of my BoomStar BT NFC X as an device input.

    • David Roberts David Roberts Reply

      Thanks for your comment! Unfortunately, using the microphone in a Bluetooth audio device requires using the headset profile, and I have not been able to figure out a way to get the headset profile working on the Pi yet.

  13. Marko Botz Reply

    Hallo David,

    Your post was very helpful; I got my Bose SoundLink III to run YES YES!! It still has these occasional Interrupts.
    I`m not quite sure if this could be a buffering (memory charing) Problem and not the slow CPU. Is there a possibility to expand for example “Streaming buffer” or something like that? (Sorry I`m a newbie with RPi)

    • David Roberts David Roberts Reply

      Hi Marko,

      I’m really glad you are using your speakers now! I have occasional audio skips too, and I think it is probably an overwhelmed CPU. If you are streaming from internet, the CPU has to handle both the internet data coming in, and also decoding and sending out over Bluetooth. You can watch the little CPU meter in the upper right corner to verify if the CPU is running at max capacity.

      I don’t know of a streaming buffer setting. It would probably depend on which application or website you are using for streaming. I’ll check into this, and post a comment about it if I discover anything.

  14. Dan Buchta Reply

    Do you have instructions on how to pair entirely through the terminal?

    • David Roberts David Roberts Reply

      Hi Dan, Thank you for asking. I haven’t tried pairing this on the command line, so I don’t have instructions. If I have a chance in the near future, I’ll do some experimentation with this and add instructions to the blog post.

  15. MakeADifference Reply

    Here are the commands that I used on the pi for pairing a RPI3 with a BT Hipstreet speaker Model HS-BTSP825B.
    The pre-requisite is that the BT device to be paired should be “discoverable” before you begin to issue these commands.

    pi@raspberrypi-3:~ $ bluetoothctl
    # devices
    Device 00:19:86:00:04:5F raspberrypi-2
    Device 00:11:67:00:01:2E HS-BTSP825B
    # power on
    Changing power on succeeded
    [bluetooth]# pairable on
    Changing pairable on succeeded
    [bluetooth]# discoverable on
    Changing discoverable on succeeded
    [bluetooth]# scan on
    Discovery started
    [CHG] Controller B8:27:EB:CC:F7:1D Discovering: yes
    [bluetooth]# devices
    [NEW] Device 00:11:67:00:01:2E HS-BTSP825B
    [bluetooth]# devices
    Device 00:11:67:00:01:2E HS-BTSP825B
    [bluetooth]# paired-devices
    [bluetooth]# pair 00:11:67:00:01:2E
    Attempting to pair with 00:11:67:00:01:2E
    [CHG] Device 00:11:67:00:01:2E Connected: yes
    [bluetooth]# connect 00:11:67:00:01:2E
    Attempting to connect to 00:11:67:00:01:2E
    [CHG] Device 00:11:67:00:01:2E Modalias: bluetooth:v0039p13A4d0501
    [CHG] Device 00:11:67:00:01:2E UUIDs:
    00001108-0000-1000-8000-00805f9b34fb
    0000110b-0000-1000-8000-00805f9b34fb
    0000110c-0000-1000-8000-00805f9b34fb
    0000110e-0000-1000-8000-00805f9b34fb
    0000111e-0000-1000-8000-00805f9b34fb
    0000112e-0000-1000-8000-00805f9b34fb
    00001200-0000-1000-8000-00805f9b34fb
    [CHG] Device 00:11:67:00:01:2E Paired: yes
    Connection successful
    [bluetooth]# paired-devices
    Device 00:11:67:00:01:2E HS-BTSP825B
    [bluetooth]# exit
    [DEL] Controller B8:27:EB:CC:F7:1D raspberrypi-3 [default]

  16. Ian Reply

    Hi David, thanks for the tutorial, prior to finding this, I’ve been trying to stream Bluetooth for a while. I’ve encountered a few issues however on my RPI 3 running latest Raspbian Jessie:

    When playing audio, the Bluetooth stream is very crackly. CPU isn’t near to capacity so trying to figure out if it’s WiFi interference.

    The second major issue is now when I boot up, it’s not possible to play audio through analogue or HDMI straight away. It works in Kodi and after that’s shut down, it works in Raspbian GUI with VLC but that’s the only way to get it working under GUI.

    Thanks

    • David Roberts David Roberts Reply

      Hi Ian,

      Thank you for your comment. Radio interference does sound like a possible culprit. Also, if you have any USB 3.0 ports nearby, they also leak radio interference. A couple of questions to consider:

      1. Do hear similar noise if you play a mp3 file from the SD card? If so than RFI affecting Bluetooth is a possible culprit. If not, then it could be a problem with Wifi or the stream.

      2. Does the noise increase with distance between the adapter and the headphones? This would tend to support RFI.

      About your second question, have you checked pavucontrol to turn off Bluetooth output and enable the built-in audio?

  17. Jan Reply

    I have a Raspberry Pi 3 and want to use my Xoopar Boy as bluetooth speaker
    I followed your instructions.
    When the bluetooth manager searches for devices he sees my Xoopar Boy.
    Wie I then choose Connect, I get the following remark:
    Connection failed: Connection “:1.18” is not allowed to add more match rules (increase limits in configuration file if required)

    Can you please give me some advise about what tot do?
    Thanx in advance

    • Bernie Thompson Bernie Thompson Reply

      We’re not going to know the built-in Bluetooth in the RPi 3 (since we don’t sell that) as well as our own Bluetooth adapter, unfortunately. Others here may have some advice!

  18. Youness Reply

    Hi David,

    Thanks for this great tutorial.
    Did you try to connect a Bluetooth headset that has also a microphone (to listen and talk with the same device)?

    • David Roberts David Roberts Reply

      Yes, we did try, but unfortunately, the HSP profile that supports headsets with microphones is not nearly as straight-forward as the stereo A2DP proflle, and I wasn’t able to get it working. It’s on my list of things to experiment with.

  19. chuxxsssonelectronic Reply

    Installed Blueman and PulseAudio. When going to Sound and Video I get
    Bluetooth devices also tells my Connection failed:No such file or directory (C1652) is the bluetooth device in Blueman. This is with the latest disto upgrade.

Leave a Reply