Raspberry Pi AirPlay
Version fra 12. dec 2013, 18:06 af Frank D (diskussion | bidrag) Frank D (diskussion | bidrag) (Tag changed from code to pre)
Indholdsfortegnelse
Installér Rasbian "wheezy"
Følg instruktionerne på fra den officielle hjemmeside. Herefter indsættes SD kortet og netkabel.
Første opstart og login
Start putty og login.
Login: pi
Password: raspberry
Konfigurér Rasbian:
pi@raspberrypi:~$ sudo raspi-config
Følgende sættes:
- Expand root partition.
- Ændrer password.
- Locale.
- Timezone
Få root adgang
Root er deaktiveret men der opnåes root adgang med sudo .
pi@raspberrypi:~$ sudo su root@raspberrypi:/home/pi# cd root@raspberrypi:~#
Opgrader Debian
De installerede pakker opdateres til nyeste udgave.
root@raspberrypi:~# aptitude update root@raspberrypi:~# aptitude upgrade
Sæt audio output
Tving audio ud på jackstikket.
root@raspberrypi:~# amixer cset numid=3 1
Før installationen installeres nødvendige pakker.
root@raspberrypi:~# aptitude install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils
Download git source og compile den.
root@raspberrypi:~# git clone https://github.com/albertz/shairport.git shairport root@raspberrypi:~# cd shairport root@raspberrypi:~/shairport# make
root@raspberrypi:~/shairport# ./shairport.pl -a AirPi
Hvis dette melder fejl køres følgende:
sudo cpan install Net::SDP
Nu skulle AirPi gerne være synligt fra et I-Device.
Automatisk opstart
Procedure for automatisk opstart:
root@raspberrypi:~/shairport# make install root@raspberrypi:~/shairport# cp shairport.init.sample /etc/init.d/shairport root@raspberrypi:~/shairport# cd /etc/init.d root@raspberrypi:/etc/init.d# chmod a+x shairport root@raspberrypi:/etc/init.d# update-rc.d shairport defaults
AP navnet ændres:
root@raspberrypi:/etc/init.d# nano shairport
DEAMON_ARGS ændres:
<source lang="perl"> DAEMON_ARGS="-w $PIDFILE -a AirPi"
AirPi kan ændres til hvad som helst.
Start service
root@raspberrypi:/etc/init.d# ./shairport start
For bedre lyd kan der installeres et USB lydkort.