-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to scan all mDNS in the network #8
Comments
To my understanding, there's no wildcard in the DNS-SD specification. On the plus side, chapter 9 about service type enumeration states that if you use the special type Right now the plugin doesn't support this special type (the string doesn't pass the validation regex) but I will have a look at this because it could definitely be useful. |
As I wrote on osociety/vernet#6 if there is an option to search for all services that start with TCP or search a list of known services this could also be a good start. |
I believe that both of these options are not supported by the DNS-SD specification. Consequently, the platform APIs (NsdManager on Android, NetService on iOS / macOS) do not support this. Do correct me if I'm wrong. |
Not that I know of. And how does other apps on android do that like |
I haven't looked into this very deeply but my guess is, they'd have to use the method described above:
That would give you a complete list of all service types and services in the network. |
- added exception for special type _services._dns-sd._udp in service type validity check - added integration test for service type enumeration - added unit test for validity check
I've implemented the above approach and it passes the integration test on Android / macOS / iOS. So in the new version (1.2.0) you can start a discovery like this: final discovery = await startDiscovery('_services._dns-sd._udp', autoResolve: false); The
The first component of the service type (e.g. Even though using a service structure to represent a service type feels like a hack, it seems to be consistent on Android / macOS / iOS platform APIs. Since they are both doing it, I chose to adapt the same behavior for the plugin. |
Testing it now looks good. have a couple of questions
|
|
You can enable call logging using enableLogging(LogTopic.calls); If you post the log here, I'll have a look at it. |
Totally forgot about that, yes it finds Thanks for solving that, can I get the device IP from the result by pinging by name or hostname? |
IPs are not part of the plugin right now (see #7). So yes, for now you'd have to lookup the host name received using something like InternetAddress.lookup. |
Ok thanks, will try |
Hello, i'm trying to find service type by using '_services._dns-sd._udp' but i got Callback: onDiscoveryStartFailed {handle: 06ac4af5-1301-4b78-9460-6dc6c16078d0}. I added info.plist
Can you please help me? @sebastianhaberey |
I am interested to scan for all NSD / DNS-SD / Bonjour / mDNS devices in the network.
I saw that the default serviceType is
_http._tcp
but it does not find all the mDNS devices at home I guess because they have different service types.Is there a way to scan all the types at once?.
The text was updated successfully, but these errors were encountered: