w3c / wot-discovery

Repository for WoT discovery discussion
https://w3c.github.io/wot-discovery/
Other
19 stars 17 forks source link

Is Service name _directory._sub._wot._tcp supported in DNS-SD standard? #548

Closed FNakano closed 1 month ago

FNakano commented 1 month ago

Hello! I am working on a (really) small implementation of thing discovery and thing-directory using LinkSmart Thing Directory (https://github.com/linksmart/thing-directory) and a pair of ESP32 microcontrollers. I did not succeed to find _directory._sub._wot._tcp using ESP32 example code to DNS-SD nor using avahi-browse _directory._sub._wot._tcp (on a linux box) As far as I seached, DNS-SD does not support this Service Name (https://datatracker.ietf.org/doc/html/rfc6763#page-19) A workaround would be to change _directory._sub._wot._tcp to, for instance, _wotDirectory._tcp ...

JKRhb commented 1 month ago

Hi there! :)

Hmm, I think _directory._sub._wot._tcp should actually be a valid service name in accordance with section 7.1 of RFC 6763 which introduces subtypes.

Do you maybe need to append a .local or do you maybe have to explicitly specify that you want to use mDNS for discovery?

farshidtz commented 1 month ago

I also believe the service name is valid.

Take a look at this for examples using avahi-browse and dns-sd: https://github.com/TinyIoT/thing-directory/wiki/Discovery-with-DNS-SD

TallTed commented 1 month ago

@farshidtz —

Yes, it is correct.

That's ambiguous, as the preceding comments contain several things which might be the antecedent to "it". Please make your statement explicit (i.e., replace it with the string you mean).

farshidtz commented 1 month ago

@farshidtz —

Yes, it is correct.

That's ambiguous, as the preceding comments contain several things which might be the antecedent to "it". Please make your statement explicit (i.e., replace it with the string you mean).

Yes sir! Thanks for pointing this out.

FNakano commented 1 month ago

Hello! Thank you very much for your attention and for the information! Tried https://github.com/w3c/wot-discovery/issues/548#issuecomment-2234280693 avahi-browse example. It does browse services with _wot._tcp in the name. Also tested if avahi-browse is selective to _directory._sub._wot_tcp service names by running a program in ESP32 to MDNS.addService("wot", "tcp", 80); // publish a service with _wot._tcp name and running thing-directory at the same time. It resulted that avahi-browse _directory._sub._wot._tcp, as expected, left the ESP32 service out of the list of resolved IPs. I believe the issue is solved for my use of avahi-browse. For the ESP32, may be, I should test some other implementations of DNS-SD in ESP32...

If you allow me to make some collateral comments... ... the issue (text/description) I posted is not that exact - I found some alternative interpretations. I'm sorry for this. ... natural language has some degree of looseness on meaning, interpretation and reference, it is difficult to write specific enough texts...

Thank you!