AirPi #1: set up AirPi on your RaspberryPi running Raspbian

Initial source:

What is AirPi?

AirPi is the RaspberryPi implementation of Apple’s protocol called AirPlay.

Using AirPlay you can send audio and video streaming from you Apple Device (ipad, iPod, iPhone, Mac) to RaspberryPi. This implementation is sending only the sound.


Why all this trouble?

Do you know those expensive devices called Sonos?

I want to do the same using a Raspberry Pi and a cheap radio I got for free with a magazine ( ).

I will post pictures here.


Why AirPi and not XBMC’s AirPlay support?


I guess because XBMC is using a lot of resources … I can’t find another reason why someone would not use it directly.


Install and setup AirPi

sudo su –


apt-get update

apt-get upgrade


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

git clone perl-net-sdp
cd perl-net-sdp
perl Build.PL
./Build test
./Build install
git clone shairport

# and the rest is repeating the install instructions from the original post
cd shairport
./ -a AirPiTest
# check it works then Ctrl-C
make install
cp shairport.init.sample /etc/init.d/shairport
cd /etc/init.d
chmod a+x shairport
update-rc.d shairport defaults
nano shairport
# edit DAEMON_ARGS line: eg DAEMON_ARGS=”-w $PIDFILE -a AirPiFinal”


The script will start automatically on reboot.


Improvements if you have problems with the sound:

Add in the /etc/init.d/shairport the following lines in the routine start:

#set audio to the jack

amixer cset numid=3 1

#set volume to max

amixer set PCM 1dB

amixer set PCM 1dB-

amixer cset numid=1 100


© Copyright Sorin Mustaca, All rights Reserved. Written For: Sorin Mustaca on Cybersecurity

Check for seeing the consulting services we offer.

Visit for latest security news in English
Besuchen Sie für IT Sicherheits News auf Deutsch

About the Author

Sorin Mustaca
Sorin Mustaca, (ISC)2 CSSLP, CompTIA Security+ and Project+, is working since over 20 years in the IT Security industry and worked between 2003-2014 for Avira as Product Manager for the known products used by over 100 million users world-wide. Today he is CEO and owner of Endpoint Cybersecurity GmbH focusing on Cybersecurity, secure software development and security for IoT and Automotive. He is also running his personal blog Sorin Mustaca on Cybersecurity and is the author of the free eBook Improve your security .

Comments are closed.

%d bloggers like this: