trouch
Posts: 310
Joined: Fri Aug 03, 2012 7:24 pm
Location: France
Contact: Website

AirPi - AirPlay audio with Raspberry

Sat Aug 04, 2012 3:13 pm

Hi guys,
I wrote an article on how to make an AirPlay audio player using a RaspberryPi without display, keyboard or mouse plugged in.
I hope it will help some users ;)
http://trouch.com/2012/08/03/airpi-airp ... raspberry/

WebIOPi - Raspberry Pi REST Framework to control your Pi from the web
http://store.raspberrypi.com/projects/webiopi
http://code.google.com/p/webiopi/
http://trouch.com

trouch
Posts: 310
Joined: Fri Aug 03, 2012 7:24 pm
Location: France
Contact: Website

Re: AirPi - AirPlay audio with Raspberry

Mon Aug 06, 2012 3:54 pm

I'd like to edit my initial post to precise this is a tutorial, but I can't do it :(

WebIOPi - Raspberry Pi REST Framework to control your Pi from the web
http://store.raspberrypi.com/projects/webiopi
http://code.google.com/p/webiopi/
http://trouch.com

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: AirPi - AirPlay audio with Raspberry

Tue Aug 07, 2012 6:37 am

You can only edit posts within 30 minutes of posting :o
....but a MOD may do it for you ;)
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: AirPi - AirPlay audio with Raspberry

Tue Aug 07, 2012 6:41 am

What I,d like to see, and I,m sure many others judging by the number of people asking about it, is airplay with audio working with openELEC and/or raspbmc ;)

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

trouch
Posts: 310
Joined: Fri Aug 03, 2012 7:24 pm
Location: France
Contact: Website

Re: AirPi - AirPlay audio with Raspberry

Tue Aug 07, 2012 8:14 am

I know AirPlay is fully integrated in RaspBMC and openELEC, but they both require a dedicated distrib and configuration with many features that can be useless for some users.
With AirPi (and shairport), you have a simple way to setup AirPlay audio on the official distrib, without pluging any display/keyboard/mouse

WebIOPi - Raspberry Pi REST Framework to control your Pi from the web
http://store.raspberrypi.com/projects/webiopi
http://code.google.com/p/webiopi/
http://trouch.com

Tavalin
Posts: 59
Joined: Mon Apr 16, 2012 9:53 pm

Re: AirPi - AirPlay audio with Raspberry

Tue Aug 07, 2012 8:47 am

AirPlay (video with audio works) in OpenElec/ (I'm guessing) Raspbmc / XBMC for Raspbian/Debian) but AirTunes (audio only) doesn't seem to work. I've heard this is related to ALSA not working properly in some distros.

adecold
Posts: 2
Joined: Mon Aug 06, 2012 2:58 pm

Re: AirPi - AirPlay audio with Raspberry

Sat Aug 25, 2012 10:09 pm

Thanks for the post. Exactly what i was looking for

regi24
Posts: 5
Joined: Thu Dec 20, 2012 8:24 pm

Re: AirPi - AirPlay audio with Raspberry

Thu Dec 20, 2012 8:27 pm

Thanks for the post.

I am looking for having AirPi installed together with Raspbmc. Is that possible?

Thanks again.

racer993
Posts: 60
Joined: Mon Feb 18, 2013 7:27 pm

Re: AirPi - AirPlay audio with Raspberry

Mon Feb 18, 2013 7:45 pm

hi,

after tinkering a couple of hours, I've got the AirPi working with my Logilink UA0053 USB soundcard. It works very well! For everyone that wants to save the time, I've created an image for a 4GB SD card.

The image is based on Wheezy and configured so that it has:
- SSH enabled
- User = pi
- Password = raspberry
- locale = en_US.UTF8
- timezone = Europe.Berlin

It has auto login for user pi enabled
It is configured to use the USB audio Logilink UA0053 soundcard http://www.logilink.eu/showproduct/UA0053.htm
It's broadcast name is AirPi

Write the image to an 4GB SD card with Win32DiskImager.

Plug it into the raspberry and hook the raspberry up to your network and Logilink UA0053 soundcard and soundsystem. It'll work like a charm on iOS 6.

Enjoy!

The files can be found in my public Dropbox.

https://www.dropbox.com/sh/cjrcfw49sfc7h8b/SQSjpp8DJG

racer993
Posts: 60
Joined: Mon Feb 18, 2013 7:27 pm

Re: AirPi - AirPlay audio with Raspberry

Fri Feb 22, 2013 8:00 pm

The broadcast name of the Raspberry AirPi can easily by changed, at the command prompt type:

nano /etc/init.d/shairport

look for the following line

DAEMON_ARGS="-w $PIDFILE -a AirPi"

and change AirPi in what ever you like.

ctrl-x and Y to save changes

sudo reboot

ready!

CoolFX
Posts: 2
Joined: Wed Feb 27, 2013 10:37 pm

Re: AirPi - AirPlay audio with Raspberry

Wed Feb 27, 2013 10:43 pm

Thanks for the link. Its a time saver.
Can i use the standard audio output with it?
Do i have to change something to use it?
Why do you use external sound card? Does it work better than the standard output?
If so, do you recommend this sound card for a great audio experience?

Sorry for all this questions.
Thanks for your help.

racer993
Posts: 60
Joined: Mon Feb 18, 2013 7:27 pm

Re: AirPi - AirPlay audio with Raspberry

Sat Mar 02, 2013 10:38 pm

Hi CoolFX,

It is possible to make it work with the onboard audio line out, I edited the following file:

sudo nano /etc/asound.conf

to make the USB sound work I made it look like this.

# pcm.mmap0 {
# type mmap_emul;
# slave {
# pcm "hw:0,0";
# }
# }

# pcm.!default {
# type plug;
# slave {
# pcm mmap0;
# }
# }

pcm.!default {
type hw
card 1
device 0
}

If you want to use the onboard sound jack you have to alter it to its original settings which looks like:

pcm.mmap0 {
type mmap_emul;
slave {
pcm "hw:0,0";
}
}

pcm.!default {
type plug;
slave {
pcm mmap0;
}
}

# pcm.!default {
# type hw
# card 1
# device 0
# }

ctrl - x and Y to save

sudo reboot

and ready!

I use the USB sound, because it should give better sound than the onboard connector.

CoolFX
Posts: 2
Joined: Wed Feb 27, 2013 10:37 pm

Re: AirPi - AirPlay audio with Raspberry

Sun Mar 03, 2013 12:57 am

Thanks!! I will try this!
I am trying to have airplay on my car. Maybe this wil work. ;)


ITz Life NL
Posts: 27
Joined: Fri Jul 20, 2012 5:02 pm

Re: AirPi - AirPlay audio with Raspberry

Sun Mar 17, 2013 6:59 pm

i got this problem when trying to start and it took over 2 hours to setup
shairport.pl -a Airpi
Can't locate Crypt/OpenSSL/RSA.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/local/bin/shairport.pl line 44.
BEGIN failed--compilation aborted at /usr/local/bin/shairport.pl line 44.

ReTechNL
Posts: 2
Joined: Tue Nov 20, 2012 6:41 pm

Re: AirPi - AirPlay audio with Raspberry

Wed Mar 20, 2013 4:39 pm

Is it possible to use Airpi with a Bluetooth 4.x dongle without network?
Becaus since the new Airplay version you can use Airplay over bluetooth 4 and i want to use the raspberry pi in a environment where no network is available and it is all gonna run on a battery wich will power the pi, TA2024 amplifier and speakers.
Something simular to this:
Image

giggity4242
Posts: 1
Joined: Sat Mar 23, 2013 12:51 am

Re: AirPi - AirPlay audio with Raspberry

Sat Mar 23, 2013 1:16 am

Hi racer993,

I have followed every direction up to step 4 to a T (I don't have a USB sound card, just using the default jack) and my iPhone 4S can't see the airplay device.

When I start AirPi with ./shairport.pl -a Airpi my pi says "Established under name '[email protected]'" and starts without errors. However, I can't see it on my phone. My RPi is using the latest Wheezy distro and my iPhone has iOS 6. My RPi is connected to my network via ethernet. Any ideas of why my phone can't see it?

racer993
Posts: 60
Joined: Mon Feb 18, 2013 7:27 pm

Re: AirPi - AirPlay audio with Raspberry

Tue Mar 26, 2013 7:15 pm

No, not sure. Please note that I also put an image in my public dropbox that uses the onboard 3,5mm sound jack.

https://www.dropbox.com/sh/cjrcfw49sfc7h8b/SQSjpp8DJG

(And it includes webiopi running as a background service as well as a bonus)

racer993
Posts: 60
Joined: Mon Feb 18, 2013 7:27 pm

Re: AirPi - AirPlay audio with Raspberry

Tue Mar 26, 2013 7:23 pm

You can reach the webiopi interface at poort 8000

E.g. 192.168.1.3:8000. Where the IP address is the address of the raspberry pi.

The webiopi user for logging on to the webiopi website is:

User: webiopi
Password: raspberry

(Both standard settings for webiopi)

I also started a blog: http://raspberrypi4dummies.wordpress.com/ where I'll post the solutions that worked for me.

Return to “Media centres”