mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.29k stars 574 forks source link

iphone sees only two instances but macbook sees three (maybe related to IPv4/6?) #442

Closed seberoon closed 7 years ago

seberoon commented 7 years ago

I have shairport-sync running on three Raspberry Pi's on my home network. All RPis are connected via wired ethernet. iTunes running on a macbook (OS 10.11.5) sees all three RPis but my iPhone (iOS 10.1.1) sees only two of the three. Both macbook and iPhone are connected vi wifi.

Running avahi-browse (see snippets below) on one of the RPis, I see only one obvious distinguishing difference between the visible (Kitchen and Snug) and the "semi-invisible" (Woody): Woody seems only to offer an IPv4 instance whereas the other two offer both IPv4 and IPv6.

Any suggestions?

> avahi-browse -ar

[snip]

+   eth0 IPv6 DD11A99AAF26@Snug                             AirTunes Remote Audio local
+   eth0 IPv6 33FA00A66F2E@Kitchen                          AirTunes Remote Audio local
+   eth0 IPv4 31B5F1D49F55@Woody                            AirTunes Remote Audio local
+   eth0 IPv4 33FA00A66F2E@Kitchen                          AirTunes Remote Audio local
+   eth0 IPv4 DD11A99AAF26@Snug                             AirTunes Remote Audio local

[snip]

=   eth0 IPv6 33FA00A66F2E@Kitchen                          AirTunes Remote Audio local
   hostname = [Kitchen.local]
   address = [fe80::xxxx:xxxx:xxxx:xxxx]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=76400.10" "sf=0x4"]
=   eth0 IPv6 DD11A99AAF26@Snug                             AirTunes Remote Audio local
   hostname = [Snug.local]
   address = [fe80::xxxx:xxxx:xxxx:xxxx]
   port = [5002]
   txt = ["pw=false" "txtvers=1" "vn=3" "sr=44100" "ss=16" "ch=2" "cn=0,1" "et=0,1" "ek=1" "sm=false" "tp=UDP"]
=   eth0 IPv4 33FA00A66F2E@Kitchen                          AirTunes Remote Audio local
   hostname = [Kitchen.local]
   address = [192.168.xxx.xxx]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=76400.10" "sf=0x4"]
=   eth0 IPv4 31B5F1D49F55@Woody                            AirTunes Remote Audio local
   hostname = [Woody.local]
   address = [192.168.xxx.xxx]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=76400.10" "sf=0x4"]
=   eth0 IPv4 DD11A99AAF26@Snug                             AirTunes Remote Audio local
   hostname = [Snug.local]
   address = [192.168.xxx.xxx]
   port = [5002]
   txt = ["pw=false" "txtvers=1" "vn=3" "sr=44100" "ss=16" "ch=2" "cn=0,1" "et=0,1" "ek=1" "sm=false" "tp=UDP"]

[snip]
mikebrady commented 7 years ago

Thanks for the post. the IPv4-only issue deserves attention. Can you move the devices around to see if the phenomenon is related to the device or the location? I guess it's hardly likely, or is it, that the iPhone only uses IPv6 on the WiFi network?

seberoon commented 7 years ago

Thanks for the suggestions. It turns out that the problem RPi wasn't loading the ipv6 kernel module at boot. Adding ipv6 to /etc/modules fixed that. Restarted phone and, hey presto, it now sees all three. So problem solved, I guess. But a bit too much voodoo for me to feel fully happy. My phone definitely has an IPv4 address. (I'm guessing it has IPv6 too, I just don't know how to get the phone to tell me.) Should I close?

mikebrady commented 7 years ago

There are utility apps that will tell you that kind of stuff – I use one simply called "Status". There is also a utility called "Discovery" for iOS that will show you what the iPhone sees in terms of Zeroconf/Bonjour signalling. Very useful. I think it's right to close it, as the issue does seem to be caused beyond the "boundary" of Shairport Sync.

seberoon commented 7 years ago

Thanks for the tips. I installed an app which gives more info about network interfaces on the phone and yes, it has an IPv6 address. Closing now. Thanks again.