Use Pi Musicbox as bluetooth A2DP receiver

Hello there, I wanted to have an all-in-one solution for playing music in my kitchen. Pi music box is the perfect fit! The only thing that’s missing: streaming audio to the box via bluetooth. Most modern smartphones implement UPNP or Airplay, but you have to be in the wifi and some times bluetooth is just easier. It would be cool if Pi Musicbox could act as an A2DP receiver which happily connects to anyone without code and plays audio through aux it gets send via bluetooth, presumably after pausing mopidy playback.

I hooked up a bluetooth dongle to my rpi and followed this (this) tutorial. Bluetooth startup works fine, I see the device, but I cannot pair. I looked into the script and bootlog and there’s a plethora of incompatibilities, that already struck me, while editing all the config files. /etc/pulse/daemon.conf didn’t even exist, nor did /etc/udev/rules.d/99-input.rules. The scripts cannot work, because the user pi does not exist, nor is pactl (in pulse-utils) installed. /sys/devices/virtual/input/ does just list mice and nothing else. I have no idea where to start, as pactl doen’t even connect to a Pulse audio server. And I don’t know which user is supposed to play the audio (and be added to the lp as in the tutorial. Or shall a separate user be added for this application?

It would be really cool too have this officially supported, especially in prospect to rp3 support (any updates on that?), which has a bluetooth chip built in. Shall I open a bug on github?

But I would be happy about any help to hack it together myself.

1 Like