Make Bluetooth Device Work With Raspberry Pi

by ANKL in Circuits > Raspberry Pi

3503 Views, 4 Favorites, 0 Comments

Make Bluetooth Device Work With Raspberry Pi

maxresdefault.jpg
Screenshot (39).png

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 :0

Screenshot (40).png

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.

Install Pulseaudio and Other Required Modules

2020-11-02-181352_1024x768_scrot.png

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

Make Some Changes to Config Files

2020-11-02-190858_1024x768_scrot.png

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.

finally

sudo systemctl restart bluetooth

this will restart the bluetooth

Let's Pair Bluetooth Devices

copy paste this commands
bluetoothctl
power on
agent on
default-agent
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.

Cheak for Errors

2020-11-02-191034_1024x768_scrot.png
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

Step6: Watch My Video and Subscribe to My Channel

connect raspberry pi with bluetooth headset(!FIXED!)