Kodi Community Forum
Help us solving the AirPlay issue when using iOS7 devices - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Help us solving the AirPlay issue when using iOS7 devices (/showthread.php?tid=179961)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - AussieFries - 2014-01-10

(2014-01-10, 15:04)Memphiz Wrote: if i got you right you are still announcing the et = 0,1,3,5 instead of 0,1.

Same behaviour with 0,1. Unable to airplay music.


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - Memphiz - 2014-01-10

(2014-01-10, 15:06)edrikk Wrote: Memphiz, is a build where both locations are set to Xbmc as model possible?

I don't get what you mean with that? If you change the model in the airpaly.xml to something - this value is used in all related announcements including the needed bits in the airplay communication (cmd "SERVER_INFO").


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - Memphiz - 2014-01-10

(2014-01-10, 16:00)AussieFries Wrote:
(2014-01-10, 15:04)Memphiz Wrote: if i got you right you are still announcing the et = 0,1,3,5 instead of 0,1.

Same behaviour with 0,1. Unable to airplay music.

In that case activate airtunesdebuglog in advancedsettings and see if you can see something interesting in the xbmc.log (grep it for "AIRTUNES").


Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - AussieFries - 2014-01-10

(2014-01-10, 17:01)Memphiz Wrote:
(2014-01-10, 15:06)edrikk Wrote: Memphiz, is a build where both locations are set to Xbmc as model possible?

I don't get what you mean with that? If you change the model in the airpaly.xml to something - this value is used in all related announcements including the needed bits in the airplay communication (cmd "SERVER_INFO").

Please forgive me if my remark is irrelevant, but I noticed that if you change the model name to sth that doesn't contain the word "AppleTV", Airplay is not gonna work.


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - Memphiz - 2014-01-10

We changed it to Xbmc,1 because at this point (i think it was back when ios6 was released) this fixed an issue with where OSX (10.8??) didn't recognize XBMC as airplay speaker - or only in a sporadic manner similar to what you are experiencing with ios7 now. Changing it to Xbmc,1 fixed that.


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - edrikk - 2014-01-10

(2014-01-10, 17:01)Memphiz Wrote:
(2014-01-10, 15:06)edrikk Wrote: Memphiz, is a build where both locations are set to Xbmc as model possible?

I don't get what you mean with that? If you change the model in the airpaly.xml to something - this value is used in all related announcements including the needed bits in the airplay communication (cmd "SERVER_INFO").


I'm sorry I mis-spoke. I meant the hardcoded user-agent... As That was part of the testbuild 3 which was the only one people complained about incorrect image being shown.

I've done a lot of testing this morning.. Here's what I've seen (between each test I: Turned off phone, Restarted router, stopped bonjour, stopped xbmc, started bonjour, started xbmc, phone on).
Notice I tried to change one variable at a time. Thank God this isn't a BB or the reboots would take all day! Wink

Code:
<entry key="et" value="0,1" /> <!-- supported encryptions 0-no enc, 1-RSA, 3, FairPlay, 4 - MFiSAP, 5-FairPlay SAPv2.5 -->
  <features>0x19F7</features> <!-- features bit field -->
  <model>AppleTV3,2</model> <!-- the model name -->

no Music

Code:
<entry key="et" value="0,1" /> <!-- supported encryptions 0-no enc, 1-RSA, 3, FairPlay, 4 - MFiSAP, 5-FairPlay SAPv2.5 -->
  <features>0x39f7</features> <!-- features bit field -->
  <model>AppleTV3,2</model> <!-- the model name -->

no Music


Code:
<entry key="et" value="0,1,3,5" /> <!-- supported encryptions 0-no enc, 1-RSA, 3, FairPlay, 4 - MFiSAP, 5-FairPlay SAPv2.5 -->
  <features>0x39f7</features> <!-- features bit field -->
  <model>AppleTV3,2</model> <!-- the model name -->


no Music


Code:
<features>0x39f7</features> <!-- features bit field -->
  <entry key="et" value="0,1,3,5" /> <!-- supported encryptions 0-no enc, 1-RSA, 3, FairPlay, 4 - MFiSAP, 5-FairPlay SAPv2.5 -->
  <model>Xbmc,1</model> <!-- the model name -->

No Music.


Code:
<model>Xbmc,1</model> <!-- the model name -->
  <features>0x39f7</features> <!-- features bit field -->
  <entry key="et" value="0,1" /> <!-- supported encryptions 0-no enc, 1-RSA, 3, FairPlay, 4 - MFiSAP, 5-FairPlay SAPv2.5 -->


