PDA

View Full Version : Announce: ShairTunes Plugin



Pages : [1] 2

DSTMK
2013-11-17, 09:12
Hi,

I have created a plugin that integrates ShairTunes into LMS.

https://github.com/DSTMK/shairport_helper
https://github.com/DSTMK/shairport_plugin

You will need to build and install the shiarport_helper first and then install the plugin.

The plugin will announce an AirPlay target for each player. The player will automatically switch to AirPlay as soon as a client connects to the AirPlay target. The helper will take the audio data from the AirPlay client and convert it into a PCM stream that a squeezebox can play. Also, the Plugin will forward the volume control.

Please consider this as beta and use at your own risk. Comments and contributions are welcome.

Regards,

DSTMK

erland
2013-11-17, 10:18
I have created a plugin that integrates ShairTunes into LMS.

Sounds great!



You will need to build and install the shiarport_helper first and then install the plugin.

Is there a reason you don't want to build and distribute binaries for the mostly used platforms with the plugin ?
Kind of similar to what Triode does in the Spotify plugin and its helper daemon.

It feels like this would make it a lot easier for people who want to try it and doesn't have the skills to do the compilation. An alternative to bundling it with the plugin could maybe be to build binaries for mostly used platforms and offer them as separate downloads so people at least doesn't have to to the compilation themselves.

mherger
2013-11-17, 10:29
This sounds like something I wanted to do for a long time! Excellent!

Will have to give this a try asap. But just from looking at the code I fear installation will be a bit involved, as it has some dependencies Joe Doe will have a hard time to satisfy...

DSTMK
2013-11-17, 14:58
Thank you for your comments. I do not have much expirience with neither Squeezebox Plugin Programming nor Perl and since you two seem to have quite some reputation in those fields, this is very helpful.

Bundling binaries seems to be a good idea, but I can only build them for Linux x86 and Linux x64. I have never used any other platform as Squeezebox Server. I can see that in Triode's plugin there is an arm binary (probably for all the NAS boxes). Do you have a list of architectures that I should consider? There is probably Windows and maybe even MIPS???

You will probably need to install the avahi daemon and then some perl modules:

IO::Socket::INET6
Crypt::OpenSSL::RSA
Net::SDP

Is there a way to package those modules with my plugin? It looks like there is already lots of perl library stuff bundled with the Squeezebox Server in it's CPAN directory...

Let me know if you have trouble compiling.

And one more question: Is there a better way to flush a Client's audio buffer than stopping it and then having it reconnect to the source? I'd need to do the flush as fast as possible to get good results when the user is changing songs at the AirPlay client.

Regards,

DSTMK

erland
2013-11-18, 13:26
Thank you for your comments. I do not have much expirience with neither Squeezebox Plugin Programming nor Perl and since you two seem to have quite some reputation in those fields, this is very helpful.

Bundling binaries seems to be a good idea, but I can only build them for Linux x86 and Linux x64. I have never used any other platform as Squeezebox Server. I can see that in Triode's plugin there is an arm binary (probably for all the NAS boxes). Do you have a list of architectures that I should consider? There is probably Windows and maybe even MIPS???

I think Triode is buildig the following Linux versions for Spotify plugin:
- Linux arm5te soft float (for example SheevaPlug)
- Linux arm6 hard float (for example Raspberry Pi, Wandboard)
- Linux Intel 32 bit
- Linux Intel 64 bit

If OSX and Windows is supported, additional binaries for these operating systems might make sense also.

However, if the helper daemon is reasonably stable and doesn't have to be rebuilt very often, it might be worth to consider just distributing Intel Linux binaries to start with and let other developers provide the others if you can't easily build them yourself.



You will probably need to install the avahi daemon and then some perl modules:

IO::Socket::INET6
Crypt::OpenSSL::RSA
Net::SDP

Is there a way to package those modules with my plugin? It looks like there is already lots of perl library stuff bundled with the Squeezebox Server in it's CPAN directory...

You can put additional modules in the "lib" subdirectory under the plugin, for example as ShairTunes/lib/IO/Socket/INET6.pm

Triode
2013-11-18, 14:10
I think Triode is buildig the following Linux versions for Spotify plugin:
- Linux arm5te soft float (for example SheevaPlug)
- Linux arm6 hard float (for example Raspberry Pi, Wandboard)
- Linux Intel 32 bit
- Linux Intel 64 bit

I build far to many versions.. but this is a good set for linux. I would then add osx and windows (though I think your code may need some windows specifics for that..)



IO::Socket::INET6
Crypt::OpenSSL::RSA
Net::SDP

Not sure you really need IPv6?
Also is it possible to port to pure perl versions of RSA (e.g. Crypt::RSA) - I've not looked at the code enough to see. [Edit - looks like Crypt:RSA has dependencies too - perhaps OpenSSL is the best way, but will mean binaries too.]
I think Net::SDP is pure perl so just needs you to include in the lib directory?

epoch1970
2013-11-23, 08:05
Does this require a waveinput configuration ?
With some difficulty I got the plugin to advertise my players, receive a stream request from iTunes on a mac, but then the server crashes.
This is about how far it went.

[13-11-23 15:57:40.1771] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Safranier
[13-11-23 15:58:14.0798] Plugins::ShairTunes::Plugin::handleSocketConnect (151) New connection from::ffff:172.17.255.40
[13-11-23 15:58:14.0824] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
[13-11-23 15:58:14.0878] Plugins::ShairTunes::Plugin::conn_handle_data (199) REQ: OPTIONS
[13-11-23 15:58:14.3003] Plugins::ShairTunes::Plugin::conn_handle_request (388) RTSP/1.0 200 OK
Apple-Response: RxjT2FvxNIsL5cvD3jL+7gxD4QgAypk3cq4q1rZ55ZS6T6RpSW nhO9OKVcXBnvKO2z9FK15rV/vr/+fvvccXUmDupz5LogNTClwXkPbwGpMp6AWfrh4edy2X3wm13JT RG2B4VB5EMdKYN8CVogdHEfAlPJg3Cn9dU7tEQGtVC/tgofI74Y3q+aT4wsti15TwtVLwbszS6R94PrsgvBVe0503nO1m Jsz5MUTfSbn1qXEvGw6E5rRNMi5AKb3CGOsGxBHeS1d6HGZSsR bPLfTSf8i6ylS4cKimTrl+3NJI5Tqrd9bmLFaPAad30e3Przp+ Kh53AWQm0yE/M+GYEFcEEA
Audio-Jack-Status: connected; type=analog
CSeq: 1
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[13-11-23 15:58:14.3046] Plugins::ShairTunes::Plugin::handleSocketRead (165) Closed: IO::Socket::INET6=GLOB(0xcd8b660)
[13-11-23 15:59:30.4596] Plugins::ShairTunes::Plugin::handleSocketConnect (151) New connection from::ffff:172.17.255.40
[13-11-23 15:59:30.4622] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
[13-11-23 15:59:30.4701] Plugins::ShairTunes::Plugin::conn_handle_data (199) REQ: ANNOUNCE
[13-11-23 15:59:30.4728] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
[13-11-23 15:59:30.6587] Plugins::ShairTunes::Plugin::conn_handle_request (388) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 1

[13-11-23 15:59:30.6624] Plugins::ShairTunes::Plugin::conn_handle_data (182) handle data 1
[13-11-23 15:59:30.6664] Plugins::ShairTunes::Plugin::conn_handle_data (199) REQ: SETUP
[13-11-23 15:59:30.6702] Plugins::ShairTunes::Plugin::conn_handle_request (316) decode command: "hairtunes" tport '6002' iv '14615bc01e5dddf706de2f403537a032' pipe '/tmp/pipe' cport '6001' fmtp '96 352 0 16 40 10 14 2 255 0 0 44100' dport '6002' key 'fae94adcf20d35c7595d27cca6f89edd'

Nikhil
2013-12-16, 18:56
Has anyone got this plugin to work on a MacOS SqueezeBox Server?

disaster123
2013-12-21, 23:13
this one sounds really great! Anybody an idea how to compile on windows? Sadly DMSDK wasn't here since nov 2013 - so another good project dying before it was alive ? ;-(

woodster
2014-01-13, 23:13
Hi There,

are there any that succesfully has gotten this plugin to work - it is causing me some headache.

I'm running Ubuntu 13.10 and LMS 7.8 but can't get it to work.

I have done the following:
- installed packages: sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
- Copied the plugin to the plugin folder. It seems to be running under the "LMS settings - plugins"
- Extracted the helper to my desktopfolder, run "make", "make install"
- Restarted my LMS with "sudo service logitechmediaserver restart"

What's missing, or how do I debug this?
Thanks.
Martin

woodster
2014-01-14, 07:01
No one ?

Martin

epoch1970
2014-01-18, 06:14
What did you do after the "playerSubscriptionChange (65) request=client new client=Safranier" to get the "handleSocketConnect (151) New connection from::ffff:172.17.255.40" working.... This doesn't work for me.

I think the plugin could be cool to get working.
The only thing I did was making sure all perl dependencies were ok. I also had to remember how to manually install a plugin, but this is just my age showing, there...
Once avahi and SBS were restarted I could see all my SB players as Airplay targets (pic: iTunes showing 5 SB3s among other devices).
15498
The only thing is, the server crashes when I want to play. But the server I am using is SBS 7.6.2, the hardware is an embedded linux pc with an usb audio card used to speak the system status since it is headless... Hardly a standard setup but I am too lazy and not interested enough to start investigating the issue myself.

I suspect the trouble is with my setup. It would be nice to get feedback from others, I am afraid my report has tainted the plugin's debut :(

thouky
2014-01-18, 09:56
I have tried on several occasions to get shairtunes working with my Squeezeboxes but without success. Today I made some progress with this plugin, but it is still not able to stream music.

The first problem was with a missing function for IPv6 support, resulting in "Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Undefined subroutine &Plugins::ShairTunes::Plugin::ip6bin called". This was fixed by disabling avahi's IPv6 support in /etc/avahi/avahi-daemon.conf:

use-ipv6=no
publish-aaaa-on-ipv4=no
publish-a-on-ipv6=no

The second problem was that restarting the Logitech Media Server left the previous avahi service registrations, so the plugin was not seeing connection attempts. Those were flushed using:

sudo /etc/init.d/logitechmediaserver stop
sudo restart avahi-daemon
sudo /etc/init.d/logitechmediaserver start

The third problem was that the hairtunes executable wasn't correctly installed, resulting in a rather cryptic "Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got". Trying to run it from a shell prompt resulted in "hairtunes: error while loading shared libraries: libao.so.2: cannot open shared object file: No such file or directory". This was fixed by reinstalling:

cd /usr/local/src/shairport-0.05
sudo make install

(There is a more recent 1.x release of shairport, but that does not include the hairtunes executable.)

Following this attempting to stream some music from an iPad via AirPlay results in the following log entry, without any errors:

[14-01-18 16:32:45.2819] Plugins::ShairTunes::Plugin::handleSocketConnect (168) New connection from::ffff:192.168.0.25

and a process listing on the server shows that the plugin has launched hairtunes:

107 11660 0.0 0.0 11036 1420 ? S 16:30 0:00 /bin/bash /usr/sbin/squeezeboxserver_safe /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset=utf8
107 11662 10.9 4.4 316528 179520 ? S 16:30 0:22 \_ /usr/bin/perl /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset=utf8 --norestart
107 11832 0.0 0.0 18728 1192 ? S 16:30 0:00 \_ avahi-publish-service C4D1E675E69E@Lounge _raop._tcp 34045 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1
107 11833 0.0 0.0 18728 1196 ? S 16:30 0:00 \_ avahi-publish-service 33FA00A66F2E@Kitchen _raop._tcp 40985 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1
107 11834 0.0 0.0 18728 1192 ? S 16:30 0:00 \_ avahi-publish-service DF814135652A@Office _raop._tcp 50520 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1
107 11835 0.0 0.0 18728 1192 ? S 16:30 0:00 \_ avahi-publish-service ADB831A7FDD8@Guest _raop._tcp 45782 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1
107 11836 0.0 0.0 18728 1196 ? S 16:30 0:00 \_ avahi-publish-service 4840D2555BD5@Bedroom _raop._tcp 37745 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1
107 11841 0.0 0.0 4404 608 ? S 16:32 0:00 \_ sh -c "hairtunes" tport '55413' iv '7f6acc142ac60156b52fa520f623fd9c' pipe '/tmp/pipe' cport '54508' fmtp '96 352 0 16 40 10 14 2 255 0 0 44100' dport '55413' key '14ab8090e57c73347195d90e389621fd'
107 11842 0.0 0.0 102376 2084 ? Sl 16:32 0:00 \_ hairtunes tport 55413 iv 7f6acc142ac60156b52fa520f623fd9c pipe /tmp/pipe cport 54508 fmtp 96 352 0 16 40 10 14 2 255 0 0 44100 dport 55413 key 14ab8090e57c73347195d90e389621fd


However, nothing is played by the Squeezebox and the iPad reverts back to disabling AirPlay a few seconds later.

Any ideas for what to try next?

StuartUSA
2014-01-22, 06:42
The third problem was that the hairtunes executable wasn't correctly installed...

Haven't got mine working yet but I don't think you have to install shairport to get hairtunes, it seems to me that the helper application *is* hairtunes, but the plugin calls hairtunes and not "shairtunes_helper", line 33 in Plugin.pm.

I tried running your command line above:



hairtunes tport 55413 iv 7f6acc142ac60156b52fa520f623fd9c pipe /tmp/pipe cport 54508 fmtp 96 352 0 16 40 10 14 2 255 0 0 44100 dport 55413 key 14ab8090e57c73347195d90e389621fd




And got the error: FATAL: only 16-bit samples supported! I get this when running either the hairtunes executable from shairport-0.05 or from the shairport_helper. Does that help you? Haven't figured it out yet myself, or if I have the same problem yet...

thouky
2014-01-23, 13:13
Haven't got mine working yet but I don't think you have to install shairport to get hairtunes, it seems to me that the helper application *is* hairtunes, but the plugin calls hairtunes and not "shairtunes_helper", line 33 in Plugin.pm.

Modifying the Plugin.pm file as you suggest gets things a little bit closer to working:

my $hairtunes_cli = "shairport_helper";

Now when I start to play something via AirTunes the iPad seems happy and the LMS log file shows:

[14-01-23 19:55:53.3811] Plugins::ShairTunes::Plugin::handleSocketConnect (172) New connection from::ffff:192.168.0.25
[14-01-23 19:55:53.5230] Plugins::ShairTunes::Plugin::conn_handle_request (357) launched decoder: 15138 on ports: 6000/6001/8000

The LMS web interface shows that the server thinks it is playing something:
15506

A process listing shows shairport_helper consuming around 2.6% of a CPU (roughly half that of the squeezeboxserver process itself):

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
107 13742 0.0 0.0 11036 1424 ? S 19:54 0:00 /bin/bash /usr/sbin/squeezeboxserver_safe /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/
107 13744 6.4 4.7 328272 190944 ? S 19:54 0:37 \_ /usr/bin/perl /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cach
107 14116 0.0 0.0 18728 1196 ? S 19:55 0:00 \_ avahi-publish-service C4D1E675E69E@Lounge _raop._tcp 50712 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100
107 14117 0.0 0.0 18728 1196 ? S 19:55 0:00 \_ avahi-publish-service DF814135652A@Office _raop._tcp 60223 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100
107 14118 0.0 0.0 18728 1192 ? S 19:55 0:00 \_ avahi-publish-service 33FA00A66F2E@Kitchen _raop._tcp 46946 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=4410
107 14119 0.0 0.0 18728 1192 ? S 19:55 0:00 \_ avahi-publish-service 4840D2555BD5@Bedroom _raop._tcp 35208 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=4410
107 14120 0.0 0.0 18728 1192 ? S 19:55 0:00 \_ avahi-publish-service ADB831A7FDD8@Guest _raop._tcp 39060 tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100
107 15138 0.0 0.0 4404 608 ? S 19:55 0:00 \_ sh -c "shairport_helper" tport '52723' iv 'f539de96acc9b1652bf0e6d2dcedd47b' pipe '/tmp/pipe' cport '65482' fmtp '96 352 0
107 15139 2.6 0.0 100312 2060 ? Sl 19:55 0:13 \_ shairport_helper tport 52723 iv f539de96acc9b1652bf0e6d2dcedd47b pipe /tmp/pipe cport 65482 fmtp 96 352 0 16 40 10 14

Unfortunately, despite all of these positive signs, the Squeezeboxes themselves claim to be still playing whatever was selected previously and do not make any sound...

StuartUSA
2014-01-24, 03:23
Managed to get it working. Here are the steps I followed, some packages may not be necessary but haven't figured out the essentials yet. Will try it on another server.



> cpan HTTP::Request HTTP::Message Crypt::OpenSSL::RSA IO::Socket::INET6 Net::SDP
> apt-get install build-essential libssl-dev libcrypt-openssl-rsa-perl libao-dev libio-socket-inet6-perl libwww-perl avahi-utils pkg-config
> git clone https://github.com/DSTMK/shairport_helper
> git clone https://github.com/DSTMK/shairport_plugin
> cd shairport_helper/
> make
> cp shairport_helper /usr/local/bin/

Then edit the Plugin.pm and change line 33 from "hairtunes" to "shairtunes_helper" and install the plugin.

Hope that helps...

StuartUSA
2014-01-24, 16:39
After installing and playing around with the plugin I noticed it didn't handle disconnects and reconnects, so I have made some changes to support this. It may well have been implemented crudely but I had a go.

Anyway I have forked DSTMK's repo and made the updates as well as adding a Squeezebox Plugin repo, have also created a ReadMe in the repo with the install instructions from above. Perhaps I will try and figure out all the dependancies and include them at some point.

The repo is at https://github.com/StuartUSA/shairport_plugin

woodster
2014-01-25, 00:00
Will definitely give this repo a try later.

So far I haven't got it working on Ubuntu 13.10 and LMS 7.8.
The plugin initializes but no airplay target is visible on my ios7 iPhone. According to avahi-discover a service should be running.

Saw somewhere ipv6 had to be disabled for avahi for it to work, any of you doing this?

Martin


After installing and playing around with the plugin I noticed it didn't handle disconnects and reconnects, so I have made some changes to support this. It may well have been implemented crudely but I had a go.

Anyway I have forked DSTMK's repo and made the updates as well as adding a Squeezebox Plugin repo, have also created a ReadMe in the repo with the install instructions from above. Perhaps I will try and figure out all the dependancies and include them at some point.

The repo is at https://github.com/StuartUSA/shairport_plugin

woodster
2014-01-25, 03:53
Tried the repo, but still the same. The plugin initializes and discovers my squeezebox, but no airplay target.

The log doesn't show any "handleSocketConnect (151) New connection" either.

What Linux distro and LMS version are you using? Could it be related to user rights?

StuartUSA
2014-01-25, 04:43
Am using Ubuntu 10.04.4 and LMS 7.7.3.

My avahi.conf settings:




[server]
use-ipv4=yes
use-ipv6=no

[wide-area]
enable-wide-area=yes

[publish]
publish-aaaa-on-ipv4=no
publish-a-on-ipv6=no

[reflector]

[rlimits]
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=300
rlimit-stack=4194304
rlimit-nproc=3


My LMS is running as a non-priviledge user so don't thiink its a user rights issue.


Tried the repo, but still the same. The plugin initializes and discovers my squeezebox, but no airplay target.

The log doesn't show any "handleSocketConnect (151) New connection" either.

What Linux distro and LMS version are you using? Could it be related to user rights?

thouky
2014-01-25, 07:09
After installing and playing around with the plugin I noticed it didn't handle disconnects and reconnects, so I have made some changes to support this. It may well have been implemented crudely but I had a go.

Anyway I have forked DSTMK's repo and made the updates as well as adding a Squeezebox Plugin repo, have also created a ReadMe in the repo with the install instructions from above. Perhaps I will try and figure out all the dependancies and include them at some point.

The repo is at https://github.com/StuartUSA/shairport_plugin

I have just followed these steps and replaced the Plugin with your forked version but still get the same results - both the iPad and LMS server behave as though the AirPlay streaming is working, but the Squeezebox looks like it is still playing whatever was playing previously and there is no sound.

This is with LMS 7.7.3 on Ubuntu 12.04.4 LTS (64-bit). Tried with SB Receiver, SB Radio and SB Touch.

StuartUSA
2014-01-25, 08:37
Check that shairport_helper is in your path, and the path of the LMS user. If it is then try turning on debug logging for the ShairTunes plugin (Settings:Advance:Logging) and save the setting to survive a restart. Then stop the LMS service, restart avahi-daemon, then start LMS.

What do the logs show?

thouky
2014-01-25, 08:54
Check that shairport_helper is in your path, and the path of the LMS user. If it is then try turning on debug logging for the ShairTunes plugin (Settings:Advance:Logging) and save the setting to survive a restart. Then stop the LMS service, restart avahi-daemon, then start LMS.

What do the logs show?

This is what the /var/log/squeezeboxserver/server.log file contains from starting LMS to after the start of AirPlay streaming from my iPad:


