Discovery Proxy Setup Problem with Mojave and HomePod
Opened this issue · 9 comments
Hi,
First and foremost THANK YOU for writing the Discovery Proxy! I was waiting for a solution for different subnets for years and I couldn't believe what I was hearing in the Advances in Networking, Part 2 WWDC 2019 session. Great Work!
Unfortunately the DNS-SD Discovery Proxy does not work in my current setup.
- Main router has a local network of 10.0.0.0/24
- 2 HomePods are connected to the 10.0.0.0/24 network
- WiFi access point connected via ethernet to the 10.0.0.0/24 network creates a WiFi network 192.168.1.0/24
- Mac mini 2018 with macOS Mojave 10.14.5 running the Discovery Proxy with IP 10.0.0.21
- iPad running iOS 13 beta 1 is connected to the 192.168.1.0/24 network
- iPad has manual DNS-Server 10.0.0.21
- iPad has manual Search Domain service.home.arpa
- Config of the Discovery Proxy is the following:
interface en0 service.home.arpa.
my-name discoveryproxy.home.arpa.
my-ipv4-addr 10.0.0.21
udp-port 53
tcp-port 53
tls-port 853
In the dnssd-proxy
logs I can clearly see that the iPad successfully uses the Mac mini as it's DNS server. But I still can't discover the HomePods with the iPad.
Was anyone so far able to successfully setup a Discovery Proxy? Did I make any mistake? Does it not work for my setup?
Thank you for your help!
P.S: I tried to start a discussion on the Apple Developer Forums as recommended in the Readme, but my discussion is stuck with A moderator needs to approve it before it can be posted.
for a quite some time now.
Hi @Abhayakara,
Thank you very much for your help. I deleted the my_name
line from /etc/dnssd-proxy.cf
, which now looks like this:
interface en0 service.home.arpa.
my-ipv4-addr 10.0.0.21
udp-port 53
tcp-port 53
tls-port 853
When I run afterwards dnssd-proxy
, I immediately see the following logs:
hardwired_add: fullname b._dns-sd._udp.service.home.arpa. name b._dns-sd._udp type 12 rdlen 19
hardwired_add: fullname lb._dns-sd._udp.service.home.arpa. name lb._dns-sd._udp type 12 rdlen 19
hardwired_add: fullname _dns-llq._udp.service.home.arpa. name _dns-llq._udp type 33 rdlen 0
hardwired_add: fullname _dns-llq-tls._tcp.service.home.arpa. name _dns-llq-tls._tcp type 33 rdlen 0
hardwired_add: fullname _dns-update._udp.service.home.arpa. name _dns-update._udp type 33 rdlen 0
hardwired_add: fullname _dns-update-tls._tcp.service.home.arpa. name _dns-update-tls._tcp type 33 rdlen 0
hardwired_add: fullname _dns-push._tcp.service.home.arpa. name _dns-push._tcp type 33 rdlen 28
hardwired_add: fullname _dns-push-tls._tcp.service.home.arpa. name _dns-push-tls._tcp type 33 rdlen 28
hardwired_add: fullname _dns-query-tls._udp.service.home.arpa. name _dns-query-tls._udp type 33 rdlen 28
hardwired_add: fullname ns.service.home.arpa. name ns type 1 rdlen 4
hardwired_add: fullname .service.home.arpa. name type 2 rdlen 22
hardwired_add: fullname .service.home.arpa. name type 6 rdlen 72
1560363133.122 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
When I then search for AirPlay players in the music widget of the control center, I unfortunately still don't see the HomePods. Also I do not see any logs appearing in the terminal window while I search for AirPlay devices.
After some time I see the following logs, which I think are normal DNS request made from the iPad:
46.985 seconds passed waiting, got 1 events
rrtype: 1 qclass: 1 name: time-ios.apple.com.
dns question: type 1 class 1 time-ios.apple.com.
name = time-ios.apple.com.
dp_query_start: DNSServiceQueryRecord started for 'time-ios.apple.com.': 0
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
0.001 seconds passed waiting, got 1 events
time-ios.apple.com. 5 1 18 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 24
dns answer: type 05 class 01 time-ios.apple.com. (p)
compressing time-ios.g.aaplimg.com.
time-ios.g.aaplimg.com. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 time-ios.apple.com. (p)
record type 1 not translated
time-ios.g.aaplimg.com. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 time-ios.apple.com. (p)
record type 1 not translated
time-ios.g.aaplimg.com. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 time-ios.apple.com. (p)
record type 1 not translated
dp_query_send_dns_response: time-ios.apple.com. (len 128)
dispatched 1 events.
0.001 seconds have passed on entry to ioloop_events
dnssd_query_finalize on time-ios.apple.com.
waiting 8640000 0 seconds
0.017 seconds passed waiting, got 1 events
rrtype: 1 qclass: 1 name: time-ios.g.aaplimg.com.
dns question: type 1 class 1 time-ios.g.aaplimg.com.
name = time-ios.g.aaplimg.com.
dp_query_start: DNSServiceQueryRecord started for 'time-ios.g.aaplimg.com.': 0
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
0.000 seconds passed waiting, got 1 events
time-ios.g.aaplimg.com. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 time-ios.g.aaplimg.com. (p)
record type 1 not translated
time-ios.g.aaplimg.com. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 time-ios.g.aaplimg.com. (p)
record type 1 not translated
time-ios.g.aaplimg.com. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 time-ios.g.aaplimg.com. (p)
record type 1 not translated
dp_query_send_dns_response: time-ios.g.aaplimg.com. (len 99)
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
dnssd_query_finalize on time-ios.g.aaplimg.com.
waiting 8640000 0 seconds
147.116 seconds passed waiting, got 1 events
rrtype: 1 qclass: 1 name: gsp-ssl.ls.apple.com.
dns question: type 1 class 1 gsp-ssl.ls.apple.com.
name = gsp-ssl.ls.apple.com.
dp_query_start: DNSServiceQueryRecord started for 'gsp-ssl.ls.apple.com.': 0
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
0.030 seconds passed waiting, got 1 events
gsp-ssl.ls.apple.com. 5 1 21 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 33
dns answer: type 05 class 01 gsp-ssl.ls.apple.com. (p)
compressing gsp-ssl.ls-apple.com.akadns.net.
gsp-ssl.ls-apple.com.akadns.net. 5 1 28 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 40
dns answer: type 05 class 01 gsp-ssl.ls.apple.com. (p)
compressing gsp-ssl-geomap.ls-apple.com.akadns.net.
gsp-ssl-geomap.ls-apple.com.akadns.net. 5 1 2a 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 42
dns answer: type 05 class 01 gsp-ssl.ls.apple.com. (p)
compressing gsp-ssl-frontend.ls-apple.com.akadns.net.
gsp-ssl-frontend.ls-apple.com.akadns.net. 5 1 29 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 41
dns answer: type 05 class 01 gsp-ssl.ls.apple.com. (p)
compressing gsp-ssl-dynamic.ls-apple.com.akadns.net.
gsp-ssl-dynamic.ls-apple.com.akadns.net. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 gsp-ssl.ls.apple.com. (p)
record type 1 not translated
dp_query_send_dns_response: gsp-ssl.ls.apple.com. (len 200)
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
dnssd_query_finalize on gsp-ssl.ls.apple.com.
waiting 8640000 0 seconds
0.011 seconds passed waiting, got 1 events
rrtype: 1 qclass: 1 name: gsp-ssl.ls-apple.com.akadns.net.
dns question: type 1 class 1 gsp-ssl.ls-apple.com.akadns.net.
name = gsp-ssl.ls-apple.com.akadns.net.
dp_query_start: DNSServiceQueryRecord started for 'gsp-ssl.ls-apple.com.akadns.net.': 0
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
0.000 seconds passed waiting, got 1 events
gsp-ssl.ls-apple.com.akadns.net. 5 1 28 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 40
dns answer: type 05 class 01 gsp-ssl.ls-apple.com.akadns.net. (p)
compressing gsp-ssl-geomap.ls-apple.com.akadns.net.
gsp-ssl-geomap.ls-apple.com.akadns.net. 5 1 2a 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 42
dns answer: type 05 class 01 gsp-ssl.ls-apple.com.akadns.net. (p)
compressing gsp-ssl-frontend.ls-apple.com.akadns.net.
gsp-ssl-frontend.ls-apple.com.akadns.net. 5 1 29 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 41
dns answer: type 05 class 01 gsp-ssl.ls-apple.com.akadns.net. (p)
compressing gsp-ssl-dynamic.ls-apple.com.akadns.net.
gsp-ssl-dynamic.ls-apple.com.akadns.net. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 gsp-ssl.ls-apple.com.akadns.net. (p)
record type 1 not translated
dp_query_send_dns_response: gsp-ssl.ls-apple.com.akadns.net. (len 166)
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
dnssd_query_finalize on gsp-ssl.ls-apple.com.akadns.net.
waiting 8640000 0 seconds
0.006 seconds passed waiting, got 1 events
rrtype: 1 qclass: 1 name: gsp-ssl-geomap.ls-apple.com.akadns.net.
dns question: type 1 class 1 gsp-ssl-geomap.ls-apple.com.akadns.net.
name = gsp-ssl-geomap.ls-apple.com.akadns.net.
dp_query_start: DNSServiceQueryRecord started for 'gsp-ssl-geomap.ls-apple.com.akadns.net.': 0
dispatched 1 events.
0.001 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
0.000 seconds passed waiting, got 1 events
gsp-ssl-geomap.ls-apple.com.akadns.net. 5 1 2a 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 42
dns answer: type 05 class 01 gsp-ssl-geomap.ls-apple.com.akadns.net. (p)
compressing gsp-ssl-frontend.ls-apple.com.akadns.net.
gsp-ssl-frontend.ls-apple.com.akadns.net. 5 1 29 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 41
dns answer: type 05 class 01 gsp-ssl-geomap.ls-apple.com.akadns.net. (p)
compressing gsp-ssl-dynamic.ls-apple.com.akadns.net.
gsp-ssl-dynamic.ls-apple.com.akadns.net. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 gsp-ssl-geomap.ls-apple.com.akadns.net. (p)
record type 1 not translated
dp_query_send_dns_response: gsp-ssl-geomap.ls-apple.com.akadns.net. (len 144)
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
dnssd_query_finalize on gsp-ssl-geomap.ls-apple.com.akadns.net.
waiting 8640000 0 seconds
0.024 seconds passed waiting, got 1 events
rrtype: 1 qclass: 1 name: gsp-ssl-frontend.ls-apple.com.akadns.net.
dns question: type 1 class 1 gsp-ssl-frontend.ls-apple.com.akadns.net.
name = gsp-ssl-frontend.ls-apple.com.akadns.net.
dp_query_start: DNSServiceQueryRecord started for 'gsp-ssl-frontend.ls-apple.com.akadns.net.': 0
dispatched 1 events.
0.001 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
0.000 seconds passed waiting, got 1 events
gsp-ssl-frontend.ls-apple.com.akadns.net. 5 1 29 0
dp_query_add_data_to_response: survived for rrtype 5 rdlen 41
dns answer: type 05 class 01 gsp-ssl-frontend.ls-apple.com.akadns.net. (p)
compressing gsp-ssl-dynamic.ls-apple.com.akadns.net.
gsp-ssl-dynamic.ls-apple.com.akadns.net. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 gsp-ssl-frontend.ls-apple.com.akadns.net. (p)
record type 1 not translated
dp_query_send_dns_response: gsp-ssl-frontend.ls-apple.com.akadns.net. (len 115)
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
dnssd_query_finalize on gsp-ssl-frontend.ls-apple.com.akadns.net.
waiting 8640000 0 seconds
0.011 seconds passed waiting, got 1 events
rrtype: 1 qclass: 1 name: gsp-ssl-dynamic.ls-apple.com.akadns.net.
dns question: type 1 class 1 gsp-ssl-dynamic.ls-apple.com.akadns.net.
name = gsp-ssl-dynamic.ls-apple.com.akadns.net.
dp_query_start: DNSServiceQueryRecord started for 'gsp-ssl-dynamic.ls-apple.com.akadns.net.': 0
dispatched 1 events.
0.000 seconds have passed on entry to ioloop_events
waiting 8640000 0 seconds
0.000 seconds passed waiting, got 1 events
gsp-ssl-dynamic.ls-apple.com.akadns.net. 1 1 4 0
dp_query_add_data_to_response: survived for rrtype 1 rdlen 4
dns answer: type 01 class 01 gsp-ssl-dynamic.ls-apple.com.akadns.net. (p)
record type 1 not translated
dp_query_send_dns_response: gsp-ssl-dynamic.ls-apple.com.akadns.net. (len 84)
dispatched 1 events.
0.001 seconds have passed on entry to ioloop_events
dnssd_query_finalize on gsp-ssl-dynamic.ls-apple.com.akadns.net.
waiting 8640000 0 seconds
I hope these logs help.
If I run the iOS app Discovery on the iPad, I can see that the domain service.home.arpa
includes all the services of the other subnet. So the iPad is generally seeing them, but it is ignoring it for the AirPlay destination.
And indeed if I add my-name discoveryproxy.home.arpa.
back into the config file, the Discovery
app is stuck at Scanning...
for the service.home.arpa
domain.
I also have an Apple TV 4 (HD) in the 10.0.0.0/24 subdomain, which does not show up in the Screen Monitoring nor Music widget either. It does, however, appear in the bonjour Discovery app. So you should be able to reproduce the issue with an Apple TV as well.
In the meantime I tried an AirPrint printer and it works! With the Discovery Proxy running I can print from the 192.168.1.0/24 subnet on the printer connected to the 10.0.0.0/24 subnet.
I know that my network setup should allow the iPad to play on the HomePod via AirPlay once we figure the Discovery Proxy out, because at the moment I am running a custom app/daemon which use NetServiceBrowser
and NetService
on my Mac mini to discover the bonjour services on the 10.0.0.0/24 subnet and an avahi-daemon
on a Raspberry Pi in the 192.168.1.0/24 subnet to proxy the services.
To test this Discovery Proxy
I obviously stopped both daemons so they don't interfere with this proxy.
Please let me know if you need more information for debugging. I am happy to help.
Unfortunately I have frustrating news for you. For policy reasons Apple requires AirPlay clients and servers to be within the same broadcast domain, and prohibits the use of unicast for discovering AirPlay services. I have added a note about this to the README file.
That is really unfortunate. Thank you for sharing that information with me though. I hope that policy will be changed at some point.