I have a Bonjour _http._tcp. service published on iPhone. With the iPhone Wifi Off; running the following dns-sd command on MacBook's terminal:
dns-sd -B _services._dns-sd._udp
then connect the iPhone to MacBook with USB Lighting cable, dns-sd would discover the following iPhone service:
Timestamp A/R Flags if Domain Service Type Instance Name
19:22:45.126 Add 3 5 . _tcp.local. _http
disconnect the USB Lighting cable from the MacBook would show:
Timestamp A/R Flags if Domain Service Type Instance Name
19:22:45.126 Add 3 5 . _tcp.local. _http
19:23:53.924 Rmv 1 5 . _tcp.local. _http
However, repeating the above steps (running dns-sd, connect and disconnect USB Lighting to PC) on Windows 10 PC, dns-sd did not discover the service.
With the iPhone Wifi On, dns-sd on PC would discover the iPhone service:
Timestamp A/R Flags if Domain Service Type Instance Name
19:32:36.238 Add 2 13 . _tcp.local. _http
when the iPhone Wifi Off, dns-sd on PC would show:
Timestamp A/R Flags if Domain Service Type Instance Name
19:32:36.238 Add 2 13 . _tcp.local. _http
19:33:38.471 Rmv 0 13 . _tcp.local. _http
I had Bonjour SDK v333.10 installed from https://developer.apple.com/download/more/?=Bonjour%20SDK%20for%20Windows; and iTunes is working fine (can show the iPhone) on the PC too.
Why dns-sd (Bonjour/ZeroConf) on PC did not discover the iPhone service via USB?
Many thanks.