Connecting a Bluetooth speaker to a Raspberry Pi Zero W running Raspian Stretch Lite
- sudo apt-get update && sudo apt-get dist-upgrade
- sudo apt-get install bluealsa
- sudo service bluealsa start
- Switch on your bluetooth device
- sudo bluetoothctl
- scan on
- pair XX:XX:XX:XX:XX:XX (replace the XXXXX with your device ID)
- trust XX:XX:XX:XX:XX:XX
- connect XX:XX:XX:XX:XX:XX
- exit
- aplay -D bluealsa:HCI=hci0,DEV=XX:XX:XX:XX:XX:XX,PROFILE=a2dp /usr/share/sounds/alsa/*
/