Hiro,
I had the same problem as you when using avahi-browse
to search for a host on my LAN using mDNS. In my case it was a Raspberry Pi with avahi running. I could ping the Pi with ping raspberrypi.local
successfully. I could even ssh with the local domain: ssh pi@raspberrypi.local
.
When I ran avahi-browse initially I was getting a few different hosts on my network (media centres, TV boxes, etc.) but not the Raspberry Pi running Avahi.
The solution for me was to edit avahi-daemon.conf
on the Pi and ensure this option is set to "yes":
[publish]
publish-workstation=yes
After saving that file I restarted the avahi daemon:
sudo systemctl restart avahi-daemon
Now when I run avahi-browse
on my PC to look for the Raspberry Pi I can see it in the results:
E Ifce Prot Name Type Domain
+ wlp4s0 IPv6 raspberrypi [xx:xx] Workstation local
+ wlp4s0 IPv4 raspberrypi [xx:xx] Workstation local
+ wlp4s0 IPv4 otherdevice Web Site local
: Cache exhausted
: All for now
Apparently it is a privacy feature of avahi to have the workstation flag set to "no". I suppose it is like why some Bluetooth devices do not make themselves "discoverable".
I hope this helps.