[Documentation] [TitleIndex] [WordIndex


This package compiles the jmdns sources and includes a convenience class for interfacing jmdns with ros. Jmdns is a 100% java implementation of the zeroconf standard. It is currently being used and tested for android devices, however it is perfectly ok to use (and we may extend it more fully later) for pc implementations.


Jmdns has a multi-homed interface (JmmDNS) which could almost be used directly, but it is still experimental - there are a few catches, broken api and a bit of black magic. To make the library easier to use and to interface it with ros, it also provides com.github.ros-java.zeroconf_jmdns_suite.Zeroconf class.


This package also includes three demo programs in jmdns_tutorials, to help quickly experiment with this package.


First build or install the jmnds_tutorials package. You will also need avahi command line tools, which in Ubuntu you can install with:

sudo apt-get install avahi-utils


Start listening in one shell:

> avahi-browse _ros-master._tcp

And execute the publisher in another shell:

./build/install/jmdns_tutorials/bin/jmdns_tutorials --publisher

Discovery - Polling

Start publishing in one shell:

> avahi-publish -s DudeMaster _ros-master._tcp 8882

And execute polling discovery in another (it will print out the discovered list every second):

./build/install/jmdns_tutorials/bin/jmdns_tutorials --polling

Discovery - Callback

As above, but start the discovery handler:

./build/install/jmdns_tutorials/bin/jmdns_tutorials --discovery

Known Issues

Jmdns gets confused when there are multiple interfaces (e.g. wireless + ethernet + vpn). It just hasn't had alot of testing in this area.

2024-06-15 13:49