Menu

#109 Failing to resolve jmdns registered services

closed-fixed
None
5
2014-08-09
2011-11-09
Anonymous
No

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.

Discussion

  • Nobody/Anonymous

    ZbSSFU <a href="http://xtnxfyjxwseh.com/">xtnxfyjxwseh</a>, [url=http://yazmifvlkpfs.com/]yazmifvlkpfs[/url], [link=http://acfknopucnuz.com/]acfknopucnuz[/link], http://jamiomvjhfco.com/

     
  • Pierre Frisch

    Pierre Frisch - 2012-05-06

    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.

     
  • Pierre Frisch

    Pierre Frisch - 2012-05-06
    • assigned_to: nobody --> spearway
    • status: open --> pending-fixed
     
  • Pierre Frisch

    Pierre Frisch - 2012-12-04
    • status: pending-fixed --> closed-fixed
     
MongoDB Logo MongoDB