Creating a Raspberry Pi Airplay Receiver

A few days ago I found an old Bose iPod speaker lying around in my house. I tested it out with an old 3rd Gen Ipod Nano and realised the sound quality was really good. I decided that the speaker can be made more useful by tweaking it in a way I can use it with my iPhone 6. I did some research and found a way to use my raspberry pi to create an airplay receiver so the speaker can be used wirelessly with any of my apple devices.

So here’s a tutorial for how to make such a device:

What you need :-

  1. Raspberry Pi
  2. SD card
  3. Ethernet cable/wifi dongle
  4. Micro USB cable
  5. Speakers
  6. Mac or PC
  7. iPhone or iPad

STEP 1: Download and install the Raspbian OS onto the SD card using your computer.

Step 2: Install the SD card into the Raspberry pi, connect the usb cable for power and the ethernet or wifi dongle to connect to the internet.

STEP 3: SSH into your raspberry pi from your computer to connect to it remotely through a terminal window.

STEP 4: Run the command “sudo raspi-config” and select the “expand_rootfs” option. This will create space on the partition.

STEP 5: Use the following command:

“sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl”

This will update the packages to the latest versions and change the default audio output to the Raspberry Pi’s 3.5mm jack and download some prerequisite files.

STEP 6: Run the command:

“git clone perl-net-sdp”
This will clone the Github repository of Perl Net-SDP onto your device. This helps it communicate with the Airplay protocol.

STEP 7: Now compile and install the Perl Net-SDP onto the Raspberry Pi using:

“cd perl-net-sdp
perl Build.PL
sudo ./Build
sudo ./Build test
sudo ./Build install
cd ..”

STEP 8: Install and run Shairport using:

“git clone”
“cd shairport make”

STEP 9: Finally run the command: “./ -a AirPi”

This will allow you to use the raspberry pi as an airplay receiver.

You’re all set!

Now when you listen to any music, you can pull up the control center on yout iPhone and Airplay to your speaker through the raspberry pi!

Like what you read? Give Azam Khan a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.