Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

MDNS-SD is broken?

Open syadykin opened this issue 11 years ago • 3 comments

Hello,

Today I updated code from git and rebuilt my project which uses mdns service discovery. Surprisingly it stops working for me — simple sketch with addService call do not resolve service with command avahi-browse -r _http._tcp -p anymore, while name resolution works fine. Is mdns-sd broken again?

syadykin avatar Sep 07 '15 20:09 syadykin

My project built with less recent version of studio works perfectly:

me@supersonic:~$ avahi-browse -r _http._tcp -p -t
+;wlan0;IPv4;switch;_http._tcp;local
=;wlan0;IPv4;switch;_http._tcp;local;switch.local;192.168.78.206;3333;"board=generic"
me@supersonic:~$

syadykin avatar Sep 08 '15 08:09 syadykin

I don't have access to a Linux box at the moment to try with avahi, but DNS-SD seems to work fine with OS X and Bonjour. I have opened mDNS_Web_Server sample, changed SSID and password, and flashed the sketch to NodeMCU 1.0 board.

From console, i get this output:

[igrokhotkov@igrokhot-mbp ~/e]$ dns-sd -B _http._tcp
Browsing for _http._tcp
DATE: ---Wed 09 Sep 2015---
 1:19:34.676  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
 1:19:35.052  Add        2   4 local.               _http._tcp.          esp8266
^C
[igrokhotkov@igrokhot-mbp ~/e]$ dns-sd -L esp8266 _http._tcp
Lookup esp8266._http._tcp.local
DATE: ---Wed 09 Sep 2015---
 1:20:16.569  ...STARTING...
 1:20:16.570  esp8266._http._tcp.local. can be reached at esp8266.local.:80 (interface 4)
 board=generic

Perhaps you can run tcpdump and filter for mDNS packets?

igrr avatar Sep 08 '15 22:09 igrr

Magically it started to work again. Sorry.

syadykin avatar Sep 09 '15 21:09 syadykin