jomora / diy-raspi-spotify-music-player-for-kids

0 stars 0 forks source link

How to connect a Bluetooth speaker to Raspberry pi? #3

Open jomora opened 1 year ago

jomora commented 1 year ago

Change settings of Raspberry pi to send audio only to bluetooth speaker:

# The following line must be commented in the according file. After adjusting the file a reboot is required.
pi@raspberrypi:~/github/jomora/tmp $ grep dtparam=audio /boot/config.txt 
# dtparam=audio=on

Connect the speaker:

# Put Bluetooth speaker into  pairing mode
bluetoothctl scan on
# Look for the mac address of the speaker
bluetoothctl pair <mac>
bluetoothctl trust <mac>
bluetoothctl connect <mac>

If you turn off the speaker and turn it on again, you have to disconnect via bluetoothctl before reconnecting:

bluetoothctl disconnect <mac>
bluetoothctl connect <mac>