Bonsoir icon indicating copy to clipboard operation
Bonsoir copied to clipboard

Can't get ip address from discovery service

Open marco-1988 opened this issue 3 years ago • 5 comments

Hi

I have a problem with discovery services with this plugin. If I use Debug, I see all attributes of discoveredServices, but if I try to get ip I can't. If Try to save this to variable with var ipAddress = discoveredServices[0].ip I can't use, but can use name, type, port and attributes, but can't use ip.

I don't know if this is a bug or not. Why? Can help me? Thanks.

marco-1988 avatar Sep 21 '21 16:09 marco-1988

Hi, marco-1988

Is type of discoveredService ResolvedBonsoirService? if it is BonsoirService, don't have ip.

check it please. Or, can you look at the code ?

RyoheiTomiyama avatar Oct 03 '21 05:10 RyoheiTomiyama

Try

var service = event.service as ResolvedBonsoirService;

Then you can access service.ip

rstewart22 avatar Oct 22 '21 14:10 rstewart22

Hi @RyoheiTomiyama , This plugin works great. Thanks for providing this plugin. In my case i am facing different issue. When service has two ip address, i am not able to pick the right one. Example

service -> 169.254.180.80 -> 192.168.29.10 Here i am expecting second one. but it is giving the first ip always.

sureace avatar Oct 29 '21 06:10 sureace

Hi, @sureace .

I'm sorry, but I'm not an administrator. I'm also a user. I agree that this plugin is great.

As for your question, 192.168.*. * is a private IP. If Discovery and Broadcast are connected to the same network, I think you can get 192.168.*.*.

RyoheiTomiyama avatar Nov 09 '21 05:11 RyoheiTomiyama

@sureace you might be interested in https://github.com/Skyost/Bonsoir/pull/35/files

adidevsoft avatar Dec 07 '21 10:12 adidevsoft