Notices


Reply
Thread Tools
Posts: 5 | Thanked: 2 times | Joined on Jan 2011
#1
Shairport basically emulates an apple airport, so it would allow me to plug my phone into some speakers and play my iTunes library through my n900.

Here are the reqs:
Code:
You need the following installed:
  openssl
  libao
  avahi (avahi-daemon running and avahi-publish-service on path)
  Perl

Debian/Ubuntu users need:
  libssl-dev libcrypt-openssl-rsa-perl libao2 libao-dev2 libio-socket-inet6-perl libwww-perl avahi-utils

Perl modules (install from CPAN if needed):
  HTTP::Message
  Crypt::OpenSSL::RSA
  IO::Socket::INET6
Is this feasible?
 

The Following User Says Thank You to distortedvoice For This Useful Post:
Posts: 79 | Thanked: 20 times | Joined on Apr 2010
#2
I would also be interested in getting this running. I already have it running on an Ubuntu Server, where I had to and could substitute some of the packages with others.

Maemo seems to be missing too many, or I am not competent enough to know which would be suitable replacements.

Distortedvoice, could you please just try and install the above packages and report which ones are missing? Then we could see if there is someone kind enough to suggest suitable alternatives.
 
Posts: 5 | Thanked: 2 times | Joined on Jan 2011
#3
I installed all the reqs.

apt-get install openssl
apt-get install libao0
apt-get install perl (it also installed perl-modules)
apt-get install avahi-daemon


I ran the following to try and get the modules for perl.

Code:
perl -MCPAN -e 'install Crypt::OpenSSL::RSA'
perl -MCPAN -e 'install HTTP::Message'
perl -MCPAN -e 'install IO::Socket::INET6'
got some sketchy output.

Here's my output of running 'perl shairport.pl'

Code:
perl shairport.pl 
Can't locate HTTP/Request.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.3 /usr/local/share/perl/5.8.3 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at shairport.pl line 42.
BEGIN failed--compilation aborted at shairport.pl line 42.
I did compile the hairtunes file on my x64 desktop. I think it was compiled in C. I will setup scratchbox tomorrow and compile for arm. (unless someone wants to quickly compile it for me in their cross-compile environment)
 

The Following User Says Thank You to distortedvoice For This Useful Post:
Posts: 882 | Thanked: 1,310 times | Joined on Mar 2007
#4
Managed to get this running on my N810 so if anyone wants to turn their old nit to airplay speakers (or connect to stereo), I could create a simple package for this.
 

The Following 4 Users Say Thank You to ukki For This Useful Post:
Posts: 79 | Thanked: 20 times | Joined on Apr 2010
#5
Definitely interested in a package that would install on N900 as well, or enough pieces so that I can create the package.
 
Posts: 882 | Thanked: 1,310 times | Joined on Mar 2007
#6
I'll try to release a script that starts/stops shairport on N810 via terminal and will test N900 too. If it works ok and there's interest, I could probably create a simple gui app for both of them.

770 lacks ipv6 support, but if I manage to flash the kernel and its libs aren't too old (and cpu/wlan can handle the load), maybe it's a possibility too.

EDIT: Managed to build it for 770, but it segfaults on "Floating point error" and debugging didn't get me anywhere

Last edited by ukki; 2012-05-25 at 13:41.
 
Posts: 79 | Thanked: 20 times | Joined on Apr 2010
#7
If I can remember how to make it run as a daemon, script would be more than sufficient for my purposes.

Have you tried extended play on the n810? I never could make it play for a longer time without random breaks on the Ubuntu box.
 
Posts: 882 | Thanked: 1,310 times | Joined on Mar 2007
#8
Originally Posted by mikaelh View Post
If I can remember how to make it run as a daemon, script would be more than sufficient for my purposes.

Have you tried extended play on the n810? I never could make it play for a longer time without random breaks on the Ubuntu box.
Same binary worked on N900. Made rude scripts for n8x0/n900 that start/stop it and install missing dependencies on first run. I may have missed something since both of my installs are from several years back and I've installed a lot of stuff. Script uses killall so if you use avahi-publish-service for anything else, you may need to fix it (or just run the binary).

Script must be run as root (shairport runs as normal user) and N900 version doesn't really need root rights if everything needed is installed.

I guess the C version is unfinished and buggy since it's totally ignored by docs, but I didn't notice any bad issues with it yet. You can't set a password though.

Code:
tar xvzf shairport_nxxx.tar.gz
root
cd /path/to/shairport_xxxxxxx
./airplay.sh start|stop
And as always, you shouldn't download random stuff from a random forum, especially if it requires root rights.

EDIT: I've attached another binary (shairport.gz) for those who need to run a command on client connect/disconnect (for example to power on/off amplifier/speakers). Just gunzip shairport.gz and replace the shairport binary in bin-directory. It's not working on daemon mode so you need to start it in the background with & without using -d. Those who don't need such a feature don't need to download shairport.gz.
Attached Files
File Type: gz shairport_n900.tar.gz (28.3 KB, 147 views)
File Type: gz shairport_n8x0.tar.gz (41.1 KB, 120 views)
File Type: gz shairport.gz (28.2 KB, 106 views)

Last edited by ukki; 2012-05-27 at 15:58.
 

The Following User Says Thank You to ukki For This Useful Post:
Posts: 79 | Thanked: 20 times | Joined on Apr 2010
#9
Almost... But I can't seem to find libao to install. Any hints on the repository? I have all the different "extras" activated.
 
Posts: 882 | Thanked: 1,310 times | Joined on Mar 2007
#10
Hmm, it should be in extras for N900.

http://maemo.org/packages/view/libao0/
http://repository.maemo.org/extras/p...emo2_armel.deb

Couldn't find a package for diablo in extras so I grabbed one for earlier (chinook) and bundled it in the tarball.
 

The Following User Says Thank You to ukki For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 07:29.