Set up raspberry pi to become a airplay receiver

SeaSickMama

Expert Member
Joined
Dec 26, 2013
Messages
2,464
Reaction score
710
Location
Johannesburg
Hi i came across this guide on a few sites of how to setup a AirPlay receiver using a Raspberry Pi

I have tested this build on a raspberry pi 1 and pi 3, it works all the way up iOS 11 so far and the High Sierra.

You can do this VIA SSH if you want. You might need to enable SSH on your pi to do that open terminal on the pi then type in sudo raspi-config (if i recall select option 3 this will allow you to enable SSH)

You might also want to only enable audio out via the Aux RCA port or HDMI, in order to set this to a forced default

raspi-config
->Advanced (Option 7)
-> A4 audio
-> Force HDMI etc
-> 0 Auto
-> 1 Force 3.5mm ('headphone') jack
-> 2 Force HDMI

ssh pi@<ip-address>
This will allow remote access via terminal into the Pi

The default password is raspberry

Lastly you might need to set the volume to 100% on your pi automatically
To do this enter this command in SSH whilst connected to the Raspberry Pi -> amixer set PCM -- 100%
#(Set volume to 100%)

Or this command

amixer sset PCM,0 90% ->(Set it to 90%)

You should get a output from terminal that will confirm the setting you put in

How to setup Air-Pi

#Open terminal

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


git clone https://github.com/njh/perl-net-sdp.git perl-net-sdp
cd perl-net-sdp
perl Build.PL
sudo ./Build
sudo ./Build test
sudo ./Build install
cd ..

git clone https://github.com/hendrikw82/shairport.git
cd shairport
make

#Now we will Run Shairport

./shairport.pl -a AirPi

#(This command starts Shairport with your Raspberry Pi named "AirPi" (you can change it to whatever you want)


cd shairport
make install
cp shairport.init.sample /etc/init.d/shairport
cd /etc/init.d
chmod a+x shairport
update-rc.d shairport defaults

sudo nano shairport

#(Change the name AirPi to whatever you desire below in the nano file then save it via CTRL + X, then press enter)

DAEMON_ARGS="-w $PIDFILE -a AirPi"

The Pi should just work with the name made. Works up to ios 11

Enjoy
 
You literally build your own sonas system that costs a fraction of the price, as on itunes you can also make it play in multiple places

Screen Shot 2017-09-17 at 5.05.53 PM.png
 
Top
Sign up to the MyBroadband newsletter
X