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 :)
 
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 :)
What about Kodi for Raspberry Pi? Do they still have support for AirPlay on the newest version of Kodi? I remember that if you install the older versions of XBMC, you could have enabled the AirPlay service in the settings...
 
What about Kodi for Raspberry Pi? Do they still have support for AirPlay on the newest version of Kodi? I remember that if you install the older versions of XBMC, you could have enabled the AirPlay service in the settings...

From my research you dont have the support for Video streaming/pushing to the device after ios 8. This is if you want to build a speaker system etc in a remote location like your patio or cellar etc.
 
I had a Raspberry Pi running the then XBMC, i think it was Xbian, and I was playing music from my Samsung phone over WiFi using the music player app provided with TouchWiz. I suspect I was playing music over DLNA or upnp... But shairport is like a emulator, "emulating" a Apple AirPlay/AirPort receiver.
EDIT: If you want to play videos or music using a android phone to a Raspberry Pi, then you can search on the Internet for solutions, but this tread is for setting up a "AirPlay" receiver for iOS devices, on the Raspberry Pi.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X