Help us solving the AirPlay issue when using iOS7 devices

  Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Memphiz Offline
Team-XBMC Developer
Posts: 10,159
Joined: Feb 2011
Reputation: 109
Location: germany
Post: #331
You can't - if you are not working for apple or for airserver ... Wink

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
testooo Offline
Junior Member
Posts: 13
Joined: Mar 2014
Reputation: 0
Post: #332
(2014-03-07 00:20)Memphiz Wrote:  You can't - if you are not working for apple or for airserver ... Wink

I guess he meant How you can help me ? As it seems he's using google translate.
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 10,159
Joined: Feb 2011
Reputation: 109
Location: germany
Post: #333
I can't as i am not working for apple nor for airserver Wink

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
joesmith13245 Offline
Member
Posts: 50
Joined: Jan 2014
Reputation: 0
Post: #334
(2014-01-26 20:36)catkinso Wrote:  OK so further testing on Ubuntu.

This works VERY well for Audio, Video, Pictures, by changing the Model it also now works with PLEX after 2 months of no joy! Smile

You must execute the command below AFTER XBMC appears as an AIRPLAY target (if you place this in your /etc/rc.local I suggest delaying the execution about 15-20 seconds.

This is largely based on the work done by ermax

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

Sorry but I'm not a Linux guy, I understand the above code needs to be put in the rc.local. But how do you add a 15-20 second delay? Thanks

Btw.. Running the command via putty worked for me as well. Now I'm trying to figure out how to add to the rc,local file so it runs after reboot.
(This post was last modified: 2014-03-10 05:35 by joesmith13245.)
find quote
brownard Offline
Junior Member
Posts: 2
Joined: Mar 2014
Reputation: 0
Post: #335
Hey @Memphiz

I'm developing an airplay library in c# and was facing the same detection issues as you (which is how I ended up here). I think I've narrowed it down to the order in which the services are detected, if the Airplay service is detected after Airtunes you will get the monitor, if the other way round you will get audio only.

I've checked this by altering the order in which the services are published and adding a small delay between each publish - if you ensure that the iPhone is connected to wifi (i.e not asleep) when the services are published you will always get the monitor if airplay is published 2nd and never if published 1st.

I believe this explains the intermittent nature of the problem as when you connect to wifi after the services have been published it's pot luck as to which order the services are detected, it probably also explains why some of the suggested solutions seem to improve the situation - the dummy services would improve the odds of the airplay service being detected 2nd and I'm willing to bet that most users are connected to the wifi when they toggle the setting enabling airplay in XBMC.

Now the good bit, I think I've found a workable solution. mDNS includes support for notifying listeners of changes to the txtrecord after a service has been published (this works in the c# implementation which is just a wrapper for bonjour for windows, but presumably should work in other implementations). By applying an altered txtrecord to the airplay service you can 'refresh' the service detection in the iPhone causing it to display the monitor again.

In my implementation I update a dummy entry in the txtrecord every 10 seconds (I read here that, in OSX at least, updates are throttled if you do more than 10 a minute). This means that you will only ever have to wait a maximum of 10 seconds for the monitor to show after waking the iPhone. I'm not sure if this is going to cause excessive network chatter but the example use case for updating the txtrecord in this way is notifying a change of status of a messenger user (connected/away/etc) so presumably numerous updates are OK.

Why we have to jump through all of these hoops I do not know, if Apple wanted to block unlicensed implementations surely it wouldn't have been too hard to just outright block them instead of just partially breaking them...
(This post was last modified: 2014-03-10 04:10 by brownard.)
find quote
edrikk Offline
Senior Member
Posts: 231
Joined: Jul 2011
Reputation: 5
Post: #336
iOS 7.1 --> Still same issue
(This post was last modified: 2014-03-11 02:50 by edrikk.)
find quote
mikaelfinstad Offline
Junior Member
Posts: 4
Joined: Feb 2014
Reputation: 0
Post: #337
@joesmith13245
Just add a sleep, see:
http://mifi.no/blog/?p=108

This has been working great for me. Except sometimes I have to disable/enable wifi on my iphone to get it working.
(This post was last modified: 2014-03-11 11:51 by mikaelfinstad.)
find quote
DBMandrake Offline
Senior Member
Posts: 250
Joined: Feb 2013
Reputation: 6
Location: UK
Post: #338
(2014-03-11 11:48)mikaelfinstad Wrote:  @joesmith13245
Just add a sleep, see:
http://mifi.no/blog/?p=108

This has been working great for me. Except sometimes I have to disable/enable wifi on my iphone to get it working.
But that is precisely the issue - airplay video works for me too, on vanilla 12.2 without doing any of the above tweaks, if I disable and enable wifi on the iPad/iPhone once or twice when its wrongly detected as an audio device.

So not a proper fix.
(This post was last modified: 2014-03-11 12:03 by DBMandrake.)
find quote
mikaelfinstad Offline
Junior Member
Posts: 4
Joined: Feb 2014
Reputation: 0
Post: #339
*On 12.2 vanilla XBMC was always detected as an audio device no matter how many times i disabled/enabled WIFI.
*With the avahi-tweak it is detected as a video device most of the time, but sometimes as audio only. Then I just disable/enable WIFI once and it is detected as video. It's an inconvenience to have to do this, but at least it's working consistently.
(This post was last modified: 2014-03-11 20:39 by mikaelfinstad.)
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 10,159
Joined: Feb 2011
Reputation: 109
Location: germany
Post: #340
First post updated ... thx for the hint @brownard

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
jjones3 Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 0
Post: #341
Is test build 10 based on a nightly?
find quote
DBMandrake Offline
Senior Member
Posts: 250
Joined: Feb 2013
Reputation: 6
Location: UK
Post: #342
I'll give build 10 a go over the next few days, assuming it works on snow leopard. (I currently run a 32 bit build of Frodo)
(This post was last modified: 2014-03-12 09:07 by DBMandrake.)
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 10,159
Joined: Feb 2011
Reputation: 109
Location: germany
Post: #343
(2014-03-12 05:03)jjones3 Wrote:  Is test build 10 based on a nightly?

yes

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
edrikk Offline
Senior Member
Posts: 231
Joined: Jul 2011
Reputation: 5
Post: #344
This version has worked as advertised for me over the last 12 hours or so...

That includes:
Leaving the house twice
Running out of battery once. Smile
find quote
joesmith13245 Offline
Member
Posts: 50
Joined: Jan 2014
Reputation: 0
Post: #345
(2014-03-11 11:48)mikaelfinstad Wrote:  @joesmith13245
Just add a sleep, see:
http://mifi.no/blog/?p=108

This has been working great for me. Except sometimes I have to disable/enable wifi on my iphone to get it working.

This is exactly what I needed to implement the workaround! Thanks!
find quote
Post Reply