2014-01-25 15:42:07 squeezeboxserver_safe started.
[14-01-25 15:42:10.9911] main::init (354) Starting Logitech Media Server (v7.7.3, 1375965195, Mon Aug 12 03:09:39 PDT 2013) perl 5.014002
[14-01-25 15:42:17.0811] Plugins::ShairTunes::Plugin::initPlugin (45) Initialising 0.23.3
[14-01-25 15:42:27.9192] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Bedroom
[14-01-25 15:42:28.0019] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Lounge
[14-01-25 15:42:28.1465] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Guest
[14-01-25 15:42:28.2265] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Kitchen
[14-01-25 15:42:28.3599] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Office
[14-01-25 15:43:06.3352] Plugins::ShairTunes::Plugin::handleSocketConnect (155) New connection from::ffff:192.168.0.25
[14-01-25 15:43:06.3405] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.3431] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 15:43:06.3621] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Apple-Response: vtebsSXc0jW6BAtuM4LZ98TpXlvEQVGVwSSDf8t89Eo0D2vVQG Ms0DLQXJcIgA6zG2lbQ1EKHkrDvfInkEmvsDid/CGUIqqjUSBH+nc706KGaMiwxBCBSFQOlpmcGCWR6nlR+mmMJdP Ftp2HAz3iBF5UY+IZ9II2+dHc32JFgb/WfbBLF1MlLuiCI0AeqoCDHxmfMsHASRG/vYFmySEm/XLBi8FXHMWL5UxZ0QTR4HRONcmYcRbiEl2iXRTmmqwgEIuJbzb LVOWQol27+UNrR6pvPyFREEZqNtlogKytJBw5kyijnU1P3sgKn 4cLIkNIZ3l4ARipRh+ZkQOl00eZtA
Audio-Jack-Status: connected; type=analog
CSeq: 0
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[14-01-25 15:43:06.3838] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.3871] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: ANNOUNCE
[14-01-25 15:43:06.3885] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.4050] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 1

[14-01-25 15:43:06.4097] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.4120] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: SETUP
[14-01-25 15:43:06.4139] Plugins::ShairTunes::Plugin::conn_handle_request (320) decode command: "shairport_helper" tport '55306' iv '0bed3b3c3caf4d6e15e7517bdb351aa2' pipe '/tmp/pipe' cport '61755' fmtp '96 352 0 16 40 10 14 2 255 0 0 44100' dport '55306' key 'f91ba8ff5a1879eb110441fc9b5124d3'
[14-01-25 15:43:06.4474] Plugins::ShairTunes::Plugin::conn_handle_request (340) launched decoder: 5957 on ports: 6000/6001/8000
[14-01-25 15:43:06.5011] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 2
Session: DEADBEEF
Transport: RTP/AVP/UDP;unicast;mode=record;timing_port=55306;x-events;control_port=61755;server_port=6000

[14-01-25 15:43:06.5152] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.5173] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: RECORD
[14-01-25 15:43:06.5193] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 3

[14-01-25 15:43:06.5253] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.5272] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: SET_PARAMETER
[14-01-25 15:43:06.5288] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.5304] Plugins::ShairTunes::Plugin::conn_handle_request (363) SET_PARAMETER req: volume: 0.000000
[14-01-25 15:43:06.5333] Plugins::ShairTunes::Plugin::conn_handle_request (372) sending-> vol: 100
[14-01-25 15:43:06.5345] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 4

[14-01-25 15:43:06.6558] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:06.6582] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: FLUSH
[14-01-25 15:43:06.6602] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 5

[14-01-25 15:43:08.6696] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:08.6717] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 15:43:08.6738] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 6
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER


The last few lines then repeat with incrementing CSeq numbers.

Ending the AirPlay streaming from the iPad then results in:


[14-01-25 15:43:42.8910] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:42.8932] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 15:43:42.8962] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 24
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[14-01-25 15:43:43.3855] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 15:43:43.3875] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: TEARDOWN
[14-01-25 15:43:43.3908] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Connection: close
Audio-Jack-Status: connected; type=analog
CSeq: 25

[14-01-25 15:43:43.3942] Plugins::ShairTunes::Plugin::handleSocketRead (169) Closed: IO::Socket::INET6=GLOB(0xae997b0)


shairport_helper is definitely in the path:

> which shairport_helper
/usr/local/bin/shairport_helper

StuartUSA
2014-01-25, 11:59
It all looks very similar to mine:



[14-01-25 10:41:05.2133] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=blackPudding
[14-01-25 10:42:40.5583] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Charlottes Tablet
[14-01-25 10:42:54.0486] Plugins::ShairTunes::Plugin::handleSocketConnect (155) New connection from::ffff:192.168.10.233
[14-01-25 10:42:54.0678] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 10:42:54.0698] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 10:42:54.1518] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
[14-01-25 10:42:54.2710] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 10:42:54.3233] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: ANNOUNCE
[14-01-25 10:42:54.3243] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 10:42:54.4026] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
[14-01-25 10:42:54.4590] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 10:42:54.4607] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: SETUP
[14-01-25 10:42:54.4623] Plugins::ShairTunes::Plugin::conn_handle_request (320) decode command: "shairport_helper" tport '58574' iv 'ab6a63163b29c42943b74ba0bda1b9eb' pipe '/tmp/pipe' cport '50783' fmtp '96 352 0 16 40 10 14 2 255 0 0 44100' dport '58574' key '8799b10fcce58927ab8641db2b195525'
[14-01-25 10:42:54.5385] Plugins::ShairTunes::Plugin::conn_handle_request (340) launched decoder: 14876 on ports: 6000/6001/8000
[14-01-25 10:42:54.7008] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
[14-01-25 10:42:54.7661] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 10:42:54.7678] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: RECORD
[14-01-25 10:42:54.7694] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
[14-01-25 10:42:54.7780] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 10:42:54.7798] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: SET_PARAMETER
[14-01-25 10:42:54.7808] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 10:42:54.7822] Plugins::ShairTunes::Plugin::conn_handle_request (363) SET_PARAMETER req: volume: -21.000000


I guess the only difference is the clients, the Apple device is a 4th generation iPod ios 6.1.5, and SqueezeLite, SqueezePlay and SqueezePlayer (Android).

Just notice your volume is set to 0????





[14-01-25 15:43:06.5304] Plugins::ShairTunes::Plugin::conn_handle_request (363) SET_PARAMETER req: volume: 0.000000

StuartUSA
2014-01-25, 12:13
Full trace of a playback session:



[14-01-25 19:06:56.2345] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=blackPudding
[14-01-25 19:08:21.3860] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client disconnect client=blackPudding
[14-01-25 19:08:21.3871] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (81) publisher for blackPudding PID 1803 will be terminated.
[14-01-25 19:08:22.1860] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client reconnect client=blackPudding
[14-01-25 19:09:03.6545] Plugins::ShairTunes::Plugin::handleSocketConnect (155) New connection from::ffff:192.168.10.233
[14-01-25 19:09:03.6650] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:03.6671] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 19:09:03.6925] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Apple-Response: 0jwbp/1VrnR01Cuh+R03xhwTbo7t2Ck1Th1IORSRWLWQ30OQBXmn7w7a agz5mbbOlYBkreEIihxE3Fs20m2uJW2wkWVzN2ovdb5C4HFXX1 OAWkbr8CdC00jQFhs5WZgt5Q/uq0aua2t1pS/SW8Uqg1x+SEhUizKBBci0SvmiG6YuVwiNv5OUQsnt6fKipMtDF 8SZOFW7A+qGkAW7h2dodkYlBb1d2LPjo5U/fV2gCiCjgelneTViwXmhvZvFwMSHDsZ0hV+/eoSEDdbdfNCFgmcbZZRrn2DrKoW+Xd7TcRhYWKYd+rrGjWG/KfCyKvU7Aw3OkoZ6sv48nEf4lXD7+g
Audio-Jack-Status: connected; type=analog
CSeq: 0
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[14-01-25 19:09:03.7324] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:03.7878] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: ANNOUNCE
[14-01-25 19:09:03.7888] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:03.8118] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 1

[14-01-25 19:09:03.8244] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:03.8261] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: SETUP
[14-01-25 19:09:03.8276] Plugins::ShairTunes::Plugin::conn_handle_request (320) decode command: "shairport_helper" tport '62968' iv '218cfcae4ca0071b2e9e4e180b623633' pipe '/tmp/pipe' cport '55678' fmtp '96 352 0 16 40 10 14 2 255 0 0 44100' dport '62968' key '06713d83cd9c04268115507b5de550a1'
[14-01-25 19:09:03.9141] Plugins::ShairTunes::Plugin::conn_handle_request (340) launched decoder: 1862 on ports: 6000/6001/8000
[14-01-25 19:09:03.9643] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 2
Session: DEADBEEF
Transport: RTP/AVP/UDP;unicast;mode=record;timing_port=62968;events;c ontrol_port=55678;server_port=6000

[14-01-25 19:09:04.0757] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:04.0775] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: RECORD
[14-01-25 19:09:04.0791] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 3

[14-01-25 19:09:04.1741] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:04.1758] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: SET_PARAMETER
[14-01-25 19:09:04.1769] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:04.1783] Plugins::ShairTunes::Plugin::conn_handle_request (363) SET_PARAMETER req: volume: -21.000000
[14-01-25 19:09:04.1815] Plugins::ShairTunes::Plugin::conn_handle_request (372) sending-> vol: 29.65
[14-01-25 19:09:04.1828] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 4

[14-01-25 19:09:08.7002] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:08.7019] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 19:09:08.7036] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 5
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[14-01-25 19:09:13.6170] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:13.6187] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: FLUSH
[14-01-25 19:09:13.6204] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 6

[14-01-25 19:09:13.8185] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:13.8201] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 19:09:13.8217] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 7
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[14-01-25 19:09:18.9361] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:18.9377] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: OPTIONS
[14-01-25 19:09:18.9394] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 8
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[14-01-25 19:09:23.6617] Plugins::ShairTunes::Plugin::conn_handle_data (186) handle data 1
[14-01-25 19:09:23.6633] Plugins::ShairTunes::Plugin::conn_handle_data (203) REQ: TEARDOWN
[14-01-25 19:09:23.6658] Plugins::ShairTunes::Plugin::conn_handle_request (392) RTSP/1.0 200 OK
Connection: close
Audio-Jack-Status: connected; type=analog
CSeq: 9

[14-01-25 19:09:23.6728] Plugins::ShairTunes::Plugin::handleSocketRead (169) Closed: IO::Socket::INET6=GLOB(0x7e6eaf8)

disaster123
2014-01-25, 12:21
Any chance to get it working under windows?

thouky
2014-01-25, 13:05
It all looks very similar to mine:

...

I guess the only difference is the clients, the Apple device is a 4th generation iPod ios 6.1.5, and SqueezeLite, SqueezePlay and SqueezePlayer (Android).

Trying iTunes (11.1.4.62) instead of my iPad Retina (iOS 7.04) as the source gives the same result.

However, using iPeng on my iPhone 5 instead of a physical Squeezebox as the destination resulted in an error being displayed (with both iTunes and the iPad as source):

15511
and the log file contained:

[14-01-25 19:48:22.2291] Slim::Player::Song::open (471) Warning: stream failed to open [airplay://192.168.0.19:8000/stream.wav].

However, this may be a limitation of iPeng with custom protocols since that error does not appear in the log when a real Squeezebox is used as the destination.


Just notice your volume is set to 0????

I think the "SET_PARAMETER req: volume" value in the log is the volume requested by the AirPlay source is a dB reduction below maximum, so 0.000000 means 100%. Reducing the volume on the iPad makes the "SET_PARAMETER req: volume" go negative and the "sending-> vol" value drops from its initial 100.

Curiously, this seems to override the "Output level is fixed at 100%" option that is configured for that Squeezebox. That doesn't explain the lack of sound, but will be annoying if I ever get the streaming to work...

thouky
2014-01-25, 13:23
I think I've found the problem - ShairTunes doesn't work when the player is synchronized with other players. Removing the destination Squeezebox from its sync group allows the audio to play, otherwise it just sits there trying to connect...

StuartUSA
2014-01-26, 05:38
I think I've found the problem - ShairTunes doesn't work when the player is synchronized with other players. Removing the destination Squeezebox from its sync group allows the audio to play, otherwise it just sits there trying to connect...

Glad you got it working.


Any chance to get it working under windows?
I guess it could, not sure how to compile the helper app, also would need a Windows version of the avahi-daemon.


Tried the repo, but still the same. The plugin initializes and discovers my squeezebox, but no airplay target.

Sounds like a problem with avahi-daemon. There should be avahi-publish-service process running for each squeezeplay target.

thouky
2014-01-26, 07:11
I think I've found the problem - ShairTunes doesn't work when the player is synchronized with other players. Removing the destination Squeezebox from its sync group allows the audio to play, otherwise it just sits there trying to connect...
Glad you got it working.


Thank you for all of your help.

To avoid needing to remove the device from its sync group I have added the following to the SETUP code within the ShairTunes plugin's conn_handle_request function:


my $url = "airplay://$host:$hport/stream.wav";

my $client = $conn->{player};
my @otherclients = grep { $_->name ne $client->name and $_->power }
$client->syncGroupActiveMembers();
foreach my $otherclient (@otherclients)
{
$log->info('turning off: ' . $otherclient->name);
$otherclient->display->showBriefly({line => ['AirPlay streaming to ' . $client->name . ':', 'Turning this player off']});
$otherclient->execute(['power', 0]);
}

$conn->{player}->execute( [ 'playlist', 'play', $url ] );

I would have preferred to support streaming to all of the devices in the sync group, but I haven't been able to work out why that isn't working.

bruinboy
2014-01-26, 08:45
Thanks to everyone for working on this plugin. I would consider an easy to install and run shairtunes plugin the ultimately useful add on.

Can someone take me through the instruction on how to install this on a mac (Mavericks)?

Thanks in advance for your expertise and help.

Scott

woodster
2014-01-26, 11:29
Hi again,

I tried with the 7.7.3 LMS but still the same.

I am getting the publish service in avahi for each player.
I am see them using avahi-discover, right next to a native airplay target.
Each with the right name - problem is they do not turn up on my I-devices. Both running ios7. How about your ios versions.

I changed my settings I avahi-deamon.conf according to Stuart USA.

Any ideas?


Glad you got it working.


I guess it could, not sure how to compile the helper app, also would need a Windows version of the avahi-daemon.



Sounds like a problem with avahi-daemon. There should be avahi-publish-service process running for each squeezeplay target.

StuartUSA
2014-01-26, 12:29
I would have preferred to support streaming to all of the devices in the sync group, but I haven't been able to work out why that isn't working.

Just wondering if it works if you select the Master client of the SyncGroup?

StuartUSA
2014-01-26, 12:33
How about your ios versions.


I only have one device, an iPod on ios 6...have you tried using iTunes? I believe thouky has ios 7 devices and used iTunes.

woodster
2014-01-26, 13:44
Some kind of breakthrough.... I saw one of my targets on my ipad running ios7. Then I fumbled around finding some music to play, and then the target had disappeared.
This was right after my server had booted, and even a restart of the avahi-deamon and the lms could not get it back.

After this it was visible with avahi-discover but not on the ipad.

Could it be another service starting up and blocking some ports. I'm running a vnc server as well. Port 5900.


I only have one device, an iPod on ios 6...have you tried using iTunes? I believe thouky has ios 7 devices and used iTunes.

StuartUSA
2014-01-26, 14:52
avahi-discover? Is that on the server? If so perhaps try on another device, on ios or android devices try looking for Bonjour Browser.


Some kind of breakthrough.... I saw one of my targets on my ipad running ios7. Then I fumbled around finding some music to play, and then the target had disappeared.
This was right after my server had booted, and even a restart of the avahi-deamon and the lms could not get it back.

After this it was visible with avahi-discover but not on the ipad.

Could it be another service starting up and blocking some ports. I'm running a vnc server as well. Port 5900.

agillis
2014-01-26, 15:16
I added an RPM to VortexBox for the ShairTunes Plugin. The RPM resolves all discrepancies and installs the plug-in for you. Seems to work very well.

http://forums.slimdevices.com/showthread.php?100838-ShairTunes-Plugin-for-VortexBox

woodster
2014-01-27, 03:13
Yes avahi-discover is run from the server, and the targets are visible there all the time.
You were right running Bonjour browser, this only shows the native airplay targets but not the squeeze ones.

Lms 7.8 vs 7.7.3 didn't seem to make any difference.

Any ideas? So annoying to have seen it on the I devices, but not having it work persistently.


avahi-discover? Is that on the server? If so perhaps try on another device, on ios or android devices try looking for Bonjour Browser.

woodster
2014-01-27, 12:08
New possible cause of error:

I'm using a linksys wrt120n, and as its big brother has a problem routing multicast packets between wired and wireless network, I suspect this might be the same with my router.

I will follow this a bit further.

http://community.linksys.com/t5/Wireless-Routers/WRT610N-incompatible-with-Bonjour/td-p/281837/page/3


Yes avahi-discover is run from the server, and the targets are visible there all the time.
You were right running Bonjour browser, this only shows the native airplay targets but not the squeeze ones.

Lms 7.8 vs 7.7.3 didn't seem to make any difference.

Any ideas? So annoying to have seen it on the I devices, but not having it work persistently.

thouky
2014-01-27, 12:51
I would have preferred to support streaming to all of the devices in the sync group, but I haven't been able to work out why that isn't working.

Just wondering if it works if you select the Master client of the SyncGroup?

Interesting idea, but unfortunately it doesn't appear to make any difference.

If any of the other players in the sync group are on then playback doesn't start. Switching all but one of the players off (regardless of whether it was the master) start playback on the remaining device. Switching any other player on stops playback. Switching either player off and playback resumes on the other device.

The stream is clearly connected to the group, but only one client can receive it at a time.

woodster
2014-01-28, 01:55
Spot on, problem with the router.

I connected my laptop by wire together with the server, and from iTunes the squeezebox was visible as an airplay target.
Who would have thought that.? Lousy router.

Now I will be looking for a replacement.



New possible cause of error:

I'm using a linksys wrt120n, and as its big brother has a problem routing multicast packets between wired and wireless network, I suspect this might be the same with my router.

I will follow this a bit further.

http://community.linksys.com/t5/Wireless-Routers/WRT610N-incompatible-with-Bonjour/td-p/281837/page/3

sternenjaeger
2014-01-30, 11:01
I installed the plugin from https://github.com/StuartUSA/shairport_plugin
Works quite well - thanks a lot, this is really useful. What i noticed:


I had no trouble with older iPods and an iPad 1. The squeezeboxes were visible as airplay targets and airplay worked with less then 2s delay.
With an newer iPad with IOS7 i could also see the squeezeboxes but airplay didn't work. In the server.log i saw the message:


Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Undefined subroutine &Plugins::ShairTunes::Plugin::ip6bin called at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 250.


(I had deactivated IPV6 in the avahi configuration).

In line 250 of Plugin.pm there is a call to the function which seems to be missing. Via google i found https://github.com/bbhoss/shairport/blob/master/shairport.pl
The function is there defined as:


sub ip6bin {
my $ip = shift;
$ip =~ /((.*)::)?(.+)/;
my @left = split /:/, $2;
my @right = split /:/, $3;
my @mid;
my $pad = 8 - ($#left + $#right + 2);
if ($pad > 0) {
@mid = (0) x $pad;
}

pack('S>*', map { hex } (@left, @mid, @right));
}


I added this function to Plugin.pm and now airplay also works on my IOS7 device (I then also set use-ipv6=yes in the avahin configuration).

I have no knowledge about airplay whatsoever about airplay so please excuse if this post is irrelevant.

bruinboy
2014-01-30, 15:07
Again,

Has anyone installed shairtunes successfully on a mac? If so, please leave instructions. This would be fantastically helpful to many of us.

Thanks again.

Scott

DSTMK
2014-02-03, 14:29
Haven't looked at this for a while. Thank you all, especially StuartUSA for taking care! Cool! :)

I am currently working on properly managing timestamps and buffers so that you can use the plugin to watch video in sync.

DSTMK
2014-02-03, 15:25
Today I successfully installed LMS into a jail on my FreeNAS Box and also compiled the shairtunes helper for BSD - worked :)

I think the problem with the sync groups comes from the fact that the helper only accepts one connection. I could probably change that, but I'd like to make sure if this is the correct solution. Any comments?

StuartUSA
2014-02-03, 16:18
Today I successfully installed LMS into a jail on my FreeNAS Box and also compiled the shairtunes helper for BSD - worked :)

I think the problem with the sync groups comes from the fact that the helper only accepts one connection. I could probably change that, but I'd like to make sure if this is the correct solution. Any comments?
Welcome back and thanks for your work. I just updated the plugin with the contributions above for ipv6 and the sync group work around, but can't test at the moment.

I was thinking that the one connection to the master player in the sync group would work, but apparently not, hadn't had a chance to look at it yet.

Ron Olsen
2014-02-03, 19:28
Welcome back and thanks for your work. I just updated the plugin with the contributions above for ipv6 and the sync group work around, but can't test at the moment.

I was thinking that the one connection to the master player in the sync group would work, but apparently not, hadn't had a chance to look at it yet.

I think there is a bug in the ip6bin routine in the latest version of Plugin.pm (0.23.4) in https://github.com/StuartUSA/shairport_plugin.

The line


$ip =~ /((.*):?(.+)/;

should be


$ip =~ /((.*)::)?(.+)/;

disaster123
2014-02-04, 03:02
is there any chance to get this running on windows? Does anybody know how to compile?

StuartUSA
2014-02-04, 03:56
Oooops, sorry a cut 'n' paste error; think I have fixed, well its publishing the services now, but I can't test as I am remote at the moment...


I think there is a bug in the ip6bin routine in the latest version of Plugin.pm (0.23.4) in https://github.com/StuartUSA/shairport_plugin.

The line


$ip =~ /((.*):?(.+)/;

should be


$ip =~ /((.*)::)?(.+)/;

StuartUSA
2014-02-04, 08:15
is there any chance to get this running on windows? Does anybody know how to compile?

Sorry but its more than just knowing how to compile, you need to be able to set up a development/build environment, and also have access to a system to test. Whilst I use Windows as a client using it as a server is not something I'm interested in doing at home. Good luck with it should you try, I'm sure you'd get help from people on these forums, I know I did...

StuartUSA
2014-02-04, 08:23
...I can't test as I am remote at the moment...
Tested and seems to be OK. :)

ralphy
2014-02-05, 11:32
I managed to get the shairport plugin running on my dockstar with squeezeplug.

I've attached the shairport_helper armel binary which you need to install in /usr/local/bin.


tar -C /usr/local/bin -xzf shairport_helper-armel.tar.gz

There is a static binary as well which has no shared library dependencies. To use this instead


cd /usr/local/bin
rm shairport_helper
mv shairport_helper-static shairport_helper

I also had to install the following debian packages


apt-get install libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libio-socket-ssl-perl

and download and install


wget http://www.inf.udec.cl/~diegocaro/rpi/libnet-sdp-perl_0.07-1_all.deb

dpkg -i libnet-sdp-perl_0.07-1_all.deb

Make sure you replace /etc/avahi/avahi-daemon.conf with StuartUSA's config and restart the avahi-daemon before restarting LMS


[server]
use-ipv4=yes
use-ipv6=no

[wide-area]
enable-wide-area=yes

[publish]
publish-aaaa-on-ipv4=no
publish-a-on-ipv6=no

[reflector]

[rlimits]
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=300
rlimit-stack=4194304
rlimit-nproc=3

ralphy
2014-02-05, 15:04
I noticed the the player state remains playing after the connection closes.

This patch sends the stop command on close.

--- Plugin.pm.orig 2014-02-05 16:53:41.000000000 -0500
+++ Plugin.pm 2014-02-05 16:48:18.000000000 -0500
@@ -380,6 +380,8 @@
$resp->header('Connection', 'close');
close $conn->{decoder_fh};

+ $conn->{player}->execute( [ 'stop' ] );
+
last;
};
/^SET_PARAMETER$/ && do {

StuartUSA
2014-02-05, 16:44
I noticed the the player state remains playing after the connection closes.

This patch sends the stop command on close.


Thanks for that, will update the repo with the patch, will add the arm helper app too, if anyone else has the helper app compiled for any other architecture please post it.

ralphy
2014-02-08, 12:24
Thanks for that, will update the repo with the patch, will add the arm helper app too, if anyone else has the helper app compiled for any other architecture please post it.
Thanks.

Attached is an armhf shairport_helper binary for the rpi. Again both a dynamic and static version are included.

MalcolmBarr
2014-02-08, 12:43
I would dearly love to have the ability to stream audio direct from my Ipad to squeezebox (I have three duets and a classic). I am particularly interested in being able to stream the audio from Google Play from the Ipad - I think I am right in thinking that once the Ipad sees an airplay compatible receiver on the network, you can route the output from any app to that. Please tell me if that is wrong!

I am running LMS 7.8 on a QNAP TS-869L, and am very unfamiliar with Linux. Would it be possible for someone to write a step by step on how to install this plug-in which could be followed even by utter Linux noobs like me?

As it stands, my attempt to follow what I have read here has been foiled at the first hurdle. When I try and add the repo linked to by StuartUSA in post 17 of this thread to LMS, I get the following error message:

"Bad repository http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml - Redirection limit exceeded" - can anyone help me with that?

If I can get to the point where the plug-in is installed, I understand that I then need to "compile the helper app, on Linux". To do that, I need to SSH into the Qnap box linux interface and then simply type the commands as shown at the bottom of https://github.com/StuartUSA/shairport_plugin. Please tell me if this is wrong.

Apologies for the very basic questions, and thanks to all who have put work in to developing this plug in so far.

ralphy
2014-02-08, 13:46
As it stands, my attempt to follow what I have read here has been foiled at the first hurdle. When I try and add the repo linked to by StuartUSA in post 17 of this thread to LMS, I get the following error message:

"Bad repository http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml - Redirection limit exceeded" - can anyone help me with that?

If I can get to the point where the plug-in is installed, I understand that I then need to "compile the helper app, on Linux". To do that, I need to SSH into the Qnap box linux interface and then simply type the commands as shown at the bottom of https://github.com/StuartUSA/shairport_plugin. Please tell me if this is wrong.

Apologies for the very basic questions, and thanks to all who have put work in to developing this plug in so far.

Can you check your server.log file for any errors?

I had to install the libio-socket-ssl-perl package on my dockstar before I could add the repo.

The error in my server.log was

[14-02-05 09:52:06.9099] main::init (369) Starting Logitech Media Server (v7.8.0, TRUNK, UNKNOWN) perl 5.010001
[14-02-05 09:53:59.0592] Slim::Utils::Misc::msg (1311) Warning: [09:53:59.0315] Async::HTTP: Unable to load IO::Socket::SSL, will try connecting to SSL servers in non-SSL mode

If you have the same error you'll need to find a package for your NAS which provides the io:socket:ssl perl module.

MalcolmBarr
2014-02-08, 14:50
Can you check your server.log file for any errors?

I had to install the libio-socket-ssl-perl package on my dockstar before I could add the repo.

If you have the same error you'll need to find a package for your NAS which provides the io:socket:ssl perl module.

Ralphy - thank you for taking the time to reply to my post.

My server log has the same error. A search for libio-socket-ssl-perl qnap throws up this link

http://forums.slimdevices.com/showthread.php?92723-Soundcloud-plugin-for-squeezeserver&p=749094&viewfull=1#post749094

Should I try the commands suggested there for Debian type systems, or do I need something more bespoke for Qnap?

MalcolmBarr
2014-02-09, 04:40
http://forums.slimdevices.com/showthread.php?92723-Soundcloud-plugin-for-squeezeserver&p=749094&viewfull=1#post749094[/url]

Should I try the commands suggested there for Debian type systems, or do I need something more bespoke for Qnap?

I ssh'd into the QNAP TS-869L using putty, and typed in the "sudo apt-get install libssl-dev" command, and I get "-sh: sudo: command not found". So I clearly need to do something to set things up on the Qnap box to get this going.

Any help much appreciated.

ralphy
2014-02-09, 05:42
I ssh'd into the QNAP TS-869L using putty, and typed in the "sudo apt-get install libssl-dev" command, and I get "-sh: sudo: command not found". So I clearly need to do something to set things up on the Qnap box to get this going.

Any help much appreciated.

If you can connect to the QNAP as root you can drop the sudo part from all the commands.

I'd suggest asking for help with this part of your setup on a QNAP forum. When you get to the point of having the plugin installed, let us know.

JimPro
2014-02-10, 08:53
Thanks for that, will update the repo with the patch, will add the arm helper app too, if anyone else has the helper app compiled for any other architecture please post it.

Thanks all for the great work! I am Linux challenged but good at following steps. Can someone please help me layout the steps to install on squeezeplug? I am using the VAMP version with a local LMS installed on it. thanks again,

Jim

StuartUSA
2014-02-10, 10:37
Thanks all for the great work! I am Linux challenged but good at following steps. Can someone please help me layout the steps to install on squeezeplug? I am using the VAMP version with a local LMS installed on it. thanks again,

Jim

The repo should help you....

https://github.com/StuartUSA/shairport_plugin/blob/master/README.md

StuartUSA
2014-02-10, 10:39
Just updated the repo with changes and binaries from Ralphy.

strim
2014-02-22, 17:25
I get this message :

Ongeldige opslagruimte http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml - Redirection limit exceeded

what to do ?

LMS 7.8 running on Synology DS213

Sander

StuartUSA
2014-02-24, 07:03
You haven't installed the dependencies, namely libio-socket-ssl-perl. See earlier in the thread....


I get this message :

Ongeldige opslagruimte http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml - Redirection limit exceeded

what to do ?

LMS 7.8 running on Synology DS213

Sander

castalla
2014-02-25, 16:13
I've run into a big roadblock on installing the plugin.

I'm trying to install on a debian i386 system

Using the instructions:

apt-get install build-essential libssl-dev libcrypt-openssl-rsa-perl \
libao-dev libio-socket-inet6-perl libwww-perl avahi-utils pkg-config
> cd /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/
> make

I get errors running the first command:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu3) but 1.0.1-4ubuntu5.11 is to be installed
Depends: zlib1g-dev but it is not going to be installed
Recommends: libssl-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Also make is an unrecognised command.

Is there a pre-compiled i386 shairport-helper binary anywhere?

Or have I reached a dead-end????

castalla
2014-02-26, 02:36
... if anyone else has the helper app compiled for any other architecture please post it.

Please .... somebody must have a compiled binary for linux i86 .... surely?

ralphy
2014-02-26, 07:02
Please .... somebody must have a compiled binary for linux i86 .... surely?

Attachment includes both static and shared i386 binaries...untested.

castalla
2014-02-26, 09:09
Attachment includes both static and shared i386 binaries...untested.

Wow! Thanks. Will test later tonight.

castalla
2014-02-26, 10:32
Oh dear .... so near yet so far - I can see the client but can't connect

BUT (idiot me!)

I checked on the LMS Information tab AND suddenly noticed that the server is:

Platform Architecture: i686-linux

I guess this means I should use an i686 binary ???

Ralphy .... any chance you could post a compiled 686 binary - thanks in advance.

For reference, here's the LMS log entry:

[14-02-26 18:20:50.6927] Plugins::ShairTunes::Plugin::handleSocketConnect (169) New connection from::ffff:192.168.1.16
[14-02-26 18:20:51.0699] Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0xd1231d0)

StuartUSA
2014-02-26, 14:06
Try running it from the command line to see if you have any errors.:


system-admin@server:~$ shairport_helper
FATAL: Must supply AES key and IV!
system-admin@server:~$

That is what you will see for a working helper. If it does not run try fixing your installation and compile your own version.

Before you run the 'apt-get install' run 'apt-get update' and also run 'apt-get install -f' to resolve any previous dependencies that were missed.

Stuart/



Oh dear .... so near yet so far - I can see the client but can't connect

BUT (idiot me!)

I checked on the LMS Information tab AND suddenly noticed that the server is:

Platform Architecture: i686-linux

I guess this means I should use an i686 binary ???

Ralphy .... any chance you could post a compiled 686 binary - thanks in advance.

For reference, here's the LMS log entry:

[14-02-26 18:20:50.6927] Plugins::ShairTunes::Plugin::handleSocketConnect (169) New connection from::ffff:192.168.1.16
[14-02-26 18:20:51.0699] Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0xd1231d0)

castalla
2014-02-26, 15:23
Try running it from the command line to see if you have any errors.:


system-admin@server:~$ shairport_helper
FATAL: Must supply AES key and IV!
system-admin@server:~$

That is what you will see for a working helper. If it does not run try fixing your installation and compile your own version.

Before you run the 'apt-get install' run 'apt-get update' and also run 'apt-get install -f' to resolve any previous dependencies that were missed.

Stuart/

BINGO! Got it working!

The key step was to make shairport_helper executable!!!

PS: just for the record, this procedure has been implemented on my O2 Joggler (what the Touch could have been!)

castalla
2014-02-27, 04:56
After a few tests, I have a problem with the volume level: on occasion when I start a play for the first time, the volume on the player (Touch, in this case) switches to 100 (blasting the speakers!)

Any ideas on how to fix the volume at lower level?

castalla
2014-02-27, 16:06
I'm trying to reinstall the plugin. I get the following:

Bad repository http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml - Timed out waiting for data

castalla
2014-02-28, 03:33
The repo link is reporting:

Error 503 backend read error

backend read error
Guru Meditation:

XID: 264004653

Varnish cache server

Any ideas, anyone?

StuartUSA
2014-02-28, 05:09
Seems github has changed something, set the repo to:


http://raw.github.com/StuartUSA/shairport_plugin/master/public.xml
i.e. change 'raw2' to 'raw'.


The repo link is reporting:

Error 503 backend read error

backend read error
Guru Meditation:

XID: 264004653

Varnish cache server

Any ideas, anyone?

castalla
2014-02-28, 05:46
When I use the http://raw.github.com/StuartUSA/shairport_plugin/master/public.xml as the repo, then LMS goes into a loop reporting that an update is available - the plugin isn't installed. Enabling the update gives the same result, when server restarts there's the update plugin message again!

StuartUSA
2014-02-28, 07:04
In the LMS GUI Got to Settings:Advanced in the the drop down list select "Logging".

At the top check the item "Save logging settings for use at next application restart" then...

Look down the page to see if "(plugin.shairtunes) - ShairTunes" exists if it does set the drop down list to debug. On the same page look for (server.plugins) - Plugin Module Loading and set that to debug as well.

Click Apply. Next stop LMS, the restart the avahi service, next start LMS.

When it has started check the log:

/var/log/squeezeboxserver/server.log

Look for any startup errors....


When I use the http://raw.github.com/StuartUSA/shairport_plugin/master/public.xml as the repo, then LMS goes into a loop reporting that an update is available - the plugin isn't installed. Enabling the update gives the same result, when server restarts there's the update plugin message again!

castalla
2014-02-28, 07:23
In the LMS GUI Got to Settings:Advanced in the the drop down list select "Logging".

At the top check the item "Save logging settings for use at next application restart" then...

Look down the page to see if "(plugin.shairtunes) - ShairTunes" exists if it does set the drop down list to debug. On the same page look for (server.plugins) - Plugin Module Loading and set that to debug as well.

Click Apply. Next stop LMS, the restart the avahi service, next start LMS.

When it has started check the log:

/var/log/squeezeboxserver/server.log

Look for any startup errors....

There's no plugin.shairtunes listed .....

So can't debug!

---------------

In the public.xml there's still a reference to raw2 - maybe that's causing the problems ???

StuartUSA
2014-02-28, 07:29
>... On the same page look for (server.plugins) - Plugin Module Loading and set that to debug as well.

As that will reveal the debug whilst trying to load/enable the plugin.


There's no plugin.shairtunes listed .....

So can't debug!


Thanks for finding that one, have updated the public.xml file.


In the public.xml there's still a reference to raw2 - maybe that's causing the problems ???

castalla
2014-02-28, 07:48
>... On the same page look for (server.plugins) - Plugin Module Loading and set that to debug as well.

As that will reveal the debug whilst trying to load/enable the plugin.



Thanks for finding that one, have updated the public.xml file.

Sort of got it working with the latest public.xml BUT the connection keeps rebuffering and the volume level shot up immediately to 100 - ouch!!!

I think I'm going to have to go back to zero and reinstall the whole OS setup again.

StuartUSA
2014-02-28, 07:55
On the rebuffering; is the squeezebox client connected with wifi? I had a rPi with a small nano wifi that kept doing this, tried it on the wired interface and had no problems. Got one of the Edimax adapters http://amzn.to/1fOiyvF and no problems with that either....

Where is the volume increasing to 100%? On the squeezebox client or the Apple product?


Sort of got it working with the latest public.xml BUT the connection keeps rebuffering and the volume level shot up immediately to 100 - ouch!!!

I think I'm going to have to go back to zero and reinstall the whole OS setup again.

castalla
2014-02-28, 08:04
On the rebuffering; is the squeezebox client connected with wifi? I had a rPi with a small nano wifi that kept doing this, tried it on the wired interface and had no problems. Got one of the Edimax adapters http://amzn.to/1fOiyvF and no problems with that either....

Where is the volume increasing to 100%? On the squeezebox client or the Apple product?

Using wifi - but it all worked 100% until yesterday without buffering.

As far as I can tell, the volume increase to 100 happens when selecting between the smartphone internal speaker to the airplay one - a squeezebox Touch. I haven't determined a strict pattern yet as it seems to be semi-random.

I'm reinstalling the whole system from scratch now - so I should have a 'clean' setup to test later today. Will report the outcome here.

Thanks for the help.

castalla
2014-02-28, 14:41
Update: all working again after reinstall of system.

Will test over next 24 hrs for volume problems.

castalla
2014-03-02, 09:37
I've concluded that the volume issue was caused by the android app (Honey Player) I used. I installed Streambels and can now airplay to a choice of 4 SB devices.

The only negative is that sync doesn't work - I think there was earlier mention of this.

Freddy
2014-03-19, 11:56
Is this the correct url for the repository ?
http://raw.github.com/StuartUSA/shairport_plugin/master/public.xml

I get Bad repository - Redirection limit exceeded

castalla
2014-03-19, 12:11
Is this the correct url for the repository ?
http://raw.github.com/StuartUSA/shairport_plugin/master/public.xml

I get Bad repository - Redirection limit exceeded

That is correct.

bruinboy
2014-03-19, 14:22
Again, has anyone (can anyone?) port this to mac os x? This would be incredible.

Scott

Freddy
2014-03-20, 11:22
That is correct.


OK, thanks for confirmation.
Strange that I get this error then...

Trying to install it on my ReadyNAS running 7.7.3

castalla
2014-03-20, 11:27
OK, thanks for confirmation.
Strange that I get this error then...

Trying to install it on my ReadyNAS running 7.7.3

Have you been able to install other plugins?

What OS does it use? You have to also install the shairport-helper program or compile it.

Freddy
2014-03-20, 11:42
Have you been able to install other plugins?

What OS does it use? You have to also install the shairport-helper program or compile it.


Yes other plugins are working fine.

The NAS is running Debian.
Can I use any of these or I still need to compile shairport-helper before adding the repository?


#apt-cache search shairport*
libshairport-dev - emulates an AirPort Express (development files)
libshairport1 - emulates an AirPort Express (shared library)

castalla
2014-03-20, 12:00
Yes other plugins are working fine.

The NAS is running Debian.
Can I use any of these or I still need to compile shairport-helper before adding the repository?


#apt-cache search shairport*
libshairport-dev - emulates an AirPort Express (development files)
libshairport1 - emulates an AirPort Express (shared library)


No idea! The shairport-helper needs to be processor specific.

I think you can install the plugin before you add shairport-helper.

Freddy
2014-03-20, 22:36
No idea! The shairport-helper needs to be processor specific.

I think you can install the plugin before you add shairport-helper.

Yes that was my thought too. That I should be able to add the repository and install the plugin even if I was missing helper.
Weird I get this error though.

Might try to install the plugin manually.
I can see that it´s located here: https://raw.github.com/StuartUSA/shairport_plugin/master/ShairTunes.zip

tfec
2014-05-02, 17:55
I tried to install the ShairTunesPlugin onto my LMS. My machine is a ReadyNas NV+ v2 with a Marvell 6282 ARM. README.md (https://github.com/StuartUSA/shairport_plugin/blob/master/README.md) gave me a plan.
After installing the plugin there was no path /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/, so I could not build my own shairport_helper - I took the precompiled shairport_helper-armel, renamed it and cp'ed it on /usr/local/bin.

My iTunes and my iPad show all my Squeezeboxes as AirPlay targets and they stream music to them. But after 2 seconds the buffer is empty, playing stops for 3 seconds until the buffer is filled and so on ...

Here is the excerpt of trying to make my own shairport-helper after copying the files contained in src to the manually build folder /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/:

cc -O2 -Wall -DHAIRTUNES_STANDALONE hairtunes.c alac.o http.o -o shairport_helper -lm -lpthread -lao -lssl -lcrypto
hairtunes.c: In function ‘rtp_thread_func’:
hairtunes.c:396: warning: unused variable ‘si_len’
hairtunes.c: In function ‘audio_thread_func’:
hairtunes.c:903: warning: format ‘%li’ expects type ‘long int’, but argument 3 has type ‘ssize_t’
hairtunes.c: In function ‘http_on_headers_complete’:
hairtunes.c:923: warning: format ‘%li’ expects type ‘long int’, but argument 3 has type ‘ssize_t’
hairtunes.c:923: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘size_t’
hairtunes.c: At top level:
hairtunes.c:669: warning: ‘bf_est_reset’ defined but not used
hairtunes.c: In function ‘rtp_request_resend’:
hairtunes.c:472: warning: dereferencing pointer ‘rtp_client.85’ does break strict-aliasing rules
hairtunes.c:472: note: initialized from here
hairtunes.c:476: warning: dereferencing pointer ‘rtp_client.87’ does break strict-aliasing rules
hairtunes.c:476: note: initialized from here
alac.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [shairport_helper] Fehler 1

Now I'm stuck ...

--
Thomas

ralphy
2014-05-03, 04:42
I tried to install the ShairTunesPlugin onto my LMS. My machine is a ReadyNas NV+ v2 with a Marvell 6282 ARM. README.md (https://github.com/StuartUSA/shairport_plugin/blob/master/README.md) gave me a plan.
After installing the plugin there was no path /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/, so I could not build my own shairport_helper - I took the precompiled shairport_helper-armel, renamed it and cp'ed it on /usr/local/bin.

My iTunes and my iPad show all my Squeezeboxes as AirPlay targets and they stream music to them. But after 2 seconds the buffer is empty, playing stops for 3 seconds until the buffer is filled and so on ...

Here is the excerpt of trying to make my own shairport-helper after copying the files contained in src to the manually build folder /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/:

cc -O2 -Wall -DHAIRTUNES_STANDALONE hairtunes.c alac.o http.o -o shairport_helper -lm -lpthread -lao -lssl -lcrypto
hairtunes.c: In function ‘rtp_thread_func’:
hairtunes.c:396: warning: unused variable ‘si_len’
hairtunes.c: In function ‘audio_thread_func’:
hairtunes.c:903: warning: format ‘%li’ expects type ‘long int’, but argument 3 has type ‘ssize_t’
hairtunes.c: In function ‘http_on_headers_complete’:
hairtunes.c:923: warning: format ‘%li’ expects type ‘long int’, but argument 3 has type ‘ssize_t’
hairtunes.c:923: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘size_t’
hairtunes.c: At top level:
hairtunes.c:669: warning: ‘bf_est_reset’ defined but not used
hairtunes.c: In function ‘rtp_request_resend’:
hairtunes.c:472: warning: dereferencing pointer ‘rtp_client.85’ does break strict-aliasing rules
hairtunes.c:472: note: initialized from here
hairtunes.c:476: warning: dereferencing pointer ‘rtp_client.87’ does break strict-aliasing rules
hairtunes.c:476: note: initialized from here
alac.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [shairport_helper] Fehler 1

Now I'm stuck ...

--
Thomas

Looks like you have object files for a different cpu.

Try running this first

cd /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/src
make clean

and then

make

tfec
2014-05-03, 12:38
Thanks, Ralphy,
this was not the key, it brought nearly the same list as before and a silent helper.

After resolving some dependency problems I installed build-essential libssl-dev libcrypt-openssl-rsa-perl libao-dev avahi-utils ...
Then I took your shairport_helper_armel from post #52. Again, the boxes will be playing the streamed material in a very stuttering way. The server log shows nothing unusual, everything seems fine.

The CPU is a 1.6GHz Marvelll 6282 with 256MB DDR3 and server and Squeezebox are bound via GBit LAN, must be fast enough.

__
Thomas

ralphy
2014-05-04, 04:19
Thanks, Ralphy,
this was not the key, it brought nearly the same list as before and a silent helper.

After resolving some dependency problems I installed build-essential libssl-dev libcrypt-openssl-rsa-perl libao-dev avahi-utils ...
Then I took your shairport_helper_armel from post #52. Again, the boxes will be playing the streamed material in a very stuttering way. The server log shows nothing unusual, everything seems fine.

The CPU is a 1.6GHz Marvelll 6282 with 256MB DDR3 and server and Squeezebox are bound via GBit LAN, must be fast enough.

__
Thomas

Hard to say without more information.

Have you tried running top on the system while the plugin is streaming to get an idea of what might be happening?

tfec
2014-05-04, 08:24
Have you tried running top on the system ...
What do you mean with running top on the system? I'm not very experienced in linux.

THE_DBX
2014-05-11, 08:42
Hello,

Thank's for your plugin, but for me, it's too complicate to install manually…
Maybe, you can create a link for "Logitech Media Server repositories", and, by this way, to install easily this plugin

Thank's

Best regards

virusbrain
2014-05-12, 12:09
Hi,

first thanks for all your great work!

I would like to ask if it is normal that the streaming over airplay is not working when i am buildig a sync-group?
If so, could you please describe why this is a limitation? Eventually I will try to fix this issue. But at the moment i do not understand why it is not working. A little pointer in the right direction will be fine :-).

best regards,
virusbrain

atca
2014-05-26, 02:46
trying to compile this on x86-64 I get the following output, has this been compiled on x86?


sudo make
cc -O2 -Wall -DHAIRTUNES_STANDALONE hairtunes.c alac.o http.o -o shairport_helper -lm -lpthread -lao -lssl -lcrypto
hairtunes.c: In function ‘rtp_thread_func’:
hairtunes.c:396:15: warning: unused variable ‘si_len’ [-Wunused-variable]
hairtunes.c: In function ‘audio_thread_func’:
hairtunes.c:903:17: warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘ssize_t’ [-Wformat]
hairtunes.c: In function ‘http_on_headers_complete’:
hairtunes.c:923:9: warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘ssize_t’ [-Wformat]
hairtunes.c:923:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]
hairtunes.c: At top level:
hairtunes.c:669:13: warning: ‘bf_est_reset’ defined but not used [-Wunused-function]
/usr/bin/ld: i386:x86-64 architecture of input file `alac.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `http.o' is incompatible with i386 output
collect2: ld returned 1 exit status
make: *** [shairport_helper] Error 1

atca
2014-05-26, 03:22
trying to compile this on x86-64 I get the following output, has this been compiled on x86?


sudo make
cc -O2 -Wall -DHAIRTUNES_STANDALONE hairtunes.c alac.o http.o -o shairport_helper -lm -lpthread -lao -lssl -lcrypto
hairtunes.c: In function ‘rtp_thread_func’:
hairtunes.c:396:15: warning: unused variable ‘si_len’ [-Wunused-variable]
hairtunes.c: In function ‘audio_thread_func’:
hairtunes.c:903:17: warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘ssize_t’ [-Wformat]
hairtunes.c: In function ‘http_on_headers_complete’:
hairtunes.c:923:9: warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘ssize_t’ [-Wformat]
hairtunes.c:923:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]
hairtunes.c: At top level:
hairtunes.c:669:13: warning: ‘bf_est_reset’ defined but not used [-Wunused-function]
/usr/bin/ld: i386:x86-64 architecture of input file `alac.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `http.o' is incompatible with i386 output
collect2: ld returned 1 exit statusvar/log/squeezeboxserver/server.log (100, 500, 1000 line
make: *** [shairport_helper] Error 1


sorted now, removed the previos .o build files and re built.

castalla
2014-05-28, 04:19
I've driven myself mad over the last few days (not unusual) installing & reinstalling various images.

The outcome I've determined is that the ShairTunes plugin works perfectly if the LMS server is on a wifi connection, but fails (probably due to some avahi mystery) when LMS is on an ethernet connection.

I'm lost as to how to correct this.

The problem seems to be that the avahi-publish service doesn't work on ethernet ....

Any suggestions?

Mnyb
2014-05-28, 23:26
I've driven myself mad over the last few days (not unusual) installing & reinstalling various images.

The outcome I've determined is that the ShairTunes plugin works perfectly if the LMS server is on a wifi connection, but fails (probably due to some avahi mystery) when LMS is on an ethernet connection.

I'm lost as to how to correct this.

The problem seems to be that the avahi-publish service doesn't work on ethernet ....

Any suggestions?

I may not know a thing here ( very possible ) but the iThing sending this AirTunes would like to mate with something radio based ?
This plugin may be able to make the local wifi adapter do this ,but not the one in your router .

Would a solution be to have the server use both wifi and Ethernet at the same time ? Another quagmire of course :/ you can bind LMS to a certain network adapter if the server got several ( never done it but read about it ) how to get the share tunes stuff to use the wifi dunno ? And make the wifi not also connect to the network ?

epoch1970
2014-05-29, 03:30
I may not know a thing here ( very possible ) but the iThing sending this AirTunes would like to mate with something radio based ?
This plugin may be able to make the local wifi adapter do this ,but not the one in your router .

The few times I've used shairport, and my initial attempt with the plugin were on a machine using a wired interface. I don't know what's going on castalla's machine, but I would bet the issue is related to Avahi's configuration or to the system's. EDIT: or to router's config, as Mnyb suggests.

Avahi-daemon.conf includes "allow-interfaces" and "deny-interfaces" options. I'd look into that (and check the interface's name.)
The other thing I would verify is that the wired interface is on the same network as the wireless ones.

HTH

castalla
2014-05-29, 03:39
The few times I've used shairport, and my initial attempt with the plugin were on a machine using a wired interface. I don't know what's going on castalla's machine, but I would bet the issue is related to Avahi's configuration or to the system. EDIT: or to router's config, as Mnyb suggests.

Avahi-daemon.conf includes "allow-interfaces" and "deny-interfaces" options. I'd look into that (and check the interface's name.)
The other thing I would verify is that the wired interface is on the same network as the wireless ones.

HTH

Thanks.

I'll have a look at the conf file.

Wired and ethernet are on same network.

The router is a Huawei 532 - only basic configuration options.

atca
2014-05-29, 04:00
Thanks.

I'll have a look at the conf file.

Wired and ethernet are on same network.

The router is a Huawei 532 - only basic configuration options.


I've driven myself mad over the last few days (not unusual) installing & reinstalling various images.

The outcome I've determined is that the ShairTunes plugin works perfectly if the LMS server is on a wifi connection, but fails (probably due to some avahi mystery) when LMS is on an ethernet connection.

I'm lost as to how to correct this.

The problem seems to be that the avahi-publish service doesn't work on ethernet ....

Any suggestions?

check config at /etc/avahi/avahi-daemon.conf

suggest you only connect either ethernet or wifi not both.

castalla
2014-05-29, 04:16
Thanks.

I'll have a look at the conf file.

Wired and ethernet are on same network.

The router is a Huawei 532 - only basic configuration options.

I tried allow-interfaces=eth0 in the conf file. Makes no difference.

Grrrr.

atca
2014-05-29, 04:23
firewall on?

castalla
2014-05-29, 07:33
firewall on?

No.

What I have found is that if I connect via wifi but with ethernet also enabled then 2 instances of the airplay speaker appear (the wifi one works - but the ethernet one appears but doesn't connect). If only ethernet is connected then no airplay speakers are available.

epoch1970
2014-05-29, 09:20
sorted now, removed the previos .o build files and re built.

Right. I just met the same problem. The Readme on StuartUSA's page on Github (https://github.com/StuartUSA/shairport_plugin) is a bit quick there.

First, in directory "/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/pre-compiled", check that a prebuilt binary works with your system's architecture by running the binary locally. For example run the command: "./shairport_helper-armel-static"
If you get something like "Exec format error" then look for another binary or get ready to compile from source.
If you get something like "Permission denied" then give the file executable rights, like with "sudo chmod a+x shairport_helper-armel-static" (NB: giving exec rights to "all" is not secure, but that's easy.)
If you get this "FATAL: Must supply AES key and IV!" then it is working ok (the binary is normally called with 2 parameters, without them the program complains and bails out normally.)

Second, if you need to compile from source, instead of running "make" directly, run "make clean" and then "make". Test the end result as above and then copy the binary to a directory such as "/usr/local/bin". (Use command "echo $PATH" to find the list of dirs where the system looks for binaries by default.)


This being said, I took a few hours today to upgrade from 7.6.2 to 7.8.1 which was fast and easy, and from debian 6 to debian 7 (not so thanks to the autistic dependency-based boot system.)
So now I can report the plugin works absolutely great. I will certainly use it regularly to boost the audio out of my iPad.
Thanks a lot for your work!


(below the compile error trace I encountered, just for google indexing)

max:/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/src# make
cc -O2 -Wall -DHAIRTUNES_STANDALONE hairtunes.c alac.o http.o -o shairport_helper -lm -lpthread -lao -lssl -lcrypto
hairtunes.c: In function 'rtp_thread_func':
hairtunes.c:396:15: warning: unused variable 'si_len' [-Wunused-variable]
hairtunes.c: In function 'audio_thread_func':
hairtunes.c:903:17: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'ssize_t' [-Wformat]
hairtunes.c: In function 'http_on_headers_complete':
hairtunes.c:923:9: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'ssize_t' [-Wformat]
hairtunes.c:923:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat]
hairtunes.c: At top level:
hairtunes.c:669:13: warning: 'bf_est_reset' defined but not used [-Wunused-function]
/usr/bin/ld: i386:x86-64 architecture of input file `alac.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `http.o' is incompatible with i386 output
collect2: error: ld returned 1 exit status
make: *** [shairport_helper] Error 1

atca
2014-05-29, 09:24
thats ipv4 and ipv6 showing up rather than wifi and ethernet

atca
2014-05-29, 09:25
i got the same error I'll message you tonight when home to help fix if. it's straightforward to address that.

trans_lux
2014-06-14, 18:44
Hello

Very interested in trying shairport.
I'm running LMS on my Synology NAS.
Anything specific I should be doing beyond the readme on github?
Also should I be concerned about installing and modifying the Synology OS?

thanks
TL

sorenjul
2014-07-19, 06:59
Hi

I'm experienzing something strange. UI had a working setup but had to switch to a new router due to switching to a new service provider. With the new router it doesn't seem to find my squeezebox devices and swapping back to the old old fixes it instantly.

Is there any way I can find out what is different in the new setup? Is it lacking ipv6 or is some packets filtered out?

Regards
Sorenjul

Slackerini
2014-07-31, 22:48
I finally got the Shairtunes plugin running on an old i386 Mac that is running the nightlies of LMS 7.9 and OS X 10.6.8 (Snow Leopard).

I'm a novice in Terminal, but through a bunch of trial and--mostly--error and a lot of googling, I got it running and learned a bit of programming in the process. :)

I installed all the dependencies (ex-avahi) listed on Stuart's readme (which are dependent on installing Xcode with CLI Tools and Homebrew first), but was getting hung up trying to install the plugin from repo via the LMS interface.

After doing some debugging with the server.plugins log turned on, I found that the install.xml file has a Linux platform definition <targetPlatform>Linux</targetPlatform> that needed to be deleted. After deleting that line, the Shairtunes plugin loaded.

Then I had to compile shairport_helper, which also threw me for a loop as the files in /shairport_helper/src/ included the alac and http object files. After deleting the .o files, I was able to compile the executable for OSX and move it into the PATH (usr/bin).

Then, bingo! iOS 7 devices play great sound and no dropout to both hardwired and wireless squeezeboxes.

However, when I try to play via iTunes, I get an error that "The AirPlay device cannot be found on your network." No record in the LMS server.log. Not sure what is going on there, but it could have something to do with the fact that I'm testing it from a rather bleeding edge MacBook Air running the Yosemite Beta and iTunes 12.0. Need to play around on some other machines around the house.

As others have reported, I had to turn off IPv6 and player sync doesn't work. Also, no track info / artwork comes through, but I'm not sure if that is normal or not.

I've attached the helper file compiled for the osx i386 32-bit.

Given I'm a total novice, happy to help cobble together a step-by-step guide for others beginners attempting a Mac install.

/end blog

Kim.T
2014-08-01, 01:23
I finally got the Shairtunes plugin running on an old i386 Mac that is running the nightlies of LMS 7.9 and OS X 10.6.8 (Snow Leopard).
.......

Given I'm a total novice, happy to help cobble together a step-by-step guide for others beginners attempting a Mac install.

/end blog
Nice to see that someone got it running on OSX. When I have time I will give it a try. I guess that being able to use Airplay would make the Squeezebox's even more usable.
Just one question - why did you complie it in 32 bit and not 64 bit ?

Slackerini
2014-08-01, 08:17
why did you complie it in 32 bit and not 64 bit ?

The Mac I'm running as my server is an antique running a 32 bit processor (2GHz Core Duo, with 2GB RAM, running 10.6.8), so 64 bit wasn't an option.

bruinboy
2014-08-01, 08:23
Wonderful!

As I am a complete novice, so if you could post a step by step guide to OSX installation, I'd be forever indebted.

Best,

Scott

Slackerini
2014-08-01, 09:02
Wonderful!

if you could post a step by step guide to OSX installation, I'd be forever indebted.



I'll work on throwing something together. I might try to install it on another Mac I've got that's 64 bit and running Mavericks to see if I can remember what exactly I did.

Also, streaming from iTunes 11.3 on a Mavericks machine works fine, so the issue I was seeing earlier must be with Yosemite or iTunes 12.... Hopefully Apple doesn't break Shairplay functionality with their next round of updates.

Slackerini
2014-08-04, 22:28
I wrote up a detailed tutorial for that walks through the install process. I figured these kind of tutorials have been really helpful to me, might as well finally pay it forward.

In an effort to make sure I actually understood what I was doing, I ended up installing the plugin again on another Mac with a 64-bit x86 processor running OS X Mavericks and LMS 7.9. While I'm not sure I understand everything, the plugin works. Replicable success on different processors and OS version, so I must be doing something right or at least not messing anything up.

Here's a link to the step-by-step instructions, probably in way too much detail:
http://jslack.blogspot.com/2014/08/airplay.html

Also, a link to both the 64 and 32 bit shairtunes_helper files: https://db.tt/XaMijjxb

bruinboy
2014-08-09, 22:09
thanks for that detailed list.

I am SOOO close.

osx mac mini mavericks
lms 7.9
followed your instructions exactly
all terminal applications worked great

stuck at "Plugin failed to load"

any further suggestions to get me over the hump greatly appreciated.

thanks in advance

s

bruinboy
2014-08-10, 09:36
Additional information:

[14-08-10 09:32:06.0148] Slim::bootstrap::tryModuleLoad (286) Warning: Module [Plugins::ShairTunes::Plugin] failed to load:
Can't locate Net/SDP.pm in @INC (@INC contains: /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins/Plugins/CustomScan/lib /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16 /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/lib /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN /Library/PreferencePanes/Squeezebox.prefPane/Contents/server /Library/Application Support/Squeezebox /Users/MacMini/Library/Application Support/Squeezebox /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
BEGIN failed--compilation aborted at /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
Compilation failed in require at (eval 1143) line 2.
BEGIN failed--compilation aborted at (eval 1143) line 2.

Slackerini
2014-08-10, 11:53
Hmmm... From your logfile, it looks like SDP.pm isn't installed correctly.

try reinstalling it in terminal: $ sudo perl -MCPAN -e ‘install Net::SDP’
then type: $which SDP
It should tell you where it's installed

bruinboy
2014-08-10, 22:01
Reinstalled in terminal
then typed $which SDP
got the following message:

sdp: must specify at least one output format using -f.

usage: /Applications/Xcode.app/Contents/Developer/usr/bin/sdp -f{ahmst} [-o directory | file | -] [options...] [file]


Still not yet functional. Log file:

[14-08-10 21:56:28.8062] Slim::bootstrap::tryModuleLoad (286) Warning: Module [Plugins::ShairTunes::Plugin] failed to load:
Can't locate Net/SDP.pm in @INC (@INC contains: /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins/Plugins/CustomScan/lib /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16 /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/lib /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN /Library/PreferencePanes/Squeezebox.prefPane/Contents/server /Library/Application Support/Squeezebox /Users/MacMini/Library/Application Support/Squeezebox /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
BEGIN failed--compilation aborted at /Users/MacMini/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
Compilation failed in require at (eval 1143) line 2.
BEGIN failed--compilation aborted at (eval 1143) line 2.

Slackerini
2014-08-10, 22:50
Getting out of my league....

in terminal try:

$ sudo cpan install Net::SDP

bruinboy
2014-08-11, 15:45
[QUOTE=Slackerini;787676]Getting out of my league....

Thanks for the effort. I'll stay stuck... If you happen to get a flash of insight, I'll continue to periodically check the forums for an answer.

Scott

mentos
2014-08-13, 14:56
Has anyone managed to get this working on a red hat system running LMS? I went through the various perl dependencies and got over those errors, but plugin still fails to load and get the following error:

[14-08-13 22:20:36.1248] main::init (354) Starting Logitech Media Server (v7.7.2, r33893, Wed Mar 14 06:31:06 MDT 2012) perl 5.008008
[14-08-13 22:20:39.2104] Slim::bootstrap::tryModuleLoad (285) Warning: Module [Plugins::ShairTunes::Plugin] failed to load:
Global symbol "$clen" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$clen" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$chall" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$data" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$chall" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$ip" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$ip" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
syntax error at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 261, near "if ($ip =~ /("
(Might be a runaway multi-line // string starting on line 245)
/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm has too many errors.
Compilation failed in require at (eval 984) line 2.
BEGIN failed--compilation aborted at (eval 984) line 2.

[14-08-13 22:20:39.2189] Slim::Utils::PluginManager::load (295) Error: Couldn't load Plugins::ShairTunes::Plugin

mentos
2014-08-14, 14:52
Double checked perl dependencies were up to date:

sudo perl -MCPAN -e 'install Crypt::OpenSSL::RSA'
sudo perl -MCPAN -e 'install HTTP::Message'
sudo perl -MCPAN -e 'install IO::Socket::INET6'
sudo perl -MCPAN -e 'install IO::Socket::SSL'
sudo perl -MCPAN -e 'install Net::SDP'

Also upgraded to 7.8.0, but same result :(

[14-08-14 22:29:47.4963] main::init (368) Starting Logitech Media Server (v7.8.0, 1395409907, Thu Mar 27 13:17:00 PDT 2014) perl 5.008008
[14-08-14 22:29:48.8739] Slim::bootstrap::tryModuleLoad (285) Warning: Module [Plugins::ShairTunes::Plugin] failed to load:
Global symbol "$clen" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$clen" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$resp" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$chall" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$data" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$chall" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$ip" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
Global symbol "$ip" requires explicit package name at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 245.
syntax error at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 261, near "if ($ip =~ /("
(Might be a runaway multi-line // string starting on line 245)
/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm has too many errors.
Compilation failed in require at (eval 906) line 2.
BEGIN failed--compilation aborted at (eval 906) line 2.

[14-08-14 22:29:48.8784] Slim::Utils::PluginManager::load (321) Error: Couldn't load Plugins::ShairTunes::Plugin

mentos
2014-08-15, 08:07
Some more playing around today but just can't get this to work :(

Triple checked dependencies, updated to LMS 7.8 and run the helper to make sure its compiled correctly. Any help would be greatly appreciated :)

castalla
2014-08-15, 08:15
Some more playing around today but just can't get this to work :(

Triple checked dependencies, updated to LMS 7.8 and run the helper to make sure its compiled correctly. Any help would be greatly appreciated :)

The helper program is dependent on processor type. Are you using the correct one?

mentos
2014-08-15, 08:21
The helper program is dependent on processor type. Are you using the correct one?

I compiled it instead of using a prebuilt one, then followed Epoch1970's advice to ensure it was working ->



First, in directory "/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/shairport_helper/pre-compiled", check that a prebuilt binary works with your system's architecture by running the binary locally. For example run the command: "./shairport_helper-armel-static"
If you get something like "Exec format error" then look for another binary or get ready to compile from source.
If you get something like "Permission denied" then give the file executable rights, like with "sudo chmod a+x shairport_helper-armel-static" (NB: giving exec rights to "all" is not secure, but that's easy.)
If you get this "FATAL: Must supply AES key and IV!" then it is working ok (the binary is normally called with 2 parameters, without them the program complains and bails out normally.)


Do the errors from the squeezebox server log indicate a possible issue with the helper? I can try to compile it again, but thought it was fine given the above advice on checking it.

mentos
2014-08-15, 10:35
Compiled helper again with make clean followed by make. Reboot, but same result :(

castalla
2014-08-15, 11:11
Compiled helper again with make clean followed by make. Reboot, but same result :(

So, your helper is okay? This suggests a problem with the plugin. Did you follow all the instructions iin https://github.com/StuartUSA/shairport_plugin/blob/master/README.md

mentos
2014-08-15, 11:31
Yes the helper returns "FATAL: Must supply AES key and IV!" when run directly from a terminal.

I followed everything other then apt-get which won't work on redhat, so used this instead: https://github.com/sancome/shairport/blob/master/INSTALL.md

castalla
2014-08-15, 12:05
Yes the helper returns "FATAL: Must supply AES key and IV!" when run directly from a terminal.

I followed everything other then apt-get which won't work on redhat, so used this instead: https://github.com/sancome/shairport/blob/master/INSTALL.md

No idea - something going awry with make ? Did you do the dpkg line ?

mentos
2014-08-15, 12:10
No idea - something going awry with make ? Did you do the dpkg line ?

That won't work in RedHat either. So I grabbed all the other perl packages:

HTTP::Request
HTTP::Message
Crypt::OpenSSL::RSA
IO::Socket::INET6
Net::SDP

using perl -MCPAN -e 'install

castalla
2014-08-15, 12:24
That won't work in RedHat either. So I grabbed all the other perl packages:

HTTP::Request
HTTP::Message
Crypt::OpenSSL::RSA
IO::Socket::INET6
Net::SDP

using perl -MCPAN -e 'install

Sorry - can't help further.

Change to debian??!!!???

mentos
2014-08-15, 12:29
Sorry - can't help further.

Change to debian??!!!???

Thanks for trying.

The Servers driving my multi room audio system (ceiling speakers dotted around the house) so reluctant to re-install :/ If its down for any length of time I'll get grief.

mentos
2014-08-15, 12:46
As a test removed the "use strict" from Plugin.pm file, but still gets stuck at:

[14-08-15 20:43:43.2045] main::init (368) Starting Logitech Media Server (v7.8.0, 1395409907, Thu Mar 27 13:17:00 PDT 2014) perl 5.008008
[14-08-15 20:43:43.9961] Slim::Utils::Misc::msg (1311) Warning: [20:43:43.9956] Scalar found where operator expected at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 260, near ")$/"
[14-08-15 20:43:43.9965] Slim::Utils::Misc::msg (1311) Warning: [20:43:43.9963](Missing operator before $/?)
[14-08-15 20:43:43.9968] Slim::bootstrap::tryModuleLoad (285) Warning: Module [Plugins::ShairTunes::Plugin] failed to load:
syntax error at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 260, near "if ($ip =~ /("
(Might be a runaway multi-line // string starting on line 244)
syntax error at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 260, near "+)"
Compilation failed in require at (eval 902) line 2.
BEGIN failed--compilation aborted at (eval 902) line 2.

Also now asking for password when using service squeezeboxserver stop to stop LMS :/

bpa
2014-08-15, 14:12
I can'rt remember my perl very well but the compiler is flagging line 245 of Plugin.pm and you seem to be running an oldish version of Perl



my $clen = $req->header('content-length') // 0;


"//" means Logical OR but in older versions of Perl "//" is not supported as logical OR only "||"

I suggest editing Plugin.pm and changing // to || and see if it works.

edit:

Just checked in Perl 5.10 "//" is new and the defined OR operator so the correct version of 245 for Perl 5.8
my $clen = defined($req->header('content-length')) ? $req->header('content-length') : 0;

mentos
2014-08-16, 02:58
I can'rt remember my perl very well but the compiler is flagging line 245 of Plugin.pm and you seem to be running an oldish version of Perl



my $clen = $req->header('content-length') // 0;


"//" means Logical OR but in older versions of Perl "//" is not supported as logical OR only "||"

I suggest editing Plugin.pm and changing // to || and see if it works.

edit:

Just checked in Perl 5.10 "//" is new and the defined OR operator so the correct version of 245 for Perl 5.8
my $clen = defined($req->header('content-length')) ? $req->header('content-length') : 0;

You're a star :D

I modified that line and the plugin has now loaded. I was dreading having to brush up on some perl :/

I'm not seeing it as an airplay device on my iDevices though, but I imagine its probably firewall or some network config problem. They're all iOS devices, so I assume IPV6 being on in Avahi.conf isn't the problem. But i'll have a fiddle and see if I can solve it.

mentos
2014-08-16, 03:23
Disabled firewall and toggled IPV6 to off in avahi-conf but that didn't resolve it. Then checked netstat to see if shair had grabbed and port and nothing :/

castalla
2014-08-16, 03:25
You're a star :D

I modified that line and the plugin has now loaded. I was dreading having to brush up on some perl :/

I'm not seeing it as an airplay device on my iDevices though, but I imagine its probably firewall or some network config problem. They're all iOS devices, so I assume IPV6 being on in Avahi.conf isn't the problem. But i'll have a fiddle and see if I can solve it.

What a great call by bpa !!!

AFAIK, you only see players connected to LMS as airplay devices - not LMS as the airplay device. If that's what you mean?

mentos
2014-08-16, 03:34
Also see the following error in the SBS server log:

[14-08-16 11:29:12.7846] main::init (368) Starting Logitech Media Server (v7.8.0, 1395409907, Thu Mar 27 13:17:00 PDT 2014) perl 5.008008
[14-08-16 11:29:42.1752] Slim::Web::Cometd::handler (201) Invalid request without clientId - discarding remaining requests in packet

Also should have mentioned the players are 4 x SqueezeSlaves Version 7. I.E Software players running on the LMS outputting to USB sound card (one for each player).

mentos
2014-08-16, 03:37
What a great call by bpa !!!

AFAIK, you only see players connected to LMS as airplay devices - not LMS as the airplay device. If that's what you mean?

I don't see any Airplay devices show up on any of my iDevices. And under netstat I don't see Shairplay. I currently don't have any physical players. As everything is co-located, for consistency (to ensure syncing worked well, etc) I removed the receiver I had and switched that to a soft player aswell.

mentos
2014-08-16, 03:48
Ok a little more info, tried to restart avahi-daemon and got errors for the two entries under "publish":

Starting Avahi daemon... Invalid configuration key "publish-a-on-ipv6" in group "publish"
Starting Avahi daemon... Invalid configuration key "publish-aaaa-on-ipv4" in group "publish"

Commented them out and it started, but assume they are needed as still can't see any devices advertised or any entries under netstat

castalla
2014-08-16, 04:15
Ok a little more info, tried to restart avahi-daemon and got errors for the two entries under "publish":

Starting Avahi daemon... Invalid configuration key "publish-a-on-ipv6" in group "publish"
Starting Avahi daemon... Invalid configuration key "publish-aaaa-on-ipv4" in group "publish"

Commented them out and it started, but assume they are needed as still can't see any devices advertised or any entries under netstat

Are you using the modified avahi-daemon.conf file ? Try with just IPV4 enabled?

mentos
2014-08-16, 04:19
Yes I modified it to match whats posted here: https://github.com/StuartUSA/shairport_plugin

Tried with and without IPV6

Doesn't seem to like those publish entries

castalla
2014-08-16, 05:10
Yes I modified it to match whats posted here: https://github.com/StuartUSA/shairport_plugin

Tried with and without IPV6

Doesn't seem to like those publish entries

Not much help - but encountered similar problem ages ago. I sadly can't recall if it was down to the wrong helper or because I failed to install the libnet-perl package.

mentos
2014-08-16, 05:17
Not much help - but encountered similar problem ages ago. I sadly can't recall if it was down to the wrong helper or because I failed to install the libnet-perl package.

Gives me something to look at. I compiled the helper, and tested it by running it directly, so "think" the helper is ok.

castalla
2014-08-16, 07:05
Gives me something to look at. I compiled the helper, and tested it by running it directly, so "think" the helper is ok.

Problem is too many variables!

Old perl, compiled helper, dependencies?!

Still agin' debian?

mentos
2014-08-16, 10:20
Problem is too many variables!

Old perl, compiled helper, dependencies?!

Still agin' debian?

I'd need to compile the helper either way I think, its and atom PC and none of the precompiled helpers worked on it.

I might consider updating perl. Reluctant to reinstall the system though, as it was fiddly getting all the SqueezePlay instances working and many people have had problems with sync between soft players which I don't have, they all sync perfectly right now.

castalla
2014-08-16, 10:46
I'd need to compile the helper either way I think, its and atom PC and none of the precompiled helpers worked on it.



I might consider updating perl. Reluctant to reinstall the system though, as it was fiddly getting all the SqueezePlay instances working and many people have had problems with sync between soft players which I don't have, they all sync perfectly right now.
-

Hang on - I've got a 386 helper which runs on an atom processor ....

mentos
2014-08-16, 10:52
-

Hang on - I've got a 386 helper which runs on an atom processor ....

I tried all the ones in the pre compiled directory, none of them ran. The one I compiled ran without a problem. Which one are you using from the pre-compiled directory, I can give it another try?

castalla
2014-08-16, 10:57
I tried all the ones in the pre compiled directory, none of them ran. The one I compiled ran without a problem.

Try these:

I use the static one

mentos
2014-08-16, 11:01
Try these:

I use the static one

Thanks :) I'll give it a shot.

I took a look at the avahi-daemon.conf file and interestingly the two entries that gave me trouble are commented out in your file:

#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

Is that the file you use on your working system?

castalla
2014-08-16, 11:11
Thanks :) I'll give it a shot.

I took a look at the avahi-daemon.conf file and interestingly the two entries that gave me trouble are commented out in your file:

#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

Is that the file you use on your working system?

Using this:



[server]
use-ipv4=yes
use-ipv6=no #if you have ios7 devices change to yes

[wide-area]
enable-wide-area=yes

[publish]
publish-aaaa-on-ipv4=no
publish-a-on-ipv6=no

[reflector]

[rlimits]
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=300
rlimit-stack=4194304
rlimit-nproc=3

mentos
2014-08-16, 11:40
Tried both of them and neither works on my system:

./shairport_helper-i386: error while loading shared libraries: libao.so.4: cannot open shared object file: No such file or directory

./shairport_helper-i386-static
FATAL: kernel too old
Segmentation fault

The one I compiled does appear to run correctly, according to the expected result for a working helper posted earlier in this thread:

./shairport_helper
FATAL: Must supply AES key and IV!

castalla
2014-08-16, 11:45
Tried both of them and neither works on my system:

./shairport_helper-i386: error while loading shared libraries: libao.so.4: cannot open shared object file: No such file or directory

./shairport_helper-i386: error while loading shared libraries: libao.so.4: cannot open shared object file: No such file or directory

The one I compiled does appear to run correctly, according to the expected result for a working helper posted earlier in this thread:

./shairport_helper
FATAL: Must supply AES key and IV!

Err .... you did rename your shairport-helper to helper in /usr/local/bin?

mentos
2014-08-16, 11:52
Err .... you did rename your shairport-helper to helper in /usr/local/bin?

Yes :), but to test them all I named them so I knew what they were and ran them from the CLI just to see if they work. The one that worked (compiled one) I copied to shairport_helper as per instructions.

Also I backed up and deleted the avahi-daemon.conf file, created a new one and copied and pasted the contents as stated by you and here (just to be sure there was no typo):

https://github.com/StuartUSA/shairport_plugin

Still doesn't like it:

sudo service avahi-daemon restart
Shutting down Avahi daemon: Failed to kill daemon: No such file or directory
[FAILED]
Starting Avahi daemon... Invalid configuration key "publish-a-on-ipv6" in group "publish"

[FAILED]

castalla
2014-08-16, 11:57
Yes :), but to test them all I named them so I knew what they were and ran them from the CLI just to see if they work. The one that worked (compiled one) I copied to shairport_helper as per instructions.

Also I backed up and deleted the avahi-daemon.conf file, created a new one and copied and pasted the contents as stated by you and here (just to be sure there was no typo):

https://github.com/StuartUSA/shairport_plugin

Still doesn't like it:

sudo service avahi-daemon restart
Shutting down Avahi daemon: Failed to kill daemon: No such file or directory
[FAILED]
Starting Avahi daemon... Invalid configuration key "publish-a-on-ipv6" in group "publish"

[FAILED]

So, looks like it's down to differences in apt-get install and dpkg instructions (and perl)! No further forward.

bpa
2014-08-16, 12:31
sudo service avahi-daemon restart
Shutting down Avahi daemon: Failed to kill daemon: No such file or directory
[FAILED]
Starting Avahi daemon... Invalid configuration key "publish-a-on-ipv6" in group "publish"

[FAILED]

Could this be another version issue ? (e..g ipv6 support may not be installed on some old older Linux )

What OS and version are you running ?
What version of avahi daemon is installed ?
How did you install avahi-daemon ?

mentos
2014-08-16, 12:43
Could this be another version issue ? (e..g ipv6 support may not be installed on some old older Linux )

What OS and version are you running ?

cat /etc/redhat-release
CentOS release 5.6 (Final)

I had to enable IPV6 to ensure INET6 perl module would install



What version of avahi daemon is installed ?

avahi-daemon -V
avahi-daemon 0.6.16



How did you install avahi-daemon ?

Good question, I've been messing around with this so much, I can't remember if it was already there, or I installed it as part of this process :/

mentos
2014-08-16, 13:11
Also checked messages and provided I comment out those two entries in the conf file Avahi seems to start up ok.

bpa
2014-08-16, 15:11
Also checked messages and provided I comment out those two entries in the conf file Avahi seems to start up ok.

I did a check on the avahi-daemon source source - the ""publish-a-on-ipv6" is in 0.6.30 but not in 0.6.16

Also there is no "publish-aaaa-on-ipv4" - so you may need to check all settings

The code for handling the settings in "[publish]" section in 0.6.16



if (strcasecmp(p->key, "publish-addresses") == 0)
c->server_config.publish_addresses = is_yes(p->value);
else if (strcasecmp(p->key, "publish-hinfo") == 0)
c->server_config.publish_hinfo = is_yes(p->value);
else if (strcasecmp(p->key, "publish-workstation") == 0)
c->server_config.publish_workstation = is_yes(p->value);
else if (strcasecmp(p->key, "publish-domain") == 0)
c->server_config.publish_domain = is_yes(p->value);
else if (strcasecmp(p->key, "publish-resolv-conf-dns-servers") == 0)
c->publish_resolv_conf = is_yes(p->value);
else if (strcasecmp(p->key, "disable-publishing") == 0)
c->server_config.disable_publishing = is_yes(p->value);
else if (strcasecmp(p->key, "disable-user-service-publishing") == 0)
c->disable_user_service_publishing = is_yes(p->value);
else if (strcasecmp(p->key, "add-service-cookie") == 0)
c->server_config.add_service_cookie = is_yes(p->value);
else if (strcasecmp(p->key, "publish-dns-servers") == 0) {
avahi_strfreev(c->publish_dns_servers);
c->publish_dns_servers = avahi_split_csv(p->value);
} else {
avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
goto finish;

mentos
2014-08-17, 01:49
I did a check on the avahi-daemon source source - the ""publish-a-on-ipv6" is in 0.6.30 but not in 0.6.16

Also there is no "publish-aaaa-on-ipv4" - so you may need to check all settings

The code for handling the settings in "[publish]" section in 0.6.16



if (strcasecmp(p->key, "publish-addresses") == 0)
c->server_config.publish_addresses = is_yes(p->value);
else if (strcasecmp(p->key, "publish-hinfo") == 0)
c->server_config.publish_hinfo = is_yes(p->value);
else if (strcasecmp(p->key, "publish-workstation") == 0)
c->server_config.publish_workstation = is_yes(p->value);
else if (strcasecmp(p->key, "publish-domain") == 0)
c->server_config.publish_domain = is_yes(p->value);
else if (strcasecmp(p->key, "publish-resolv-conf-dns-servers") == 0)
c->publish_resolv_conf = is_yes(p->value);
else if (strcasecmp(p->key, "disable-publishing") == 0)
c->server_config.disable_publishing = is_yes(p->value);
else if (strcasecmp(p->key, "disable-user-service-publishing") == 0)
c->disable_user_service_publishing = is_yes(p->value);
else if (strcasecmp(p->key, "add-service-cookie") == 0)
c->server_config.add_service_cookie = is_yes(p->value);
else if (strcasecmp(p->key, "publish-dns-servers") == 0) {
avahi_strfreev(c->publish_dns_servers);
c->publish_dns_servers = avahi_split_csv(p->value);
} else {
avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
goto finish;


Thank you so much.

Its strange, as the conf file in the avahi directory had "publish-aaaa-on-ipv4" and "publish-a-on-ipv6", it was just commented out. Thats why I didn't think to check if it was supported in my version, I guess something/someone must have updated the conf file at some point :/

Given those publish entries don't exist, i'd assume there is no need to explicitly turn them off in 6.16. All the other options in the conf file work fine and the daemon starts once the offending publish entries are commented out. Wondering wether I should try and get 0.6.30 working on this system, just in case there is some other issue which isn't throwing up a log entry. Think I'll first go back and double check firewall etc, just in case its a simple issue i've missed.

bpa
2014-08-17, 01:57
Thank you so much.

Its strange, as the conf file in the avahi directory had "publish-aaaa-on-ipv4" and "publish-a-on-ipv6", it was just commented out. Thats why I didn't think to check if it was supported in my version (otherwise why would it be in the conf file). I'll have to update it to 0.6.30, but guess i'll have to do it manually as yum returns it as up to date :/

The package is up to date as that was the last supported version for your distro.

You may have problem manually updating some packages as the newer version may ultimately depend on features in a later version of your distro and kernel (e.g. default IPV6 support) or possibly compiler/build tools and so your updating will be stopped.

It might be easier first to see if you can make the supported versions work rather than get on the merrygoround of updating packages.

mentos
2014-08-17, 02:43
The package is up to date as that was the last supported version for your distro.

You may have problem manually updating some packages as the newer version may ultimately depend on features in a later version of your distro and kernel (e.g. default IPV6 support) or possibly compiler/build tools and so your updating will be stopped.

It might be easier first to see if you can make the supported versions work rather than get on the merrygoround of updating packages.

I think you're probably right. I would just reinstall the system, but I recall it took some messing around to get the Squeezeplay instances set up and working seamlessly. Now I'm used to perfect sync between players, I don't want to risk breaking that. The Mrs likes to sync the entire house when she's doing her clean, so it wouldn't be long before I'd "hear" about it, should I break player sync.

mentos
2014-08-17, 08:00
Oh dear :(

I updated perl using yum and appear to have broken the SBS :(

Starting Squeezebox Server: Attempt to free unreferenced scalar: SV 0x9a7ce9c, Perl interpreter: 0x99ad008 at /usr/lib/perl5/5.8.8/FindBin.pm line 101.
bash: line 1: 3668 Segmentation fault /usr/libexec/squeezeboxserver --daemon --prefsdir=/var/lib/squeezeboxserver/prefs --logdir=/var/log/squeezeboxserver --cachedir=/var/lib/squeezeboxserver/cache --charset=utf8

bpa
2014-08-17, 10:43
Oh dear :(

I updated perl using yum and appear to have broken the SBS :(

Starting Squeezebox Server: Attempt to free unreferenced scalar: SV 0x9a7ce9c, Perl interpreter: 0x99ad008 at /usr/lib/perl5/5.8.8/FindBin.pm line 101.
bash: line 1: 3668 Segmentation fault /usr/libexec/squeezeboxserver --daemon --prefsdir=/var/lib/squeezeboxserver/prefs --logdir=/var/log/squeezeboxserver --cachedir=/var/lib/squeezeboxserver/cache --charset=utf8

I hope you took a backup and can revert !
You used to be on Perl 5.8.8 and this log says you are still on 5.8.8 so either update failed or it went wrong.

I think you should go back, as forward could be a slippery slope probably leading to a full reinstall.

I have used this plugin but AFAICT the problem was in the support applications and not the version of Perl so updating Perl would not have fixed the issue..

mentos
2014-08-17, 11:08
rpm -qa --last | more

returns

perl-5.8.8-41.el5 Sat 16 Aug 2014 08:18:40 PM BST
openssl-devel-0.9.8e-27.el5_10.4 Fri 15 Aug 2014 07:25:42 PM BST
openssl-0.9.8e-27.el5_10.4 Fri 15 Aug 2014 07:25:35 PM BST
logitechmediaserver-7.8.0-1 Thu 14 Aug 2014 10:08:52 PM BST
.........
.............

It was definitely working after the update to LMS 7.8.0

I was double checking the Perl Dependencies needed for Shairtunes were all up to date and stupidly update perl aswell. Its still 5.8.8 but -41 now.

yum downgrade perl

returns

Only Upgrade available on package: 4:perl-5.8.8-41.el5.i386

:(

No yum history on Centos 5.6 :(

mentos
2014-08-17, 11:49
Posted in the general Linux section also to see if anyone can help. <fingers crossed>

mentos
2014-08-20, 11:09
For the benefit of anyone that may end up here from a google search on the same perl issue, I've posted what I did to resolve it here aswell:


Fixed, well atleast the server is able to perform the only task it has :/

I moved the current perl directory 5.8.8 to 5.8.8.bak. Then I did a yum reinstall perl.

Thought I'd have to setup LMS, as when I opened webgui it ran me through setup process. But actually it found everything, only thing I had to do was name my squeezeslave players again.

Shairtunes is still not working, plugin is loaded, but don't see anything on my iDevices. But main thing is LMS is working (fingers crossed nothing creeps up) and therefore multi room Audio is working again and therefore my wife will stop bugging me :)

castalla
2014-08-20, 11:26
Shairtunes is still not working, plugin is loaded, but don't see anything on my iDevices. But main thing is LMS is working (fingers crossed nothing creeps up) and therefore multi room Audio is working again and therefore my wife will stop bugging me :)

So, no errors .... ? Just no devices showing?

I saw this under 2 situations:

1. Wrong helper program

2. Correct helper program but not flagged as executable

mentos
2014-08-20, 12:04
So, no errors .... ? Just no devices showing?

I saw this under 2 situations:

1. Wrong helper program

2. Correct helper program but not flagged as executable

No errors, can't see the Airplay icon show up on an of my iDevices (iPhone 5, iPhone 5s, iPad, iTunes on rMBP).


-rwxr-xr-x 1 root root 41160 Aug 16 19:38 shairport_helper

Running shairport_helper locally seems to suggest its working.

service status returns:


Avahi daemon is running
Avahi DNS daemon is not running

Any other services I should check for, related to ShairPlay?

bpa
2014-08-20, 12:29
What is in the log file when you enable plugin.shairplay to DEBUG ?

You should have plugin.shairplay to DEBUG set and set so that it is set at LMS startup (i.e. so that plugin initialisation is logged). Then restart LMS.

Check that port are being listened to (i.e. use netstat)
Check using "ps" that you have processes running "avahi-publish-service", "dns-sd" and "DNSPublish"

Try to set up Airplay. Then stop LMS and look at log file.

castalla
2014-08-20, 12:36
No errors, can't see the Airplay icon show up on an of my iDevices (iPhone 5, iPhone 5s, iPad, iTunes on rMBP).


-rwxr-xr-x 1 root root 41160 Aug 16 19:38 shairport_helper

Running shairport_helper locally seems to suggest its working.

service status returns:


Avahi daemon is running
Avahi DNS daemon is not running

Any other services I should check for, related to ShairPlay?

There's another situation where it didn't work. There are static and dynamic versions of the helper.

My setup only works with the static version.

From the size of your helper program - it looks like you have a dynamic version. (???)

mentos
2014-08-20, 13:12
What is in the log file when you enable plugin.shairplay to DEBUG ?

You should have plugin.shairplay to DEBUG set and set so that it is set at LMS startup (i.e. so that plugin initialisation is logged). Then restart LMS.

Check that port are being listened to (i.e. use netstat)
Check using "ps" that you have processes running "avahi-publish-service", "dns-sd" and "DNSPublish"

Try to set up Airplay. Then stop LMS and look at log file.

How do I setup plugin debug? Is it through the GUI or command line? Had a quick google but didn't see any obvious instructions, I'll take another look now though.

mentos
2014-08-20, 13:13
There's another situation where it didn't work. There are static and dynamic versions of the helper.

My setup only works with the static version.

From the size of your helper program - it looks like you have a dynamic version. (???)

I had to compile the helper, seems to run but not sure how i'd compile a "static" helper.

bpa
2014-08-20, 13:15
How do I setup plugin debug? Is it through the GUI or command line? Had a quick google but didn't see any obvious instructions, I'll take another look now though.

WebGUI Settings/Advanced/Logging

mentos
2014-08-20, 13:38
Also I see avahi-daemon is listening:

netstat -lnp | grep avahi-daemon
udp 0 0 0.0.0.0:5353 0.0.0.0:* 3614/avahi-daemon
udp 0 0 0.0.0.0:45179 0.0.0.0:* 3614/avahi-daemon
udp 0 0 :::57895 :::* 3614/avahi-daemon
unix 2 [ ACC ] STREAM LISTENING 13737 3614/avahi-daemon /var/run/avahi-daemon/socket

Anything else I should check under netstat?


Checking with ps -A I don't see "avahi-publish-service", "dns-sd" and "DNSPublish", I only see:

3614 ? 00:00:00 avahi-daemon
3615 ? 00:00:00 avahi-daemon

Should there be two instance of it?

mentos
2014-08-20, 13:39
WebGUI Settings/Advanced/Logging

Doh, checked there but missed the little drop down box :o

This is the output of the server.log with debug enabled on Shairtunes plugin:

[14-08-20 21:44:41.3459] main::init (368) Starting Logitech Media Server (v7.8.0, 1395409907, Thu Mar 27 13:17:00 PDT 2014) perl 5.008008
[14-08-20 21:44:45.2134] Plugins::ShairTunes::Plugin::initPlugin (45) Initialising 0.23.6
[14-08-20 21:44:45.2353] Plugins::SrvrPowerCtrl::Settings::new (209) Server Power Control, version 20120427.163654, is running on sbs version 7.8.0 on unix:RedHat, mac
[14-08-20 21:44:47.5737] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=bedroom2 Room
[14-08-20 21:44:50.9337] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
[14-08-20 21:44:55.3240] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=bedroom1 Room
[14-08-20 21:44:56.9334] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
[14-08-20 21:45:02.9285] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
[14-08-20 21:45:05.0651] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Main Bathroom
[14-08-20 21:45:16.4999] Plugins::ShairTunes::Plugin::playerSubscriptionCha nge (65) request=client new client=Living Room

castalla
2014-08-20, 13:50
Also I see avahi-daemon is listening:

netstat -lnp | grep avahi-daemon
udp 0 0 0.0.0.0:5353 0.0.0.0:* 3614/avahi-daemon
udp 0 0 0.0.0.0:45179 0.0.0.0:* 3614/avahi-daemon
udp 0 0 :::57895 :::* 3614/avahi-daemon
unix 2 [ ACC ] STREAM LISTENING 13737 3614/avahi-daemon /var/run/avahi-daemon/socket

Anything else I should check under netstat?


Checking with ps -A I don't see "avahi-publish-service", "dns-sd" and "DNSPublish", I only see:

3614 ? 00:00:00 avahi-daemon
3615 ? 00:00:00 avahi-daemon

Should there be two instance of it?

On my system there are two avahi-daemons BUT also avahi-publish-service.

Again, I recall a similar situation with no publish process- but I can't recall how I solved it (damn).

That's definitely the reason the devices aren't appearing,

bpa
2014-08-20, 15:23
Accord to plugin code if request was for "client new" then the following two routines will be executed


sub createListenPort()
{
my $port = 5123;
my $listen;

$listen = new IO::Socket::INET6(Listen => 1,
Domain => AF_INET6,
ReuseAddr => 1,
Proto => 'tcp' );

$listen ||= new IO::Socket::INET(Listen => 1,
ReuseAddr => 1,
Proto => 'tcp' );

return $listen
}

sub publishPlayer()
{
my ($apname, $password, $port) = @_;

my $pid = fork();

my $pw_clause = (length $password) ? "pw=true" : "pw=false";
my @hw_addr = +(map(ord, split(//, md5($apname))))[0..5];

if ($pid==0) {
{ exec 'avahi-publish-service',
join('', map { sprintf "%02X", $_ } @hw_addr) . "\@$apname",
"_raop._tcp",
$port,
"tp=UDP","sm=false","sv=false","ek=1","et=0,1","cn=0,1","ch=2","ss=16","sr=44100",$pw_clause,"vn=3","txtvers=1"; };
{ exec 'dns-sd', '-R',
join('', map { sprintf "%02X", $_ } @hw_addr) . "\@$apname",
"_raop._tcp",
".",
$port,
"tp=UDP","sm=false","sv=false","ek=1","et=0,1","cn=0,1","ch=2","ss=16","sr=44100",$pw_clause,"vn=3","txtvers=1"; };
{ exec 'mDNSPublish',
join('', map { sprintf "%02X", $_ } @hw_addr) . "\@$apname",
"_raop._tcp",
$port,
"tp=UDP","sm=false","sv=false","ek=1","et=0,1","cn=0,1","ch=2","ss=16","sr=44100",$pw_clause,"vn=3","txtvers=1"; };
die "could not run avahi-publish-service nor dns-sd nor mDNSPublish";
}

return $pid


This tells me that a TCP listen will be opened on port 5123 and that 3 processes will be "exec"

do a netstat for port 5123 - don't grep as you are probably filtering out useful stuff - look at it all.



What "ps" command are you using - I use "ps aux" - you may need to run as root.

If there are no other log messages ( I assume you haven't edited the log and not shown some message ) then there is no connection from Airplay to LMS as connection on port 5123 should have happened and this part of the problem.

mentos
2014-08-21, 05:03
This is the output of ps aux:




[root@sbs ~]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.4 0.0 2176 676 ? Ss 12:45 0:00 init [3]
root 2 0.0 0.0 0 0 ? S< 12:45 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN 12:45 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S< 12:45 0:00 [watchdog/0]
root 5 0.0 0.0 0 0 ? S< 12:45 0:00 [events/0]
root 6 0.0 0.0 0 0 ? S< 12:45 0:00 [khelper]
root 7 0.0 0.0 0 0 ? S< 12:45 0:00 [kthread]
root 10 0.0 0.0 0 0 ? S< 12:45 0:00 [kblockd/0]
root 11 0.0 0.0 0 0 ? S< 12:45 0:00 [kacpid]
root 185 0.0 0.0 0 0 ? S< 12:45 0:00 [cqueue/0]
root 188 0.0 0.0 0 0 ? S< 12:45 0:00 [khubd]
root 190 0.0 0.0 0 0 ? S< 12:45 0:00 [kseriod]
root 257 0.0 0.0 0 0 ? S 12:45 0:00 [khungtaskd]
root 258 0.0 0.0 0 0 ? S 12:45 0:00 [pdflush]
root 259 0.0 0.0 0 0 ? S 12:45 0:00 [pdflush]
root 260 0.0 0.0 0 0 ? S< 12:45 0:00 [kswapd0]
root 261 0.0 0.0 0 0 ? S< 12:45 0:00 [aio/0]
root 413 0.0 0.0 0 0 ? S< 12:45 0:00 [kpsmoused]
root 437 0.0 0.0 0 0 ? S< 12:45 0:00 [ata/0]
root 438 0.0 0.0 0 0 ? S< 12:45 0:00 [ata_aux]
root 441 0.0 0.0 0 0 ? S< 12:46 0:00 [scsi_eh_0]
root 442 0.0 0.0 0 0 ? S< 12:46 0:00 [scsi_eh_1]
root 443 0.0 0.0 0 0 ? S< 12:46 0:00 [scsi_eh_2]
root 444 0.0 0.0 0 0 ? S< 12:46 0:00 [scsi_eh_3]
root 445 0.0 0.0 0 0 ? S< 12:46 0:00 [scsi_eh_4]
root 446 0.0 0.0 0 0 ? S< 12:46 0:00 [scsi_eh_5]
root 449 0.0 0.0 0 0 ? S< 12:46 0:00 [scsi_eh_6]
root 450 0.0 0.0 0 0 ? S< 12:46 0:00 [usb-storage]
root 454 0.0 0.0 0 0 ? S< 12:46 0:00 [kstriped]
root 463 0.0 0.0 0 0 ? S< 12:46 0:00 [ksnapd]
root 474 0.0 0.0 0 0 ? S< 12:46 0:00 [kjournald]
root 499 0.0 0.0 0 0 ? S< 12:46 0:00 [kauditd]
root 532 1.0 0.0 2408 744 ? S<s 12:46 0:00 /sbin/udevd -d
root 867 0.0 0.0 0 0 ? S< 12:46 0:00 [hd-audio0]
root 1884 0.0 0.0 0 0 ? S< 12:46 0:00 [kmpathd/0]
root 1885 0.0 0.0 0 0 ? S< 12:46 0:00 [kmpath_handler]
root 1942 0.0 0.0 0 0 ? S< 12:46 0:00 [kjournald]
root 2046 0.0 0.0 0 0 ? S< 12:46 0:00 [iscsi_eh]
root 2079 0.0 0.0 0 0 ? S< 12:46 0:00 [cnic_wq]
root 2082 0.0 0.0 0 0 ? S< 12:46 0:00 [bnx2i_thread/0]
root 2094 0.0 0.0 0 0 ? S< 12:46 0:00 [ib_addr]
root 2101 0.0 0.0 0 0 ? S< 12:46 0:00 [ib_mcast]
root 2102 0.0 0.0 0 0 ? S< 12:46 0:00 [ib_inform]
root 2103 0.0 0.0 0 0 ? S< 12:46 0:00 [local_sa]
root 2106 0.0 0.0 0 0 ? S< 12:46 0:00 [iw_cm_wq]
root 2110 0.0 0.0 0 0 ? S< 12:46 0:00 [ib_cm/0]
root 2112 0.0 0.0 0 0 ? S< 12:46 0:00 [rdma_cm]
root 2128 0.0 1.2 22520 22512 ? S<Lsl 12:46 0:00 iscsiuio
root 2133 0.0 0.0 2372 468 ? Ss 12:46 0:00 iscsid
root 2134 0.0 0.1 2836 2832 ? S<Ls 12:46 0:00 iscsid
root 2465 0.0 0.0 12652 752 ? S<sl 12:46 0:00 auditd
root 2467 0.0 0.0 12184 684 ? S<sl 12:46 0:00 /sbin/audispd
root 2497 0.0 0.0 1832 580 ? Ss 12:46 0:00 syslogd -m 0
root 2500 0.0 0.0 1780 404 ? Ss 12:46 0:00 klogd -x
root 2540 0.0 0.0 0 0 ? S< 12:46 0:00 [kondemand/0]
root 2599 0.0 0.0 0 0 ? S< 12:46 0:00 [rpciod/0]
root 2606 0.0 0.0 2352 488 ? Ss 12:46 0:00 rpc.idmapd
dbus 2636 0.0 0.0 2868 868 ? Ss 12:46 0:00 dbus-daemon --sy
root 2650 0.0 0.0 1776 528 ? Ss 12:46 0:00 /usr/sbin/acpid
68 2663 2.6 0.2 6700 4772 ? Ss 12:46 0:01 hald
root 2665 0.0 0.0 3280 1096 ? S 12:46 0:00 hald-runner
68 2672 0.0 0.0 2124 820 ? S 12:46 0:00 hald-addon-acpi:
68 2673 0.0 0.0 2124 812 ? S 12:46 0:00 hald-addon-keybo
68 2676 0.0 0.0 2124 812 ? S 12:46 0:00 hald-addon-keybo
68 2679 0.0 0.0 2124 812 ? S 12:46 0:00 hald-addon-keybo
68 2685 0.0 0.0 2124 816 ? S 12:46 0:00 hald-addon-keybo
root 2695 0.0 0.0 2076 676 ? S 12:46 0:00 hald-addon-stora
root 2728 0.0 0.0 2024 460 ? Ss 12:46 0:00 /usr/bin/hidd --
root 2766 0.0 0.0 25340 1336 ? Ssl 12:46 0:00 automount --pid-
root 2790 0.0 0.0 7328 1048 ? Ss 12:46 0:00 /usr/sbin/sshd
root 2811 0.1 0.1 10340 3024 ? Ss 12:47 0:00 sshd: root@pts/0
ntp 2815 0.0 0.2 4532 4528 ? SLs 12:47 0:00 ntpd -u ntp:ntp
root 2838 0.0 0.0 9404 1696 ? Ss 12:47 0:00 sendmail: accept
smmsp 2846 0.0 0.0 8312 1516 ? Ss 12:47 0:00 sendmail: Queue
root 2860 0.1 0.0 4784 1520 pts/0 Ss 12:47 0:00 -bash
101 2886 8.7 4.5 93792 82228 ? Ss 12:47 0:03 /usr/bin/perl /u
root 2899 0.0 0.0 2016 480 ? Ss 12:47 0:00 gpm -m /dev/inpu
root 2912 0.0 0.0 5400 1100 ? Ss 12:47 0:00 crond
root 2987 0.3 0.0 51520 1632 ? Ssl 12:47 0:00 /usr/bin/squeeze
root 3182 0.4 0.0 51520 1632 ? Ssl 12:47 0:00 /usr/bin/squeeze
root 3338 0.4 0.0 51520 1628 ? Ssl 12:47 0:00 /usr/bin/squeeze
root 3493 1.1 0.0 51520 1628 ? Ssl 12:47 0:00 /usr/bin/squeeze
root 3548 0.0 0.0 2376 432 ? Ss 12:47 0:00 /usr/sbin/atd
avahi 3616 0.1 0.0 2716 1296 ? Ss 12:47 0:00 avahi-daemon: ru
avahi 3617 0.0 0.0 2716 444 ? Ss 12:47 0:00 avahi-daemon: ch
root 3645 0.0 0.0 3784 624 ? S 12:47 0:00 /usr/sbin/smartd
root 3656 0.0 0.0 1764 464 tty1 Ss+ 12:47 0:00 /sbin/mingetty t
root 3657 0.0 0.0 1764 464 tty2 Ss+ 12:47 0:00 /sbin/mingetty t
root 3658 0.0 0.0 1764 464 tty3 Ss+ 12:47 0:00 /sbin/mingetty t
root 3659 0.0 0.0 1764 468 tty4 Ss+ 12:47 0:00 /sbin/mingetty t
root 3660 0.0 0.0 1764 464 tty5 Ss+ 12:47 0:00 /sbin/mingetty t
root 3661 0.0 0.0 1764 468 tty6 Ss+ 12:47 0:00 /sbin/mingetty t
root 3672 0.8 0.5 25816 10348 ? SN 12:47 0:00 /usr/bin/python
root 3674 0.0 0.0 2676 1108 ? SN 12:47 0:00 /usr/libexec/gam
root 3675 0.0 0.0 4368 948 pts/0 R+ 12:47 0:00 ps aux

mentos
2014-08-21, 05:03
Also heres output of netstat for UDP and TCP



[root@sbs ~]# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 2886/perl
tcp 0 0 0.0.0.0:39525 0.0.0.0:* LISTEN 2886/perl
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 2886/perl
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2790/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2838/sendmail
tcp 0 0 0.0.0.0:3483 0.0.0.0:* LISTEN 2886/perl
tcp 0 0 :::33797 :::* LISTEN 2886/perl
tcp 0 0 :::57492 :::* LISTEN 2886/perl
tcp 0 0 :::56308 :::* LISTEN 2886/perl
tcp 0 0 :::50837 :::* LISTEN 2886/perl
tcp 0 0 :::22 :::* LISTEN 2790/sshd
udp 0 0 0.0.0.0:52362 0.0.0.0:* 3616/avahi-daemon
udp 0 0 0.0.0.0:3483 0.0.0.0:* 2886/perl
udp 0 0 0.0.0.0:56654 0.0.0.0:* 2886/perl
udp 0 0 0.0.0.0:5353 0.0.0.0:* 3616/avahi-daemon
udp 0 0 0.0.0.0:1900 0.0.0.0:* 2886/perl
udp 0 0 192.168.1.200:1900 0.0.0.0:* 2886/perl
udp 0 0 192.168.1.200:123 0.0.0.0:* 2815/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2815/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2815/ntpd
udp 0 0 :::38064 :::* 3616/avahi-daemon
udp 0 0 fe80::226:2dff:fe48:cd5b:123 :::* 2815/ntpd
udp 0 0 ::1:123 :::* 2815/ntpd
udp 0 0 :::123 :::* 2815/ntpd

mentos
2014-08-21, 05:04
I really appreciate the help. I'm tempted to just leave it, but I've expended so much time on it I'm loathed to do so.

I've tried disabling the firewall on my router (BT Home Hub 5) and disabling PNP security, incase its doing some multicast filtering. But I assume even if it was I should still see the publish processes on the server?

bpa
2014-08-21, 05:29
I really appreciate the help. I'm tempted to just leave it, but I've expended so much time on it I'm loathed to do so.

I've tried disabling the firewall on my router (BT Home Hub 5) and disabling PNP security, incase its doing some multicast filtering. But I assume even if it was I should still see the publish processes on the server?

Router etc. will do nothing to stop an application opening a port on your Linux system ethernet interface. There is no sign of port 5123 being open so there is a problem with plugin initialisation.

The log says Plugin is version 0.23.6 yet source code for plugin on git says version is 0.23 - where did you get the plugin from and how did you install it ?

castalla
2014-08-21, 05:43
Router etc. will do nothing to stop an application opening a port on your Linux system ethernet interface. There is no sign of port 5123 being open so there is a problem with plugin initialisation.

The log says Plugin is version 0.23.6 yet source code for plugin on git says version is 0.23 - where did you get the plugin from and how did you install it ?

Not trying to muddy the waters ... but just noticed the reference to ethernet. Errr .... see here: http://forums.slimdevices.com/showthread.php?100379-Announce-ShairTunes-Plugin&p=781703&viewfull=1#post781703

I never discovered a solution .... but it became academic as I run LMS on wifi, so I didn't pursue it further

bpa
2014-08-21, 06:59
Not trying to muddy the waters ... but just noticed the reference to ethernet. Errr .... see here: http://forums.slimdevices.com/showthread.php?100379-Announce-ShairTunes-Plugin&p=781703&viewfull=1#post781703

I never discovered a solution .... but it became academic as I run LMS on wifi, so I didn't pursue it further

Before the plugin was written, I played with the Airplay stuff by having the shairport helper feeding into LMS & WaveInput on a Ubuntu system using Ethernet. Avahi worked ok on Ethernet in that context.

At the moment the issue is no process listening on port 5123, this is part of initialisation and before any interaction with avahi. So either process is listening but netstat output is faulty or initialisation didn't work AND plugin didn't detect the failure. SO I'm assuming netstat output is OK and Plugin has failed - so first I'm checking whether the source of Plugin.pm on git the same as the one being used.

castalla
2014-08-21, 07:31
Before the plugin was written, I played with the Airplay stuff by having the shairport helper feeding into LMS & WaveInput on a Ubuntu system using Ethernet. Avahi worked ok on Ethernet in that context.

At the moment the issue is no process listening on port 5123, this is part of initialisation and before any interaction with avahi. So either process is listening but netstat output is faulty or initialisation didn't work AND plugin didn't detect the failure. SO I'm assuming netstat output is OK and Plugin has failed - so first I'm checking whether the source of Plugin.pm on git the same as the one being used.

Errr .... I can't see 5123 listening on my system ?

I may not be looking correctly (lsof -t -i:5123) ....

mentos
2014-08-21, 07:48
Not trying to muddy the waters ... but just noticed the reference to ethernet. Errr .... see here: http://forums.slimdevices.com/showthread.php?100379-Announce-ShairTunes-Plugin&p=781703&viewfull=1#post781703

I never discovered a solution .... but it became academic as I run LMS on wifi, so I didn't pursue it further

Yes I saw that earlier, thats why I went and disabled firewall and UPNP security, I figured maybe the router was blocking multicast on wired. I have seen others report issues with routers blocking multicast and stock Apple TV's not working.

mentos
2014-08-21, 07:52
Router etc. will do nothing to stop an application opening a port on your Linux system ethernet interface. There is no sign of port 5123 being open so there is a problem with plugin initialisation.

The log says Plugin is version 0.23.6 yet source code for plugin on git says version is 0.23 - where did you get the plugin from and how did you install it ?

Yes I agree, but just wanted to make sure its just a straight forward Multicast that Airplay sources like Shairtunes do and theres nothing needed from Sinks to trigger anything. Also since I don't know the processes which run on a working system I thought maybe everything was actually ok, thats why the input from you guys as to what I should see is invaluable.

I got the shairtunes plugin by adding the source listed here to the LMS plugins page:

https://github.com/StuartUSA/shairport_plugin

I was running an earlier version of LMS at the time though, now I'm on 7.8.

Also I had to alter line 245 in Plugin.pm as per your suggestion in post 141:

http://forums.slimdevices.com/showthread.php?100379-Announce-ShairTunes-Plugin&p=788178&viewfull=1#post788178

mentos
2014-08-21, 08:07
Errr .... I can't see 5123 listening on my system ?

I may not be looking correctly (lsof -t -i:5123) ....

lsof -t -i:5123 returns nothing :/

castalla
2014-08-21, 08:18
lsof -t -i:5123 returns nothing :/

Same here.

mentos
2014-08-21, 08:22
Same here.

Ahh I misunderstood what you meant, I thought you were asking me to run it :)

castalla
2014-08-21, 08:27
Ahh I misunderstood what you meant, I thought you were asking me to run it :)

:) Can you try using wifi?

bpa
2014-08-21, 08:29
I'm convinced Port 5123 "listen" is failing. So you need to check the error code from socket initialisation - I suggest add lines in red in Plugin.pm and restart LMS making sure plugin.shairplug logging is set to DEBUG and for startup



sub createListenPort()
{
my $port = 5123;
my $listen;

$listen = new IO::Socket::INET6(Listen => 1,
Domain => AF_INET6,
ReuseAddr => 1,
Proto => 'tcp' );
$log->info("Returns from Listen in inet 6: Listen=$listen and status: $!" );
$listen ||= new IO::Socket::INET(Listen => 1,
ReuseAddr => 1,
Proto => 'tcp' );

$log->info("Returns from Listen in inet 4: Listen=$listen and status: $!" );

return $listen
}

mentos
2014-08-21, 08:30
:) Can you try using wifi?

I never bothered setting up the wireless card, since its located right next to router :/

Kim.T
2014-09-10, 11:36
I wrote up a detailed tutorial for that walks through the install process. I figured these kind of tutorials have been really helpful to me, might as well finally pay it forward.

In an effort to make sure I actually understood what I was doing, I ended up installing the plugin again on another Mac with a 64-bit x86 processor running OS X Mavericks and LMS 7.9. While I'm not sure I understand everything, the plugin works. Replicable success on different processors and OS version, so I must be doing something right or at least not messing anything up.

Here's a link to the step-by-step instructions, probably in way too much detail:
http://jslack.blogspot.com/2014/08/airplay.html

Also, a link to both the 64 and 32 bit shairtunes_helper files: https://db.tt/XaMijjxb

I followed this guide to get it up running on my MacMini (10.8.5 x86_64) with LMS 7.7.3, but it is not working. I can see my radio and receiver as AirPlay devices but in the log I get the following error :
Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /Users/kim/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0x7fd9e68915b8)

If I try to start the shairport_helper program manually I get the correct error message (It is working) : FATAL: Must supply AES key and IV!

Is there a problem with port 5123 ?
I have added the line BPA is suggesting in plugin.pm and this is what is in the log :

[14-09-12 12:28:17.3007] main::init (354) Starting Logitech Media Server (v7.7.3, 1375965195, Mon Aug 12 03:11:32 PDT 2013) perl 5.012004
[14-09-12 12:28:18.6333] main::init (354) Starting Logitech Media Server (v7.7.3, 1375965195, Mon Aug 12 03:11:32 PDT 2013) perl 5.012004
[14-09-12 12:28:20.1302] Plugins::ShairTunes::Plugin::createListenPort (109) Returns from Listen in inet 6: Listen=IO::Socket::INET6=GLOB(0x7f919875ae08) and status: Illegal seek
[14-09-12 12:28:20.1304] Plugins::ShairTunes::Plugin::createListenPort (113) Returns from Listen in inet 4: Listen=IO::Socket::INET6=GLOB(0x7f919875ae08) and status: Illegal seek
[14-09-12 12:28:22.3849] Plugins::ShairTunes::Plugin::createListenPort (109) Returns from Listen in inet 6: Listen=IO::Socket::INET6=GLOB(0x7f9199108f78) and status: Illegal seek
[14-09-12 12:28:22.3851] Plugins::ShairTunes::Plugin::createListenPort (113) Returns from Listen in inet 4: Listen=IO::Socket::INET6=GLOB(0x7f9199108f78) and status: Illegal seek
[14-09-12 12:28:23.5658] Plugins::ShairTunes::Plugin::createListenPort (109) Returns from Listen in inet 6: Listen=IO::Socket::INET6=GLOB(0x7f91991990c8) and status: Illegal seek
[14-09-12 12:28:23.5660] Plugins::ShairTunes::Plugin::createListenPort (113) Returns from Listen in inet 4: Listen=IO::Socket::INET6=GLOB(0x7f91991990c8) and status: Illegal seek
[14-09-12 12:34:46.0935] Plugins::ShairTunes::Plugin::handleSocketConnect (169) New connection from::ffff:192.168.1.7
[14-09-12 12:34:46.1302] Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /Users/kim/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0x7f91990f0e48)


PS I wrote Slackerini a PM to get him to correct a few errors in his guide.

straightc
2014-09-14, 13:45
I followed this guide to get it up running on my MacMini (10.8.5 x86_64) with LMS 7.7.3, but it is not working. I can see my radio and receiver as AirPlay devices but in the log I get the following error :
Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /Users/kim/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0x7fd9e68915b8)



I'm in the same boat as you. Can manually run the helper program, all IOS devices see all players on Airplay receivers, but when attempting to airplay to them, I receive the "expected port number from decoder."

Any ideas?

It would be awesome to understand where to start troubleshooting. Not sure where to begin.

Kim.T
2014-09-15, 23:37
I did a little bit of digging yesterday. All search indicated that the problem is with IO::Socket::INET6. I made a seach on how to test it and found this little script for testing : http://blog.kramse.org/blojsom/blog/default/Tools/Perl-IPv6-sockets-grmpf?smm=y
16388
When running the script it seems that the call goes OK, but for some reason the call to PeerPort() and PeerAddr() does not return anything. This also seems to be the reson for the plugin not to work -> Expected port number from decoder.

That is how much I can find out/check. Can anybody else help with this issue ?

msimas
2014-09-22, 08:14
Hi,

I was able to get ShairTunes to work yesterday (LMS 7.8, OpenSuse 12.3 x64) thanks to StuartUSA's repo and numerous suggestions on how to troubleshoot.

One thing that seems missing is the display of song metadata on the players. I've seen it done with my Yamaha receiver and apparently it is also supported on ShairPort so if that functionality needs to be added to the helper it could theoretically be based on some of the ShairPort code.

Has anyone looked into implementing this support? I am thinking about giving it a shot in the coming days and wanted to know if anybody had already attempted and could give me some suggestions on where to start.

Thanks, M

Slackerini
2014-09-23, 11:12
PS I wrote Slackerini a PM to get him to correct a few errors in his guide.

Thanks for pinging... I'm not sure of the solution. Again, most of this is over my head, programming-wise.

Did you compile your own shairport_helper or did you use the ones I precompiled? Wondering if the helper isn't working properly.

If you can get it sorted, let me know of any updates I should make to the how-to.


Metadata Support?

Unfortunately, there is no metadata support that I know of. There is a newer version of Shairport that is built in C that supports metadata (https://github.com/abrasive/shairport) but I'm pretty sure it won't work with StuartUSA's plugin.

Kim.T
2014-09-23, 13:48
Thanks for pinging... I'm not sure of the solution. Again, most of this is over my head, programming-wise.

Did you compile your own shairport_helper or did you use the ones I precompiled? Wondering if the helper isn't working properly.

If you can get it sorted, let me know of any updates I should make to the how-to.



I tried both with your version, and with my own compiled version. As mentioned I don't think there is a problem with the helper, but with INet6

Slackerini
2014-09-23, 20:59
There is a bug in ShairTunes running IPv6. Did you try turning off IPv6 on your server???

Kim.T
2014-09-23, 23:25
There is a bug in ShairTunes running IPv6. Did you try turning off IPv6 on your server???
Yes I did - like you wrote on you blog ;-)

Thunderig
2014-09-27, 04:21
Hi everybody,

Does anyone of you has experience about running ShairTunes on a LMS which is on a Synology DS114? Is it possible that this plugin runs only under x86 systems?

When I try to add the github repository it resonds that the maximum of redirects is exceeded. The other option for installing the plugin which is downloading the code and self compliling on a x86 platform probably leaves me with an x86 exclusive binary, right?

I would deeply appreciate if anyone has some advice for me if and how it is possible to run this plugin on a Synology.

Thanks

Andy

Tedco
2014-10-13, 12:20
I am having a problem getting it to run on my macmini as well: I get this from the log

Can't locate Net/SDP.pm in @INC (@INC contains: /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Plugins/Gallery /Users/teddie/Library/Caches/Squeezebox/InstalledPlugins/Plugins/Gallery /Users/teddie/Library/Caches/Squeezebox/InstalledPlugins /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/lib /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN /Library/PreferencePanes/Squeezebox.prefPane/Contents/server /Library/Application Support/Squeezebox /Users/teddie/Library/Application Support/Squeezebox /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/teddie/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
BEGIN failed--compilation aborted at /Users/teddie/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
Compilation failed in require at (eval 1169) line 2.
BEGIN failed--compilation aborted at (eval 1169) line 2.

And I've tried -- cpan install Net::SDP -- and it looks like it's installed fine. Any ideas?

Slackerini
2014-10-16, 13:42
I am having a problem getting it to run on my macmini as well: I get this from the log

Can't locate Net/SDP.pm in @INC (@INC contains: /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Plugins/Gallery

And I've tried -- cpan install Net::SDP -- and it looks like it's installed fine. Any ideas?

I'm not sure, but I've read that Net::SDP needs to be installed as a superuser.


sudo su
cpan install Net::SDP

atca
2014-10-26, 05:31
Stuart / DSTMK is there any way to adjust the audio buffer / latency to help bring the shairtunes playback in line with other Apple Airplay devices?

even if this is just setting a static amount of buffer rather than a dynamic sync.

IanDury
2014-11-16, 12:56
For those interested to use the ShairTunes Plugin on Arch Linux see:

http://forums.slimdevices.com/showthread.php?101624-Announce-Squeeze-on-Arch-developer-version&p=795513&viewfull=1#post795513

chrisf1
2014-11-19, 10:47
Hi guys,

just wanted to say thanks for this awesome plugin. It's a bit difficult to find, tho... I was just trying to figure out (for some hours) how to do this directly with shairport and a pipe, but couldn't make it work. The method and plugin presented here worked flawless from the beginning...

The only cool thing missing is to play synced on all the players connected to the LMS. If anyone has a pointer where the reason for this is, I might look into it a bit...

J_zurigo
2014-11-23, 12:46
looks very tempting - has anybody tried to get this working on LMS via Synology NAS? (I'm running my LMS on the Synology Diskstation 1512+)

Snyder
2014-11-26, 03:26
looks very tempting - has anybody tried to get this working on LMS via Synology NAS? (I'm running my LMS on the Synology Diskstation 1512+)

Indeed it´s a very interesting plugin. I would like to get it working on my LMS which is running on QNAP TS-212 NAS.

It looks pretty complicated to me and I´m wondering if there is a Installation guide for a QNAP Server?
Is there a step by step installation guide for a QNAP?

jimi00
2014-11-30, 01:44
I followed Slackerini's HOWTO but I keep getting the same error message at Plugin installation:

[14-11-30 09:20:35.8958] main::init (370) Starting Logitech Media Server (v7.9.0, 1410897135, Tue Sep 16 21:01:22 PDT 2014) perl 5.010000
[14-11-30 09:20:37.6387] main::init (370) Starting Logitech Media Server (v7.9.0, 1410897135, Tue Sep 16 21:01:22 PDT 2014) perl 5.010000
[14-11-30 09:20:38.6292] Slim::bootstrap::tryModuleLoad (286) Warning: Module [Plugins::ShairTunes::Plugin] failed to load:
Can't locate Crypt/OpenSSL/RSA.pm in @INC (@INC contains: /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Plugins/Bandcamp/lib /Users/davidhenco/Library/Caches/Squeezebox/InstalledPlugins/Plugins/Bandcamp/lib /Users/davidhenco/Library/Caches/Squeezebox/InstalledPlugins /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.10/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.10/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.10.0/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.10.0/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.10 /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/lib /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN /Library/PreferencePanes/Squeezebox.prefPane/Contents/server /Library/Application Support/Squeezebox /Users/davidhenco/Library/Application Support/Squeezebox /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at /Users/davidhenco/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 11.
BEGIN failed--compilation aborted at /Users/davidhenco/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 11.
Compilation failed in require at (eval 979) line 2.
BEGIN failed--compilation aborted at (eval 979) line 2.

[14-11-30 09:20:38.6325] Slim::Utils::PluginManager::load (318) Error: Couldn't load Plugins::ShairTunes::Plugin
Here is where I think the problem lies. I have successfully installed perlbrew (and the required dependencies) which is based on perl5.16.0 and the environment is correctly set since "perl -V" in shell shows perlbrew is being used. BUT LMS upon starting up uses the perl5.10.0 binary instead which sets its own environment and @INC. I am not a perl guru. If anyone knows how to either make LMS use the installed perlbrew build, or modify the perl5.10.0 @INC or environment to point to the modules installed by perlbrew it would be a great help.
My configuration:

Logitech Media Server Version : 7.9.0 - 1410897135 @ Tue Sep 16 21:01:22 PDT 2014
Nom d'hôte : minimoi
Adresse IP du serveur : 192.168.1.83
Port HTTP du serveur : 9000
Système d'exploitation : Mac OS X 10.6.8 - FR - utf8
Architecture de la plate-forme : x86_64
Version de Perl : 5.10.0 - darwin-thread-multi-2level
Audio::Scan : 0.94
Version de la base de données : DBD::SQLite 1.34_01 (sqlite 3.7.7.1)

b.b.
2014-11-30, 08:31
NEVERMIND:
My helper wasn't working.
Now everything great
THANKS!!!!




Hi!

Just found this and I'm trying to install....
It's not working but I have a suspicion...

my LMS is running on a VM on a ESXi server with no audio hardware whatsoever. Is audio hardware necessary? Can I somehow debug where it fails?
I see my logitech devices as airplay devices in iTunes but get a connection error...

THanks for help!!


log:
[14-11-30 16:35:28.0134] Plugins::ShairTunes::Plugin::handleSocketConnect (169) New connection from::ffff:192.168.66.138
[14-11-30 16:35:28.0137] Plugins::ShairTunes::Plugin::conn_handle_data (200) handle data 1
[14-11-30 16:35:28.0140] Plugins::ShairTunes::Plugin::conn_handle_data (217) REQ: OPTIONS
[14-11-30 16:35:28.0160] Plugins::ShairTunes::Plugin::conn_handle_request (416) RTSP/1.0 200 OK
Apple-Response: XP8gbJK90a5xrYSfT7DkuwjuhPsSBhHJsAiabiuWKqu7NpGJNf MIZC4VxiByxoftY2OQaMK4beis+Yu4rumULo4y6XKZ5B+WftgF ZlT9z1hzX4OBPzS8I5x0rahY+2eGnKEOkGd30YvnJjEx+7B7BG fdvLq/7TwINFPV3T7pWCArICdOUT8CEPC+TThzoH0bAcYAZ03VkMHg04 ZyiXT9umHuKV9OEf5aTF8xXucOlI+Lx6tDwsj/Xw7cyNydWekwr88S69AI2gZQdjXsrfzx/IKW/AsTTOfWb6rOOVJFidldAwzfLEeriLXa0jNGo6zPR9aJNNqA/K2BVMtNG2XWBA
Audio-Jack-Status: connected; type=analog
CSeq: 1
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER

[14-11-30 16:35:28.0179] Plugins::ShairTunes::Plugin::handleSocketRead (183) Closed: IO::Socket::INET6=GLOB(0x912ee00)
[14-11-30 16:35:53.0533] Plugins::ShairTunes::Plugin::handleSocketConnect (169) New connection from::ffff:192.168.66.138
[14-11-30 16:35:53.0537] Plugins::ShairTunes::Plugin::conn_handle_data (200) handle data 1
[14-11-30 16:35:53.0543] Plugins::ShairTunes::Plugin::conn_handle_data (217) REQ: ANNOUNCE
[14-11-30 16:35:53.0546] Plugins::ShairTunes::Plugin::conn_handle_data (200) handle data 1
[14-11-30 16:35:53.0583] Plugins::ShairTunes::Plugin::conn_handle_request (416) RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 1

[14-11-30 16:35:53.0598] Plugins::ShairTunes::Plugin::conn_handle_data (200) handle data 1
[14-11-30 16:35:53.0600] Plugins::ShairTunes::Plugin::conn_handle_data (217) REQ: SETUP
[14-11-30 16:35:53.0602] Plugins::ShairTunes::Plugin::conn_handle_request (334) decode command: "shairport_helper" tport '6002' dport '6002' pipe '/tmp/pipe' fmtp '96 352 0 16 40 10 14 2 255 0 0 44100' key '02dcd3d82d2b64b47f4b4825c2efa454' cport '6001' iv 'faf5b79dd5ea54c40204d551866f6981'
[14-11-30 16:35:53.0666] Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0x920ead0)

emilio-p
2014-12-01, 14:04
Hi all,

I followed Slackerini's guide and ran in to the some problem as a lot of other people.

Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /Users/emilo/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0x7fd9e68915b8)

So I upgraded perl, upgraded LMS, googled a lot, cursed a lot, drank even more coffee, etc. To no avail.
Then I decided to try some debugging myself.
So I tried:

/Library/PreferencePanes/Squeezebox.prefPane/Contents/server
and:

./slimserver.pl
And then it worked.
A lot of these, tho:


SENDTO failed: Invalid argument

RR[W:57433 R:57354 first=57386 last=57386

SENDTO failed: Invalid argument

RR[W:57433 R:57354 first=57386 last=57386

SENDTO failed: Invalid argument

But what the heck: there is sound.
When trying:

./slimserver.pl --daemon
There is no sound, and I'm back at the original problem. So I guess it has something to with running slimserver as a daemon (both in 7.8 and 7.9), but I don't what to try next.
So. Anyone with some smart pointers on how to proceed from here?
Thx!

vin
2014-12-10, 17:34
Hi all,

I followed Slackerini's guide and ran in to the some problem as a lot of other people.


So I upgraded perl, upgraded LMS, googled a lot, cursed a lot, drank even more coffee, etc. To no avail.
Then I decided to try some debugging myself.
So I tried:

/Library/PreferencePanes/Squeezebox.prefPane/Contents/server
and:

And then it worked.
A lot of these, tho:



But what the heck: there is sound.
When trying:

There is no sound, and I'm back at the original problem. So I guess it has something to with running slimserver as a daemon (both in 7.8 and 7.9), but I don't what to try next.
So. Anyone with some smart pointers on how to proceed from here?
Thx!

I did the same thing as a result of the same error, and I'm happily streaming from iTunes to my Squeezebox Boom as we speak. Keeping a minimized Terminal window open is a small price to pay, but I'm also interested in potentially pinning down a better solution. For what it's worth, I'm running OS X Yosemite 64-bit and ipv6 doesn't seem to cause a problem.

Wolfy
2014-12-15, 09:01
Is there a step by step guide to install shairtunes, shairport, airport in a FreeNAS jail running LMS 7.8.0?
What to install on the server if something needs to be installed on the players or so?

epoch1970
2014-12-21, 08:18
StuartUSA, my thanks for a most excellent plugin.

bruinboy
2014-12-22, 14:46
I'd like to plead for shairtunes plugin step by step instructions for Mac OS x?

Any takers?

Scott

Thanks in advance.

Kim.T
2014-12-22, 23:24
I'd like to plead for shairtunes plugin step by step instructions for Mac OS x?

Any takers?

Scott

Thanks in advance.
It is already there : http://forums.slimdevices.com/showthread.php?100379-Announce-ShairTunes-Plugin/page21

bruinboy
2014-12-23, 14:05
I've been stuck halfway through those instructions when installing perl modules.

So I am hoping for an easier install.

Best,

Scott

chincheta0815
2014-12-23, 14:06
Hi there,

I got problem when using the shairtunes_helper.

I installed the plugin with all modules it depends on manually.
The plugin starts without any error message in the logs.
I get the AirPlay Button in iTunes and the I can connect to it.

When playing a song, the song stutters.
The logfile of the plugin tells me that there are frames missing and that there are overruns.
Seems to be any issue with the buffer size.
The issue occurs via ethernet and wifi.

How can I debug the shairtunes_helper?

Snyder
2015-01-03, 06:25
I would dearly love to have the ability to stream audio direct from my Ipad to squeezebox (I have three duets and a classic). I am particularly interested in being able to stream the audio from Google Play from the Ipad - I think I am right in thinking that once the Ipad sees an airplay compatible receiver on the network, you can route the output from any app to that. Please tell me if that is wrong!

I am running LMS 7.8 on a QNAP TS-869L, and am very unfamiliar with Linux. Would it be possible for someone to write a step by step on how to install this plug-in which could be followed even by utter Linux noobs like me?

As it stands, my attempt to follow what I have read here has been foiled at the first hurdle. When I try and add the repo linked to by StuartUSA in post 17 of this thread to LMS, I get the following error message:

"Bad repository http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml - Redirection limit exceeded" - can anyone help me with that?

If I can get to the point where the plug-in is installed, I understand that I then need to "compile the helper app, on Linux". To do that, I need to SSH into the Qnap box linux interface and then simply type the commands as shown at the bottom of https://github.com/StuartUSA/shairport_plugin. Please tell me if this is wrong.


Apologies for the very basic questions, and thanks to all who have put work in to developing this plug in so far.

Did you get the ShairTunes Plugin running on your Qnap System? I have got the same Problem on my Qnap TS-212.

chris@schoeppi.net
2015-01-03, 09:28
On Sat, Jan 03, 2015 at 01:25:49PM +0000, Snyder wrote:
>MalcolmBarr wrote:
>> I would dearly love to have the ability to stream audio direct from my
>> Ipad to squeezebox (I have three duets and a classic). I am particularly
>> interested in being able to stream the audio from Google Play from the
>> Ipad - I think I am right in thinking that once the Ipad sees an airplay
>> compatible receiver on the network, you can route the output from any
>> app to that. Please tell me if that is wrong!

IMHO that is right.

>> I am running LMS 7.8 on a QNAP TS-869L, and am very unfamiliar with
>> Linux. Would it be possible for someone to write a step by step on how
>> to install this plug-in which could be followed even by utter Linux
>> noobs like me?

I can try to write a step by step howto and I managed to get the plugin
running on my linux system with LMS, but this is a normal linux and no
Qnap with limmited possebilities of available packages, e.g. You have to
install some aditional perl modules for example to get the shairtunes
plugin running, I don't know if it is possible to install these perl
modules via a packaging system or cpan. Also the avahi configuration has
to be modified, no plan if this can be done on the Qnaps without side
effects to the rest of the system.

>> at the first hurdle. When I try and add the repo linked to by StuartUSA
>> in post 17 of this thread to LMS, I get the following error message:
>>
>> "Bad repository
>> http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml -
>> Redirection limit exceeded" - can anyone help me with that?

I had the same error and for that reason I've installed the plugin
manualy. This can be done by coping the downloaded and unpacked plugin
directory in to /var/lib/squeezeboxserver/Plugins. Then the file
permissions has to be corected and after that the plugin can be enabled
via the LMS web interface.

>> If I can get to the point where the plug-in is installed, I understand
>> that I then need to "compile the helper app, on Linux". To do that, I
>> need to SSH into the Qnap box linux interface and then simply type the
>> commands as shown at the bottom of
>> https://github.com/StuartUSA/shairport_plugin. Please tell me if this is
>> wrong.

If no of the pre-compiled binaries are running on your Qnap, you are not
wrong and you really have to compile the shairtunes_helper binary. And
that ist the next problem with the Qnaps..., you need an environment to
compile binaries, no plan if the packages needed for this environment
can be installed or how I can get such an environment.

As said, I can try to write a step to step howto for the installation on
a normal linux system, but to know how the plugin can be installed on a
Qnap I need to have ssh access and root priveleges to such an device and
also then installation can be different depending on the system
architecture....

Regards from Munich,

Christian

--
Christian Schoepplein - <chris (at) schoeppi.net> - http://schoeppi.net

Snyder
2015-01-04, 04:15
Christian, many thanks for your reply. This sounds very complicated to me. I am a little bit afraid of the side effects which could harm my QNAP system. I asked for support in the german speaking Qnap community. As long as I won´t get an answer from the Qnap experts, I will stop trying to get it working on my QNAP system.

Instead I will try to install LMS inkl. the shairtunes plugin on a Raspberry PI which I still have and which is not in use at the moment. So I could flash a new operating system as Rasbian or any other Linux distribution which you would advise me to flash.

A step by step installation guide for the Rasberry PI would be much appreciated. All the best from Cologne :-) , Martin

IanDury
2015-01-08, 06:12
Christian, many thanks for your reply. This sounds very complicated to me. I am a little bit afraid of the side effects which could harm my QNAP system. I asked for support in the german speaking Qnap community. As long as I won´t get an answer from the Qnap experts, I will stop trying to get it working on my QNAP system.

Instead I will try to install LMS inkl. the shairtunes plugin on a Raspberry PI which I still have and which is not in use at the moment. So I could flash a new operating system as Rasbian or any other Linux distribution which you would advise me to flash.

A step by step installation guide for the Rasberry PI would be much appreciated. All the best from Cologne :-) , Martin

Martin, I recommend installing Squeeze on Arch (includes LMS) on your Raspberry:
http://forums.slimdevices.com/showthread.php?101624-Announce-Squeeze-on-Arch-developer-version

To add the ShairTunes Plugin follow the instructions here:
http://forums.slimdevices.com/showthread.php?101624-Announce-Squeeze-on-Arch-developer-version&p=795513&viewfull=1#post795513

Snyder
2015-01-08, 09:22
Ian, many thanks for the links. As soon as I will have the time I will test the Squeeze on Arch Image on my Raspberrry PI.

I'm just wondering, if it is possible to stream via airplay to my squeezeboxes from any app which I have installed on my Iphone, while the squeezeboxes are synchronised by LMS in a group of players?

At the moment I am not able to stream via airplay from any app on my iphone to any squeezebox in my house, while the players are synchronized to groups. Off course multiroom streaming is possible with the spotify plugin or the deezer app, but I often come to the point that I also want to use the original app from e.g. spotify or deezer and then I can´t stream from the Iphone app via airplay to a group of players.


I think it could be helpfull to have a server like LMS which keeps all players of the multiroom audio solution synchronized and which also offers the possibilty to receive an audio stream via airplay for every group of players.

Would this be possible with the shairtunes plugin?

IanDury
2015-01-08, 14:13
Martin, I've tried but it looks like the shairtunes plugin can only stream to one player at a time.

Snyder
2015-01-09, 15:07
Martin, I've tried but it looks like the shairtunes plugin can only stream to one player at a time.

Ian, you are right. Airplay streaming from my iphone to a group of players does not seem to be possible. When the squeezeboxes are synchronized to a group, while I am starting an airplay stream to one of the synchronized players, both players stop immediately and I always get the error message that the players are waiting to be synchronized.

Has anybody got an idea how to configure or modify the plugin in order to enable streaming via airplay to a group of players?

Anyway I´m very happy that I got this plugin working on my raspberry PI. Great work and many thanks!!

Grodesh
2015-01-10, 15:39
Hi there, I just signed up to collaborate on this great plugin.

Running Centos 6.6, I couldn't get shairtunes-plugin to work. I kept getting the port error:

Expected port number from decoder; got at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.

Having no experience with Perl, tracking down the problem was not an straight-forward task. But after a few days of part-time digging and reading, I came to the conclusion that the open2() method call at line 336 of Plugin.pm was the root of the problem and indeed I was right. So I split line 336

my $decoder = open2(my $dec_out, my $dec_in, $dec);

to



my ($dec_out, $dec_in);
my $decoder = open2($dec_out, $dec_in, $dec);


and now I have sound coming out of my various squeezeboxes. I haven't done any long listening session yet so I don't know if the stream holds on, but at least I'm getting sound now.


P.S. Those captchas are ridiculous, I have to refresh them at least 10 times to get one almost readable.

Grodesh
2015-01-10, 15:43
Ian, you are right. Airplay streaming from my iphone to a group of players does not seem to be possible. When the squeezeboxes are synchronized to a group, while I am starting an airplay stream to one of the synchronized players, both players stop immediately and I always get the error message that the players are waiting to be synchronized.

Has anybody got an idea how to configure or modify the plugin in order to enable streaming via airplay to a group of players?

Anyway I´m very happy that I got this plugin working on my raspberry PI. Great work and many thanks!!

I haven't tried it yet, but there is a shairport fork called shairport-sync (https://github.com/mikebrady/shairport-sync) that allows multiroom synchronization. I don't know how hard it would be to update shairtunes-plugin to support it as I have no background with this stuff. I tried piMusicBox on my Raspberry Pi, which seems to be running shairport-sync, but the stream breaks down after a few seconds - or at most one or two minutes. And I wasn't even synchronizing streams on multiple devices!

Snyder
2015-01-11, 11:38
I haven't tried it yet, but there is a shairport fork called shairport-sync (https://github.com/mikebrady/shairport-sync) that allows multiroom synchronization. I don't know how hard it would be to update shairtunes-plugin to support it as I have no background with this stuff. I tried piMusicBox on my Raspberry Pi, which seems to be running shairport-sync, but the stream breaks down after a few seconds - or at most one or two minutes. And I wasn't even synchronizing streams on multiple devices!

The shareport-snyc fork looks interesting.

At the moment Stuart´s plugin is running very stable on my LMS. Although I would definitely like to have the synchronization feature, I am not sure, if its a good idea to install the shairport-sync plugin. If streams broke down after a few seconds, it would not be an improvement. Otherwise it could be better, if airplay streaming to a group of players was supported and the plugin ran stable.

PHoSawyer
2015-01-19, 02:54
Hi all, spent the last day reading this entire thread and another to try and gather clues on how to install on CentOS 6.5!!

It's the distro I'm most comfortable with so this is what I want to (and have been for 12 months) use. Anyhow all the dependencies are named differently so by pretty much doing just yum searches I have found them all.

Had a problem whereby the devices seemed to register but nothing could connect, after a while I found it was a Firewall issue but also had an issue where it couldnt find the helper even though it was in /usr/local/bin and that was listed in $PATH. So had a look at some of the other directories in $PATH and found there were loadsa files that seemed to be helper int /usr/sbin so put it in there and worked fine.

So the problem that I have is to do with the firewall. I can't find any definitive answer on what ports are needed to be open, some sites say TCP/5000 with UDP/6000-6003 and others say TCP/5000-5005 with UDP/6000-6005.

However it still is blocked by iptables and just found another site that says there is a big range of high UDP ports dynamically used, about UDP/30k-65k which sounds fairly rediculous!


Also if anyone is interested getting this working on CentOS then I'll write a quick tutorial which lists the differently named dependencies as this site has got me up and running!


TL;DR
Got it working but with FW turned off, what are the correct ports?!

disaster123
2015-01-19, 02:56
Was andybody able to make this working on windows?

markiii
2015-02-06, 11:48
Was andybody able to make this working on windows?

good question, also looking and not found anything simple


incidentally, having spent the week playing with vortexbox, its inbuilt LMS and Shairtunes build WILL airplay to synced groups of players. So it is possible

RikkP
2015-02-11, 07:04
Hello,
I didn't find an how-to for the installation of the plugin and the helper on synology NAS (X64). There is a link to a package / how-to ?

Thanks for help.

Regards,
RikkP

straightc
2015-02-11, 08:39
I was never able to get it working on MAC. I ended up trying multiple ways and doing plenty of research and troubleshooting, but could never get any audio in the end. I ended up switching to using a 3rd party Airplay Server like Reflect or Air Server and then funneling that stream into NiceCast and having the Squeezebox tune into that MP3 stream. Sure its not audiophile quality, but it works very reliably.

I am a Spotify user, which was the main reason I looked to do this b/c the 3rd Spotify plugin is lacking. I assumed I would have to Airplay this, but actually the desktop client can be controlled via the Spotify mobile app, so I can tune SqueezeBox into NiceCast and have NiceCast specifically re-broadcast audio from the Spotify App and NiceCast has the nice benefit of supporting track names, etc. for specific applications like Spotify so track information comes across to Squeezebox display.

All of this is fairly easily scriptable, so I can click a few buttons on my phone to ensure all appropriate apps are launched and Squeezebox is tuned in.

odw199
2015-02-20, 04:11
I have this working on a mac mini running yosemite, but only if I run slimserver.pl directly from the command line, not when using the start button in the Preference Pane (Pain?)

When running from the pref pain I get the infamous:



[15-02-20 17:51:03.5684] Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /Users/tv/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 344.
; fh=IO::Socket::INET6=GLOB(0x7f971a0c8d48)


Does anyone know what differences there are in how LMS starts between the command line and Pref Pane? I've checked they both use the same version of perl so presumably there is a difference in library used based on path ordering or some such but I haven't yet been able to figure it out.


Update: the difference is the pref pane runs it as a daemon, how that stops shairport from running I don't know, but leaving a hidden terminal running behind Kodi isn't a problem

Kim.T
2015-02-20, 08:03
I have this working on a mac mini running yosemite, but only if I run slimserver.pl directly from the command line, not when using the start button in the Preference Pane (Pain?)

When running from the pref pain I get the infamous:



[15-02-20 17:51:03.5684] Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /Users/tv/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 344.
; fh=IO::Socket::INET6=GLOB(0x7f971a0c8d48)


Does anyone know what differences there are in how LMS starts between the command line and Pref Pane? I've checked they both use the same version of perl so presumably there is a difference in library used based on path ordering or some such but I haven't yet been able to figure it out.


Update: the difference is the pref pane runs it as a daemon, how that stops shairport from running I don't know, but leaving a hidden terminal running behind Kodi isn't a problem

I tried to run /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/slimserver.pl - but my problem is stil the same as in post #217 http://forums.slimdevices.com/showthread.php?100379-Announce-ShairTunes-Plugin&p=798302&viewfull=1#post798302
This error came when I upgrade to 10.9 from 10.8. In 10.8 I got the same error as you.

odw199
2015-02-20, 18:23
If you type


which perl

at the command line what do you get?

After installing MacPorts I found I had two versions, one in /opt and one in /usr/bin

My command prompt had /opt earlier in the path than /usr/bin so when I manually added the required dependancies with cpan, they were added to the /opt version. But slimserver.pl specifies the path to perl as /usr/bin/perl, therefore the installed cpan modules were not being used.

To fix this I temporarily removed /opt from my path:

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Then re-ran the cpan installs which added them to the /usr/bin version. Starting slimserver.pl then worked with the shairport plugin

Kim.T
2015-02-22, 06:15
If you type


which perl

at the command line what do you get?

After installing MacPorts I found I had two versions, one in /opt and one in /usr/bin

My command prompt had /opt earlier in the path than /usr/bin so when I manually added the required dependancies with cpan, they were added to the /opt version. But slimserver.pl specifies the path to perl as /usr/bin/perl, therefore the installed cpan modules were not being used.

To fix this I temporarily removed /opt from my path:

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Then re-ran the cpan installs which added them to the /usr/bin version. Starting slimserver.pl then worked with the shairport plugin
I get : /Users/kim/perl5/perlbrew/perls/perl-5.16.0/bin/perl

So you are saying that I first have to run :
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

And then re-run CPAN with :
$ sudo perl -MCPAN -e ‘install Crypt::OpenSSL::RSA’
$ sudo perl -MCPAN -e ‘install IO::Socket::INET6’
$ sudo perl -MCPAN -e ‘install Net::SDP’

But my perl is already (for some unknow reason) pointing at the usr/bin

My error is :
15-02-22 14:33:32.5688] main::init (353) Starting Logitech Media Server (v7.7.5, 1416570306, Wed Nov 26 23:36:20 PST 2014) perl 5.016002
[15-02-22 14:33:32.9251] Slim::bootstrap::tryModuleLoad (286) Warning: Module [Plugins::ShairTunes::Plugin] failed to load:
Can't locate Net/SDP.pm in @INC (@INC contains: /Users/kim/Library/Caches/Squeezebox/InstalledPlugins /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16.2/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16/darwin-thread-multi-2level/auto /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/darwin-thread-multi-2level /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN/arch/5.16 /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/lib /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/CPAN /Library/PreferencePanes/Squeezebox.prefPane/Contents/server /Library/Application Support/Squeezebox /Users/kim/Library/Application Support/Squeezebox /Library/PreferencePanes/Squeezebox.prefPane/Contents/server /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/kim/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
BEGIN failed--compilation aborted at /Users/kim/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 13.
Compilation failed in require at (eval 1036) line 2.
BEGIN failed--compilation aborted at (eval 1036) line 2.

[15-02-22 14:33:32.9275] Slim::Utils::PluginManager::load (321) Error: Couldn't load Plugins::ShairTunes::Plugin
[15-02-22 14:33:33.8070] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!

odw199
2015-02-22, 07:26
Hi,

It does indeed look like you have 2 versions of perl installed.

The "which perl" command you ran from a terminal shows an install in /Users/kim/perl5/perlbrew/perls/perl-5.16.0/

Yet the slim server.pl application uses perl in /usr/bin:


$ head slimserver.pl
#!/usr/bin/perl

# Logitech Media Server Copyright 2001-2009 Logitech.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.


So when you manually installed the additional modules through CPAN, it would have added them to the perl install in /Users/kim/perl5/perlbrew/perls/perl-5.16.0/, but this isn;t used by squeezebox, it uses the install that comes shipped with Mac OS.

You need to add the additional modules to the default perl installation. And to do that you need run CPAN from the default installation, not the alternate installation under /Users/kim/perl5/perlbrew/perls/perl-5.16.0/. The easiest way to do this is to take /Users/kim/perl5/perlbrew/perls/perl-5.16.0/bin off the PATH environment variable. So if you run:


export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

This sets the PATH to just be the default areas, which means when you run "which perl" again it should point /usr/bin/perl, then install the CPAN modules again and they will be installed to the installation of perl that squeezebox is using.

The short version of all this is:


$ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$ sudo perl -MCPAN -e ‘install Crypt::OpenSSL::RSA’
$ sudo perl -MCPAN -e ‘install IO::Socket::INET6’
$ sudo perl -MCPAN -e ‘install Net::SDP’
$ /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/slimserver.pl

When ever you log back in to a terminal it will put your PATH back to what it was, which is fine, the export is only temporary so you can install the CPAN modules to the right perl installation.

Kim.T
2015-02-22, 08:42
Hi,

It does indeed look like you have 2 versions of perl installed.

The "which perl" command you ran from a terminal shows an install in /Users/kim/perl5/perlbrew/perls/perl-5.16.0/

Yet the slim server.pl application uses perl in /usr/bin:


$ head slimserver.pl
#!/usr/bin/perl

# Logitech Media Server Copyright 2001-2009 Logitech.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.


So when you manually installed the additional modules through CPAN, it would have added them to the perl install in /Users/kim/perl5/perlbrew/perls/perl-5.16.0/, but this isn;t used by squeezebox, it uses the install that comes shipped with Mac OS.

You need to add the additional modules to the default perl installation. And to do that you need run CPAN from the default installation, not the alternate installation under /Users/kim/perl5/perlbrew/perls/perl-5.16.0/. The easiest way to do this is to take /Users/kim/perl5/perlbrew/perls/perl-5.16.0/bin off the PATH environment variable. So if you run:


export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

This sets the PATH to just be the default areas, which means when you run "which perl" again it should point /usr/bin/perl, then install the CPAN modules again and they will be installed to the installation of perl that squeezebox is using.

The short version of all this is:


$ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$ sudo perl -MCPAN -e ‘install Crypt::OpenSSL::RSA’
$ sudo perl -MCPAN -e ‘install IO::Socket::INET6’
$ sudo perl -MCPAN -e ‘install Net::SDP’
$ /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/slimserver.pl

When ever you log back in to a terminal it will put your PATH back to what it was, which is fine, the export is only temporary so you can install the CPAN modules to the right perl installation.

Thanks - that did almost solve my problem. Now I get the same error as you did - when starting LMS from terminal with /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/slimserver.pl

15-02-22 16:37:20.4352] Slim::Networking::IO::Select::__ANON__ (147) Error: Select task failed calling Plugins::ShairTunes::Plugin::handleSocketRead: Expected port number from decoder; got at /Users/kim/Library/Caches/Squeezebox/InstalledPlugins/Plugins/ShairTunes/Plugin.pm line 342.
; fh=IO::Socket::INET6=GLOB(0x7fc1c8ce0c20)

flat_
2015-02-22, 08:55
OMG OMG OMG
After spending days looking for a clean solution to transform my squeezebox into a AirPlay receiver, I just tried your shairtunes plugin.
Followed instructions on github, it took 2 minutes and BAM! It just WORKS!!! WOW this is AWESOME

The precompiled shairport_helper-x64-static works out of the box on a debian wheezy 7.7

Just had to disable firewall to let airplay device to be detected. Do you know which ports need to be opened to get it work?

@DSTMK @StuartUSA
Thank you so much. Do you have a bitcoin address for a small donation?

munich
2015-02-22, 12:12
Unfortunately I am newbie to unix / linux etc.

I tried to follow the instructions on https://github.com/StuartUSA/shairport_plugin.

But the problem already starts with the first line: apt-get install libcrypt-openssl-rsa-perl ... gives me back: -ash: apt-get: not found
It looks like, that I there is no apt-get install on my DS713+ (with Intel Atom D2700).

Any hint for me, how to install the dependancies or to enable apt-get install?

odw199
2015-02-22, 16:52
Hi Kim.T

That is how I've been running it and it works for me (which I realise doesn't help much).

The only things I can think of are:
1. Are you adding any arguments or commands after the slimserver.pl to either daemonize it or but it into the back ground? For example:

./slimserver.pl --daemon
./slimserver.pl &

I am just changing to the right directory, and then running the command from there:

cd /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/
./slimserver.pl

2. Are you on the latest version of LMS? Your log indicates it is 7.7.5 from 26 November, looking at the LMS download area there is a version released on 27 November (but this might be the same one and it's a timezone crossover thing):
http://downloads.slimdevices.com/LogitechMediaServer_v7.7.5/