While working on projects around our house, my wife Emily and I listen to music using our esteemed Bluetooth speaker. Often times, though, our quest takes us into different rooms of the house, as I emphasize to Emily the importance of parallelization for optimizing workloads. Two eye-rolls later, and at least one of us is unable to hear the music well from our new position. We need to connect another speaker.
I’ve been reluctant to buy a lavish set of speakers that wirelessly network with each other to sync up. And I definitely don’t need more wires in my house. I figured it could be more fun to attempt to build something to achieve this through some Linux utilities on a Raspberry Pi. Basically, what I wanted was to connect my phone or computer to a Pi and let the Pi manage connections between multiple speakers, routing audio from the source (phone) to 1 or more Bluetooth sinks (speakers).
Luckily for me, as I began my research searching for an existing solution or project, I came across a repository on GitHub called bluecast that was a work-in-progress attempt at exactly what I wanted. That never happens! (it actually happens all the time, which is quite handy).
The bluecast project README goes through the steps to get everything setup, but the main components are:
The steps after that seemed pretty straight-forward (checkout the bluecast README for the actual commands and config files):
After getting everything in order and following the configuration steps from the README, I was ready for the first test. I pressed play on my phone’s music app and immediately heard a loud screeching sound emanating from a nearby Bluetooth speaker. Something seemed off. I doubled-checked I wasn’t streaming one of my favourite Pink Floyd numbers, Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a Pict. Nope.
Deaf and defeated, I removed power from all offending devices and gathered my thoughts. I’ll have to revisit this another lab day.