RxBonjour icon indicating copy to clipboard operation
RxBonjour copied to clipboard

Getting host address as 0.0.0.0

Open rohan2817 opened this issue 7 years ago • 2 comments

When I try to use this library in android devices connected to WiFi network it works smoothly and discovers the service as desired.

But when I try to use it on Android devices connected to network through Ethernet cable it finds/discovers the service but it returns host address as 0.0.0.0

Is there any solution to find host address while connected over ethernet, or it only supports devices connected to WiFi.

rohan2817 avatar Feb 08 '18 11:02 rohan2817

Thanks for your report! I don't think I will be able to easily reproduce this on my end, unfortunately. Could you help me by stepping through the setup process, trying to check where the host address is being returned from? That would be a good first lead. I suppose it might come from WifiManager's involvement, but I want to make sure.

mannodermaus avatar Feb 08 '18 12:02 mannodermaus

I have 2 android devices connected to a router using ethernet cables and tried to discover service in one device which was registered from another one.

My first assumption on this is the library is trying to get host address from WifiManager, but as I am using Ethernet, host address needs to be fetched from ConnectivityManager

For reproducing this I would suggest using an OTG Ethernet Adapter eg: OTG-Ethernet

rohan2817 avatar Feb 09 '18 05:02 rohan2817