Connecting a Bluetooth speaker to a Raspberry Pi Zero W running Raspian Stretch Lite

  1. sudo apt-get update && sudo apt-get dist-upgrade

  2. sudo apt-get install bluealsa

  3. sudo service bluealsa start

  4. Switch on your bluetooth device

  5. sudo bluetoothctl

  6. scan on

  7. pair XX:XX:XX:XX:XX:XX (replace the XXXXX with your device ID)

  8. trust XX:XX:XX:XX:XX:XX

  9. connect XX:XX:XX:XX:XX:XX

  10. exit

  11. aplay -D bluealsa:HCI=hci0,DEV=XX:XX:XX:XX:XX:XX,PROFILE=a2dp /usr/share/sounds/alsa/*

/