DEV Community

Cover image for Raspberry Pi as wireless audio receiver
Pavel Kutáč
Pavel Kutáč

Posted on

Raspberry Pi as wireless audio receiver

How to turn old Hi-Fi tower into a modern audio speakers, with wireless connectivity? Use Raspberry Pi


🇨🇿 V češtině si lze článek přečíst na kutac.cz

My parents wanted to throw out old, but still functional, Hi-Fi tower. So I took it into office. However, only place where it fits is on the other side of room than tables are. I wanted to avoid laying cable on the ground and covering with duct tape. So I used Raspberry Pi, which was streaming fish in aquarium during Christmas time. And turned it into Bluetooth receiver.

Bluetooth, AirPlay and Spotify Connect

I used nice prepared script, which guides you through the process and install all required. I tested it only with Bluetooth, but it supports different types of connectivity. Script can be found on github.com/nicokaiser/rpi-audio-receiver.

After executing the script, I restarted Raspberry. Then I saw my Raspberry in the list of available Bluetooth devices on my laptot. The name of the device is the same as hostname, which might be changed during the script wizard as well.

USB Bluetooth dongle is required

In the first step, I tried to use internal onboard Bluetooth. The Readme of the repo discourage from using internal one, and I do as well. It most likely will not work, or have issues. I was able to connect, but wasn't able to play music. And second time, I wasn't able to connect anymore.

Later, I connected old USB dongle with Bluetooth v2.0. It was working immediately, but I had to manually pair devices. And it was causing some issues with my laptop, when I connected also wireless mouse. So I bought new USB dongle with Bluetooth v4.2. Since then, I don't need to manually pair devices and it works like a charm!.

Manually pairing devices

Sometimes you might be asked to enter PIN on the device, on the Raspberry. That is not easy, especially when you don't have monitor and keyboard connected. So I suggest to use SSH and connect remotely. Start Bluetooth interactive console with sudo bluetoothctl and do the steps below.

After starting console, you might see all MAC addresses that are trying to connect. Try to connect from your phone or laptop and you will see the address there. Copy it, you will need that.

# Type this after starting 'sudo bluetoothctl'
power on
agent on
pair 00:00:00:00:00:00 # Put here MAC address of your device
# Here you will be asked to enter PIN
trust 00:00:00:00:00:00 # Put here MAC address of your device as well
Enter fullscreen mode Exit fullscreen mode

Top comments (0)