Page 1 of 1

AirPi - AirPlay audio with Raspberry

Posted: Sat Aug 04, 2012 3:13 pm
by trouch
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/

Re: AirPi - AirPlay audio with Raspberry

Posted: Mon Aug 06, 2012 3:54 pm
by trouch
I'd like to edit my initial post to precise this is a tutorial, but I can't do it :(

Re: AirPi - AirPlay audio with Raspberry

Posted: Tue Aug 07, 2012 6:37 am
by texy
You can only edit posts within 30 minutes of posting :o
....but a MOD may do it for you ;)
Texy

Re: AirPi - AirPlay audio with Raspberry

Posted: Tue Aug 07, 2012 6:41 am
by texy
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

Re: AirPi - AirPlay audio with Raspberry

Posted: Tue Aug 07, 2012 8:14 am
by trouch
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

Re: AirPi - AirPlay audio with Raspberry

Posted: Tue Aug 07, 2012 8:47 am
by Tavalin
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.

Re: AirPi - AirPlay audio with Raspberry

Posted: Sat Aug 25, 2012 10:09 pm
by adecold
Thanks for the post. Exactly what i was looking for

Re: AirPi - AirPlay audio with Raspberry

Posted: Thu Dec 20, 2012 8:27 pm
by regi24
Thanks for the post.

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

Thanks again.

Re: AirPi - AirPlay audio with Raspberry

Posted: Mon Feb 18, 2013 7:45 pm
by racer993
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

Re: AirPi - AirPlay audio with Raspberry

Posted: Fri Feb 22, 2013 8:00 pm
by racer993
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!

Re: AirPi - AirPlay audio with Raspberry

Posted: Wed Feb 27, 2013 10:43 pm
by CoolFX
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.

Re: AirPi - AirPlay audio with Raspberry

Posted: Sat Mar 02, 2013 10:38 pm
by racer993
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.

Re: AirPi - AirPlay audio with Raspberry

Posted: Sun Mar 03, 2013 12:57 am
by CoolFX
Thanks!! I will try this!
I am trying to have airplay on my car. Maybe this wil work. ;)

Re: AirPi - AirPlay audio with Raspberry

Posted: Sun Mar 17, 2013 3:53 pm
by racer993

Re: AirPi - AirPlay audio with Raspberry

Posted: Sun Mar 17, 2013 6:59 pm
by ITz Life NL
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.

Re: AirPi - AirPlay audio with Raspberry

Posted: Wed Mar 20, 2013 4:39 pm
by ReTechNL
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

Re: AirPi - AirPlay audio with Raspberry

Posted: Sat Mar 23, 2013 1:16 am
by giggity4242
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?

Re: AirPi - AirPlay audio with Raspberry

Posted: Tue Mar 26, 2013 7:15 pm
by racer993
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)

Re: AirPi - AirPlay audio with Raspberry

Posted: Tue Mar 26, 2013 7:23 pm
by racer993
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.