Introduction: Make Bluetooth Device Work With Raspberry Pi

About: hi keep learning keep supporting.

I came up with lots of tutorial to connect bluetooth devices with raspberry pi.

And Ifailed several times but finally I came with a best tutorial which help me setup the connection and I am going to make it simple for you to do the same.

Things you need to get started

1-raspberry pi

2-bluetooth device(headphones.speakers)

3-enough space to install required software.

Step 1: Step :0

Before doing anything I want you to verify your current Raspberry Pi OS version.

if Your are using an older version before 2020-05-27:

then you have to follow the bellow steps to make bluetooth device work with raspberry pi

  • Install latest version of raspberry OS and you bluetooth device will work fine new version got inbuilt support for this devices
  • download from here.

if you are using latest version OS then almost you are ready just watch my YouTube video. how to connect bluetooth devices with Raspberry pi.

Step 2: Install Pulseaudio and Other Required Modules

NOTE: Latest version of raspberry pi OS got inbuilt support.

paste this piece of code in raspberry pi terminal

sudo apt-get install pulseaudio pulseaudio-module-bluetooth 

once installation process gets completed paste this command

sudo usermod -a -G bluetooth pi

this will add user to group bluetooth.And reboot.

sudo reboot

Step 3: Make Some Changes to Config Files

NOTE: Latest version of raspberry pi OS got inbuilt support.

Let's make our Pi permanently discoverable as an A2DP Sink. this will save a lot time

sudo nano /etc/bluetooth/main.conf

now you have to add/replace this commands

...<br>Class = 0x41C 
DiscoverableTimeout = 0 

if you see something like

#Class = 0x00010
#DiscoverableTimeout = 0

this "#" indicates its commented so you can either add new line or un-comment the old one and make changes.


sudo systemctl restart bluetooth

this will restart the bluetooth

Step 4: Let's Pair Bluetooth Devices

copy paste this commands
power on
agent on
scan on

After some seconds, you will see the headset name and MAC address (xx:xx:xx:xx:xx:xx)

pair xx:xx:xx:xx:xx:xx
trust xx:xx:xx:xx:xx:xx

connect xx:xx:xx:xx:xx:xx

after completing this step you bluetooth device should work.

Step 5: Cheak for Errors

sudo systemctl status bluetooth

if you get more than one error highlight in red then you have to fix those errors

its hard to say but most of the cases this error will occur but you can fix that error just go to this link fix errors

Step 6: Step6: Watch My Video and Subscribe to My Channel