Skip to content

joh2511/bluetooth-raspberry-headless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bluetooth Setup on headless RPI

Sources:

Dependencies:

Install libfdk-aac

git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./configure
make -j4 
# sudo make install

Install bluez-alsa

git clone https://github.com/Arkq/bluez-alsa.git
cd bluez-alsa
git checkout v1.4.0
autoreconf --install
mkdir build && cd build

# if u intend to stream audio from a linux distribution 
# (e.g. using pulse audio) disable payloadcheck
../configure --enable-aac --disable-payloadcheck
make 
sudo make install

Install files

  1. copy files
sudo cp -v bluetooth/* /etc/bluetooth/
sudo cp -v services/* /etc/systemd/system/
sudo cp -v bin/* /usr/local/bin
  1. Edit /lib/systemd/system/bluetooth.service and append to ExecStart: --noplugin=sap

  2. Enable systemd services

sudo systemctl daemon-reload
sudo systemctl restart bluetooth.service

sudo systemctl enable bluealsa.service
sudo systemctl enable bluealsa-a2dp-playback.service
sudo systemctl enable bluetooth-a2dp-agent.service

sudo systemctl start bluealsa.service
sudo systemctl start bluealsa-a2dp-playback.service
sudo systemctl start bluetooth-a2dp-agent.service
  1. Start bluetooth: sudo bluetoothctl. Enter:
power on
discoverable on

Notes

If you have multiple sound cards installed (e.g. hifiberry) you need to speciy which one is used. Use aplay -l to identify number of card. Afterwards specify default card for aplay in /etc/asound.conf:

pcm.!default  {
 type hw card 1
}
ctl.!default {
 type hw card 1
}

About

systemd files and tutorial to setup raspberrypi as headless bluetooth speaker platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages