Forum
Airplay not working - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Kodi (/forum-18.html)
+--- Thread: Airplay not working (/thread-1863.html)

Pages: 1 2


RE: Airplay not working - mk01 - 25th Jan, 2014 05:36 PM

and is there as confirmed fix at XBMC ?


RE: Airplay not working - mehlvogel - 2nd Mar, 2014 01:32 AM

Scanning through the aforementioned thread, to work around the situation you can first install the package avahi-utils.
Make sure you see your Xbian listed in the list of AirPlay devices as just a audio sink (AirTunes) and then use the following command:

avahi-publish -s "iXBMC" _airplay._tcp 36667 "deviceid=XX:XX:XX:XX:XX:XX" "features=0x77" "model=AppleTV3,2" "srcvers=101.28" &

In which you can replace "iXBMC" by the name you want your XBian to appear on the device and the XX:...:XX part by the mac address of eth0 (use ifconfig to find that one out).
If you want to put this into a start script, make sure to wait until XBMC has sent the first announcement (so put a sleep for 15 or 20 seconds into the script).


RE: Airplay not working - DreamT - 6th Mar, 2014 06:13 AM

(2nd Mar, 2014 01:32 AM)mehlvogel Wrote:  If you want to put this into a start script, make sure to wait until XBMC has sent the first announcement (so put a sleep for 15 or 20 seconds into the script).

Thank you! This really seemed to solve the problem for me. One question though, how would a startup script like that look and where should it be placed?


RE: Airplay not working - mehlvogel - 6th Mar, 2014 06:34 AM

I haven't done it myself. The script itself should be pretty straight forward:

Code:
#!/bin/bash

sleep 20 # Sleep for 20 seconds, adjust until it works.
avahi-publish -s "iXBMC" _airplay._tcp 36667 "deviceid=XX:XX:XX:XX:XX:XX" "features=0x77" "model=AppleTV3,2" "srcvers=101.28"

Put that into one file, make it executable (chmod +x) and create a start script which calls this script like this.

Code:
#!/bin/bash

/path/to/script.sh &


In order to not let the init process wait for 20 seconds.

The placement however is a different thing. In the dark times (i.e. back when I was fiddeling with start scripts Wink), you would have put it into /etc/init.d/ and run
Code:
update-rc.d <name of the script> defaults
to have it loaded. This might still work. I recommend reading /etc/init.d/README and
Code:
man update-rc.d
before messing with the start scripts. Nowadays, there are more advanced init systems at place and I am not sure what is used in xbian and how it could be ideally integrated. Maybe one of the devs or one having a better overview might chip in a pointer.


RE: Airplay not working - DreamT - 9th Mar, 2014 01:53 AM

(6th Mar, 2014 06:34 AM)mehlvogel Wrote:  I haven't done it myself. The script itself should be pretty straight forward:

Code:
#!/bin/bash

sleep 20 # Sleep for 20 seconds, adjust until it works.
avahi-publish -s "iXBMC" _airplay._tcp 36667 "deviceid=XX:XX:XX:XX:XX:XX" "features=0x77" "model=AppleTV3,2" "srcvers=101.28"

Put that into one file, make it executable (chmod +x) and create a start script which calls this script like this.

Code:
#!/bin/bash

/path/to/script.sh &


In order to not let the init process wait for 20 seconds.

The placement however is a different thing. In the dark times (i.e. back when I was fiddeling with start scripts Wink), you would have put it into /etc/init.d/ and run
Code:
update-rc.d <name of the script> defaults
to have it loaded. This might still work. I recommend reading /etc/init.d/README and
Code:
man update-rc.d
before messing with the start scripts. Nowadays, there are more advanced init systems at place and I am not sure what is used in xbian and how it could be ideally integrated. Maybe one of the devs or one having a better overview might chip in a pointer.

Thank you for your advice on this, I'll try it as soon as have some time for it.

I had some trouble with the avahi-utils (some Airplay apps not working, random lockups), but all in all it seems to work quite well.


RE: Airplay not working - DreamT - 25th Mar, 2014 06:00 AM

BTW, it seems like the original issue has been solved: http://forum.xbmc.org/showthread.php?tid=179961&page=32


RE: Airplay not working - mk01 - 25th Mar, 2014 01:56 PM

(2nd Mar, 2014 01:32 AM)mehlvogel Wrote:  In which you can replace "iXBMC" by the name you want your XBian to appear on the device and the XX:...:XX part by the mac address of eth0 (use ifconfig to find that one out).
If you want to put this into a start script, make sure to wait until XBMC has sent the first announcement (so put a sleep for 15 or 20 seconds into the script).


isn't better to provide oneline patch to XBMC? and actually send this announcement after sleep after the first one ?

ok, should be merged into upstream.

@DreamT
anyhow to provide some insights and demonstrate how easier upstart is (comparing to sysv (init.d)):

you would create file /etc/init/airplay-anounce.conf
Code:
start on started xbmc

task

pre-start exec sleep 60

exec avahi-publish -s "iXBMC" _airplay._tcp 36667 "deviceid=XX:XX:XX:XX:XX:XX" "features=0x77" "model=AppleTV3,2" "srcvers=101.28"

clever gui would change "start on started xbmc" to "start on xbmc-anounced". where xbmc-anounced would mean airplay anounce from XBMC / but for actual syntax and catching avahi events we would need to use documentation Wink


RE: Airplay not working - mehlvogel - 25th Mar, 2014 05:10 PM

(25th Mar, 2014 01:56 PM)mk01 Wrote:  
(2nd Mar, 2014 01:32 AM)mehlvogel Wrote:  In which you can replace "iXBMC" by the name you want your XBian to appear on the device and the XX:...:XX part by the mac address of eth0 (use ifconfig to find that one out).
If you want to put this into a start script, make sure to wait until XBMC has sent the first announcement (so put a sleep for 15 or 20 seconds into the script).


isn't better to provide oneline patch to XBMC? and actually send this announcement after sleep after the first one ?


Of course it would have been, if I would be able to provide such a patch. But since I have absolutely no idea how XBMC's architecture looks like, how it works and where to start for such a patch, this would take a huge amount of time, which -- I am afraid -- is currently not at my disposal Wink
The avahi stuff I got from the XBMC forum, so I guess the devs already now about it.

(25th Mar, 2014 01:56 PM)mk01 Wrote:  ok, should be merged into upstream.

@DreamT
anyhow to provide some insights and demonstrate how easier upstart is (comparing to sysv (init.d)):

you would create file /etc/init/airplay-anounce.conf
Code:
start on started xbmc

task

pre-start exec sleep 60

exec avahi-publish -s "iXBMC" _airplay._tcp 36667 "deviceid=XX:XX:XX:XX:XX:XX" "features=0x77" "model=AppleTV3,2" "srcvers=101.28"

clever gui would change "start on started xbmc" to "start on xbmc-anounced". where xbmc-anounced would mean airplay anounce from XBMC / but for actual syntax and catching avahi events we would need to use documentation Wink

First, thanks on the upstart info. It really looks a hell lot easier. Second, I will make some more tests and keep an eye on it as soon as the update is pushed to my Pi.


RE: Airplay not working - mk01 - 25th Mar, 2014 05:31 PM

(25th Mar, 2014 05:10 PM)mehlvogel Wrote:  Of course it would have been, if I would be able to provide such a patch. But since I have absolutely no idea how XBMC's architecture looks like,

I would do it, no problem.

keep an eye on the upstream fix / in case it will take months, we update by ourself.

ok ?


RE: Airplay not working - mehlvogel - 25th Mar, 2014 05:39 PM

(25th Mar, 2014 05:31 PM)mk01 Wrote:  keep an eye on the upstream fix / in case it will take months, we update by ourself.

The following is the statement in the forums about the current state:

Quote:
That said the fix has been merged to master. It also will hit the gotham branch (its up to the release managers when they do the backport - didn't look if they did already).

So I think there is a good chance it will be in the next beta release of Goham already. So on the weekend my task is to update my XBMC to Gotham Wink
I'll keep an eye on the release notes there with regard to AirPlay.


RE: Airplay not working - mehlvogel - 1st Apr, 2014 03:01 AM

I have not come around testing it unfortunately, but XBMC just released beta3 of Gotham mentioning the fixed Airplay.