Seems to have worked... Music played, pictures showed (incorrectly), and videos played.
I rechecked this one again by: Turning off phone, Restarting router, stopping bonjour, stopping xbmc, start bonjour, start xbmc, phone on. same results/

BUT

Turning on Mirroring seems to "crash" the "TV Symbol" as Speaker symbol comes and stays up forever.
I noted the following errors in log file:

Code:
10:27:37 T:8500   ERROR: AIRPLAY Server: unhandled request [/fp-setup]

and

Code:
10:28:02 T:11376   ERROR: CCurlFile::FillBuffer - Failed: Transferred a partial file(18)
10:28:02 T:11376  NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1



RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - AussieFries - 2014-01-10

(2014-01-10, 17:02)Memphiz Wrote:
(2014-01-10, 16:00)AussieFries Wrote:
(2014-01-10, 15:04)Memphiz Wrote: if i got you right you are still announcing the et = 0,1,3,5 instead of 0,1.

Same behaviour with 0,1. Unable to airplay music.

In that case activate airtunesdebuglog in advancedsettings and see if you can see something interesting in the xbmc.log (grep it for "AIRTUNES").

http://pastebin.com/JRkwbRnv


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - Axuttaja - 2014-01-10

I've been playing around with build 6 and whatever may my settings be, I pretty much get the same results

Pictures: Wrong ones(because of the caching)
Music: No
Videos: Yes, Youtube and Camera Roll

I had some setup that turned the Mirroring off but I lost the .xml by accident, went to eat and forgot it. (Yes, Really.. Confused)

Edit: I think the problem is not the announcement alone. The communications is broken.
EDIT: It turns out that whenever i exit XBMC change the .xml and restart XBMC only value that allows
changes is <model> the others are same as 12.3, what's up with that? What I'm doing wrong?
I don't mind restarting my router since I'm running Bonjour Browser on same computer as XBMC.
Should I restart Computer everytime I make a change?


Edit: ignore previous edit reinstall fixed...


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - edrikk - 2014-01-10

If you haven't tried, can you:: turn off iPhone, turn off xbmc, stop bonjour service, reboot router, set settings to what I saw worked above, start bonjour, start xbmc, start phone and try?

That should pretty ensure a "clean" test (and either validate it put my finding to question).


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - Memphiz - 2014-01-10

(2014-01-10, 18:11)AussieFries Wrote:
(2014-01-10, 17:02)Memphiz Wrote:
(2014-01-10, 16:00)AussieFries Wrote: Same behaviour with 0,1. Unable to airplay music.

In that case activate airtunesdebuglog in advancedsettings and see if you can see something interesting in the xbmc.log (grep it for "AIRTUNES").

http://pastebin.com/JRkwbRnv

Yep now we are in a state where the communication is broken of some sort. This time the libshairplay (airtunes) gets an "/fp-setup" request which is basically the start of the fairplay handshake. If you ask me - ios7 should never send this because we announce et 0,1 (read like "we only support rsa encryption - DON'T you ever talk fairplay to me).

Stupid airplay protocol. I wrote an email to the libshairplay dev and hope he has some input to us.


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - edwr - 2014-01-10

(2014-01-10, 18:05)edrikk Wrote:
Code:
<model>Xbmc,1</model> <!-- the model name -->
  <features>0x39f7</features> <!-- features bit field -->
  <entry key="et" value="0,1" /> <!-- supported encryptions 0-no enc, 1-RSA, 3, FairPlay, 4 - MFiSAP, 5-FairPlay SAPv2.5 -->


Seems to have worked... Music played, pictures showed (incorrectly), and videos played.
I rechecked this one again by: Turning off phone, Restarting router, stopping bonjour, stopping xbmc, start bonjour, start xbmc, phone on. same results/

BUT

Turning on Mirroring seems to "crash" the "TV Symbol" as Speaker symbol comes and stays up forever.
This came up as an audio-only target for me, though after I toggled wifi a few times, it did eventually show up as a video target. As someone said earlier, whenever the model is set to AppleTV, regardless of whatever feature bits are set (even complete garbage), xbmc will show up unerringly as a video target. I went back and installed the earlier testbuild (3) that only changed that announcement, but it was still the inconsistent behavior I noted before of sometimes not showing at all, sometimes video target.

Code:
model        AppleTV3,2
srcvers        101.28
features    0x77

tp        UDP
ek        1
et        0,1
cn        0,1
vn        3
vs        130.14
sv        false
da        true
ss        16
txtvers        1
pw        false
sm        false
md        0,1,2
sr        44100
ch        2
am        AppleTV3,2
Those are the bonjour announcements for that version. After some more testing, it seems that it's the combination of model and correct version number that makes it always appear as a video target. Changing nothing but the version number of testbuild 6 back to 101.28 reverts back to the inconsistent sometimes showing, sometimes not. You can even have an xml with completely mucked up announcements except for the correct model and version number and it'll still (at least for me) show up every time correctly:

Code:
<!-- values taken from airserver -->
<!-- see http://nto.github.io/AirPlay.html#servicediscovery-airtunesservice for slightly outdated reverse engineering -->
<airplay>
<genericannounce>
<!--  <mac>FF:FF:FF:FF:FF:F3</mac> --><!-- uncomment for overwriting the real mac with custom value -->
  <features>AIRPLAYSUCKS</features> <!-- features bit field -->
  <srcvers>150.33</srcvers> <!-- used protocol version -->
  <model>AppleTV3,2</model> <!-- the model name -->
</genericannounce>

<airplayannounce>
  <entry key="vv" value="GARBAGE" /> <!-- key value pair to announce as txt record via zeroconf -->
</airplayannounce>

<airtunesannounce>
  <entry key="txtvers" value="GARBAGE" />
  <entry key="cn" value="GARBAGE" /> <!-- supported audio codecs pcm and alac -->
  <entry key="ch" value="GARBAGE" /> <!-- number of supported channels 2 -->
  <entry key="ek" value="GARBAGE" /> <!-- undocumented -->
  <entry key="et" value="GARBAGE" /> <!-- supported encryptions 0-no enc, 1-RSA, 3, FairPlay, 4 - MFiSAP, 5-FairPlay SAPv2.5 -->
  <entry key="sv" value="GARBAGE" /> <!-- undocumented -->
  <entry key="tp" value="GARBAGE" /> <!-- transport protocol -->
  <entry key="ss" value="GARBAGE" /> <!--sample size 16 bit -->
  <entry key="sr" value="GARBAGE" /> <!-- sample rate 44100 hz -->
  <entry key="pw" value="GARBAGE" /> <!-- no password protection -->
  <entry key="vn" value="GARBAGE" /> <!-- undocumented -->
  <entry key="da" value="GARBAGE" /> <!-- undocumented -->
  <entry key="md" value="GARBAGE" /> <!-- metadata support 0-text, 1-artwork, 2-progress -->
  <entry key="sf" value="GARBAGE" /> <!-- undocumented -->
</airtunesannounce>
</airplay>



RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - Axuttaja - 2014-01-10

(2014-01-10, 19:34)edrikk Wrote: If you haven't tried, can you:: turn off iPhone, turn off xbmc, stop bonjour service, reboot router, set settings to what I saw worked above, start bonjour, start xbmc, start phone and try?

That should pretty ensure a "clean" test (and either validate it put my finding to question).

No, because i may randomly get videos work on 12.3 and read my Post #143 <- Don't read it won't help...

@edwr I tested your theory and i confirm it working, and Bonjour Browser confirms that XBMC does what it should...

I'm confused...
Edit: No more confusion, reinstall helps.. Blush


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - Memphiz - 2014-01-10

Beware ... i parse the feature hex number into dec - writing a string there might behave strange or even crash Wink. Did you verify that this announcement really was visible in bonjour browser?


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - edrikk - 2014-01-10

As you say Memphiz, given that the Apple code has things at two levels (in this case "et" flag, as well as the Features bits 2, 12, and Feature bit 7 (Mirroring) which from my reading also enforces Fairplay), what we're trying to do is find the "right" path through the AirPlay nested "if" statement tree... Fun times. Smile


Your path of going through libshairplay author is definitely a good thought/path.


RE: Help us solving the AirPlay issue when using iOS7 devices - Testers needed! - edwr - 2014-01-10

(2014-01-10, 20:05)Memphiz Wrote: Beware ... i parse the feature hex number into dec - writing a string there might behave strange or even crash Wink. Did you verify that this announcement really was visible in bonjour browser?

Yeah, checked with bonjour browser to make sure.

http://imgur.com/ZMgDDXw
http://imgur.com/mtICt3S