Open black-snow opened 7 years ago
Hi there @black-snow
Not only am I interested in fixing it, check out resin-io/bonjour#1, which should do what you're looking for. :)
I've not had a chance to test under Windows, but Avahi was certainly able to pick up published services under Linux and dns-sd -B
found them under MacOS.
Please let me know if it doesn't work!
Hope this helps!
Oh, I thought npm i resin-io/bonjour
would give me the latest version. But I guess it fetches the last release (which is from watson).
Anyways, I copied the sources from lib to my local node_modules/bonjour
but the result seems to be the same as before. I'm using this from inside electron - gonna check a vanilla node app.
/edit: @hedss nope, not working in vanilla node either (7.3.0 / win 10 x64)
HI again @black-snow
npm i resin-io/bonjour
should indeed install the latest version (and for me, that includes the changes made for service discovery).
I've just tried a quick test running on my Mac, and the following code does indeed show up the quickTest
HTTP service under both dns-sd -b
and avahi-browse -a
:
var Bonjour = require('bonjour');
var instance = new Bonjour();
instance.publish({ name: 'quickTest', type: 'http', port: 3000 });
Is it possible you might have to enable another service in Win10 to get MDNS running? It appears MDNS should be enabled in Win10, but maybe it's not enabled by default:
https://www.slightfuture.com/technote/windows-mdns-dnssd https://discussions.apple.com/thread/7156505?start=0&tstart=0
Hey,
sadly I have no idea what's under the hood and how the mdns implementation is supposed to work. Also I have no idea how to debug this :(
Hi,
The best course I can think of is manually installing Bonjour for Windows from the Apple site:
https://support.apple.com/kb/dl999?locale=en_US
If that doesn't work, I'll try and look into it when I have a moment, but I doubt that's going to be anytime soon, I'm afraid. :-(
@hedss Thanks for the reply.
Bonjour (from Apple) works fine, that's not an issue. Currently I'm forced to install bonjour (the SDK) on the client's machine. I wanted to circumvent this by leveraging this node module. Is there any documantation you can point me to?
@black-snow Sorry for the delay in response.
My assumption is that something is stopping the multicast-dns
NPM module (which bonjour
relies upon) from running correctly:
https://github.com/mafintosh/multicast-dns
Might be worth running its test suite to see if it works. I can only assume there's some clash between it and something already installed?
I'd also install Wireshark:
To see if any MDNS packets are actually being sent on the wire.
@hedss
I already ran the tests for multicast-dns
, multicast-dns-service-types
and bonjour
actually. All passed.
But that's not very astounding for I do see the services announced on the same machine. (at least with dns-sd
)
I followed your good idea and monitored my network traffic. And there is ... nothing. The mdns messages are coming from my zeroconf enabled raspi that's in the same network. Running dns-sd -R
produces the expected packages.
Runs fine on my mac.
@hedss any update on the recommended way to advertise bonjour in a resin.io container please?
I can discover on the same machine but not from Bonjour browser on a mac.
Hello,
do you have any interest in fixing https://github.com/watson/bonjour/issues/14 (and its dupes)? I'd like to use the package but zeroconf announcements made on my win 10 machine are not visible on any other device on my network. Announcements via
dns-sd
do work fine.I'm willing to contribute but currently I ain't got no idea how any of this works ;)
Cheers