Bluetooth – Installing and Using Bluetooth on the Raspberry Pi


[jessie-backports] [issue]

Edit the deb sources list.


Add jessie-backports to the `raspi.list` by adding the following line to the file.

deb jessie-backports main

Suppress the public key warnings.

gpg --keyserver --recv-key 8B48AD6246925553
gpg -a --export 8B48AD6246925553 | sudo apt-key add -

gpg --keyserver --recv-key 7638D0442B90D010
gpg -a --export 7638D0442B90D010 | sudo apt-key add -

Update apt-get.

sudo apt-get update

Install the bluetooth manager

Upgrade the packages.

sudo apt-get upgrade

Install `blueman`.

sudo apt-get -t jessie-backports install bluetooth blueman bluez python-gobject python-gobject-2 pulseaudio-module-bluetooth

Turn on bluetooth device on boot

If you require turning on your bluetooth device at boot time automatically, for instance when you require keyboard / mouse support. You can add a udev rule to enable that. Additionally, you need to make sure you have the package bluez-utils installed.

Create `/etc/udev/rules.d/50-bluetooth-hci-auto-poweron.rules` with the following content.

ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/bin/hciconfig %k up"

Use pavucontrol to configure pulse audio

[pavucontrol] is a GUI front-end for [PulseAudio].

sudo apt-get -t jessie-backports install pavucontrol

[blueman-project] [issue]
[enable analog out]
[Bluetooth – Installing and Using Bluetooth on the Raspberry Pi]
[Installing the Raspberry Pi Nano Bluetooth Dongle]

pi@raspberrypi:~/Documents/PythonScripts/Microphone $ bluetoothctl 
[NEW] Controller B8:27:EB:22:51:00 raspberrypi [default]
[NEW] Device 48:C1:AC:E2:21:A7 PLT_Legend
[bluetooth]# quit
pi@raspberrypi:~/Documents/PythonScripts/Microphone $ sudo l2ping -c 1 48:C1:AC:E2:21:A7
Ping: 48:C1:AC:E2:21:A7 from B8:27:EB:22:51:00 (data size 44) ...
16 bytes from 48:C1:AC:E2:21:A7 id 0 time 8.55ms
1 sent, 1 received, 0% loss
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****