This is step one in my multi step goal of creating a multi room sounds system.

Turn the PI into a BlueTooth Speaker

This part we will setup the pi to receive BlueTooth Audio (and if you are using a regular pi you can even play it out the hdmi or analog port) and Later we will stream it over RTP.

I installed the official Orange Pi software but found that it was lacking in updated module, so instead i decided to install Welcome to ARMBIAN 5.24 stable Ubuntu 16.04.1 LTS 4.9.4-sun8i
A linux supported BlueTooth module version 4 or better for the telephone sync. My original test was with a Raspbery Pi so i know this part works as well

Update and Install required packages on the pi
sudo apt-get install pulseaudio-module-bluetooth bluez-tools screen

Add your user to the proper groups

sudo gpasswd -a pi lp
sudo gpasswd -a pi lp
sudo gpasswd -a pi audio
sudo gpasswd -a pi pulse
sudo gpasswd -a pulse audio

Create a file to configure that PI, put it in discoverable mode call it Agent.sh


#!/bin/sh
hciconfig hci0 up
hciconfig hci0 class 0x200420
hciconfig hci0 name HomeAudio
bluetoothctl << EOF power on discoverable on agent NoInputNoOutput default-agent pairable on EOF

Set the file as executable
chmod +x agent.sh

finally if your NOT running X you need to start up Pulse Audio
screen -dmS pulseaudio --realtime=y

Finally if you want all this on boot edit your /etc/rc.local and add this about your exit 0
Remember to change the path to your Agent.sh


/root/Agent.sh
sudo -u pi -g pi -H screen -dmS pulseaudio --realtime=y

You should be able to now play audio using blutooth.

Leave a Reply

Your email address will not be published.