Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CosminLazar/1d9a38d947213842b356b3a5df0e2ba2 to your computer and use it in GitHub Desktop.
Save CosminLazar/1d9a38d947213842b356b3a5df0e2ba2 to your computer and use it in GitHub Desktop.
Connect to a bluetooth speaker
sudo bluetoothctl
power on
pairable on
agent on
default-agent
scan on
pair xx:xx:xx:xx:xx:xx
trust xx:xx:xx:xx:xx:xx
exit
BT-Audio for audio output
https://github.com/bablokb/pi-btaudio
Remember to disable the reconnect daemon
sudo systemctl disable pi-btaudio.service
Alternative to Raspotifty - gracefully handles disconnects
https://github.com/spocon/spocon
That uses
https://github.com/librespot-org/librespot-java
Config changes for Spocon
sudo vim /opt/spocon/config.toml
Disalbe logs system-wide (protect SD card)
sudo vim /etc/rsyslog.conf
Check logs
journalctl -u raspotify.service -f
journalctl -u spocon.service -f
Check wifi standby and disable
iw wlan0 get power_save
Disable power saving one time with:
iw wlan0 set power_save off
Or disable it permanently with a udev rule. My example for Arch Linux:
file: /etc/udev/rules.d/81-wifi-powersave.rules:
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", RUN+="/usr/bin/iw dev $name set power_save off"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment