I've been testing with avahi and jmdns together. Some sample code for registering services in jmdns:
this.service_type = "_ros-master._tcp.local.";
this.service_name = "RosMaster";
this.service_port = 8888;
String service_key = "description"; // Max 9 chars
String service_text = "Hypothetical ros master";
HashMap<String, byte[]> properties = new HashMap<String, byte[]>();
properties.put(service_key, text.getBytes());
// service_info = ServiceInfo.create(service_type, service_name, service_port); // case 1, no text
// service_info = ServiceInfo.create(service_type, service_name, service_port, 0, 0, true, service_text); // case 2, textual description
service_info = ServiceInfo.create(service_type, service_name, service_port, 0, 0, true, properties); // case 3, properties assigned textual description
jmdns.registerService(service_info);
Case 1 and case 2 create services detectable by avahi, but they fail to resolve.
Case 3 works fine.
I don't know if this is an avahi issue, or a jmdns issue. If you would like me to run some tests across the two, let me know.
ZbSSFU <a href="http://xtnxfyjxwseh.com/">xtnxfyjxwseh</a>, [url=http://yazmifvlkpfs.com/]yazmifvlkpfs[/url], [link=http://acfknopucnuz.com/]acfknopucnuz[/link], http://jamiomvjhfco.com/
May I ask which version of JmDNS you are using? Case 1 does not compile with current version of JmDNS, you have to set some values for the properties.
However there is a bug in the String version of the ServiceInfo.create. It cannot even read its own data…
commit -m "Failing to resolve jmdns registered services - ID: 3435220" /Users/pierre/Projects/workspace/jmdns/CHANGELOG.txt /Users/pierre/Projects/workspace/jmdns/src/main/java/javax/jmdns/impl/ServiceInfoImpl.java /Users/pierre/Projects/workspace/jmdns/src/test/java/javax/jmdns/test/ServiceInfoTest.java
Sending /Users/pierre/Projects/workspace/jmdns/CHANGELOG.txt
Sending /Users/pierre/Projects/workspace/jmdns/src/main/java/javax/jmdns/impl/ServiceInfoImpl.java
Sending /Users/pierre/Projects/workspace/jmdns/src/test/java/javax/jmdns/test/ServiceInfoTest.java
Transmitting file data ...
Committed revision 339.