becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

Zeroconf on 169.254.x.x #8

Closed cvoisey closed 8 years ago

cvoisey commented 8 years ago

My apologies for asking this hear, but I figured someone looking this plug-in would probably have the correct answer. I am using this zerocof plugin to discover a device on my network, however when we first connect to the device to configure it we do it directly. i.e., choose that wifi network, and perform the connection. The device doesn't have a DHCP service on it, so it doesn't set an IP address and we fall back to the 169.254.x.x address. I see the device through this plug-in, so I know we can find it. But I can't connect to that device using the hostname. Note that the device defaults its own IP address as 192.168.1.23 and if I change my TCPIP settings manually to make my computer 192.168.1.100 (or anything) I can use this hostname to control it. Can anyone confirm that you can't actually talk to the device if it is set-up as above?

I really appreciate the feedback!

If anyone else has a better place for me to ask this, please let me know too!

becvert commented 8 years ago

Hi. I'm not sure I understand you fully, but I believe that 169.254.x.x is an auto-assigned IP caused by the absence of DHCP indeed. Your network address range is 192.168.1.x That is 2 separate subnets. The devices are able to see each other because ZeroConf/Bonjour uses IP multicast (address 224.0.0.251). So my answer to your question is you can't talk to the device with this setup. Regards

cvoisey commented 8 years ago

Thanks for your answer! I think you definitely did understand exactly what I was asking. I guess the answer really boils down to whether you can use zeroconf to go across different subnets, which you answered!

Thanks for the answer!!