jmdns Airplay - Service is not discovered

1.2k views Asked by At

I am working on this for months now, but my iPhone refuses to discover my Java (or Android) Applications. I found a receiver app for Android (AirPin) which works and I use it for comparing it with my code.

I am working with latest jmdns source build on my own.

private final static int PORT = 46667;
private static String DNSSD_TYPE = "_airplay._tcp.local.";

public static void main(String[] args) {
    Map<String, String> map = new LinkedHashMap<String, String>();
    map.put("features", "0x2a7f");
    map.put("deviceid", "33:00:18:7A:FE:A1");
    map.put("model", "AndroidTV2,1");
    map.put("srcvers", "130.14");
    String name = "ITV@133";
    ServiceInfo info = ServiceInfo.create(DNSSD_TYPE, name, PORT, 0, 0,
            true, map);

    try {
        JmDNS jmdns = JmDNS.create();
        jmdns.registerService(info);
        for (ServiceInfo s : jmdns.list(DNSSD_TYPE, 1000))
            System.out.println(s+" "+s.getPriority()+" "+s.getWeight());
    } catch (Exception e) {
        e.printStackTrace();
    }
}

This code returns (I am 133):

[ServiceInfoImpl@2048166867 name: 'ITV@133._airplay._tcp.local.' address: '/192.168.1.107:46667 ' status: 'DNS: pauls-mbp.local. state: probing 1 task: null' is persistent, has data
model: AndroidTV2,1
deviceid: 33:00:18:7A:FE:A1
features: 0x2a7f
srcvers: 130.14
] 0 0
[ServiceInfoImpl@930501550 name: 'ITV@139._airplay._tcp.local.' address: '/192.168.1.139:46667 ' status: 'DNS: pauls-mbp.local. state: probing 1 task: null' is persistent, has data
model: AndroidTV2,1
features: 0x2a7f
deviceid: 00:11:7F:54:DF:0B
srcvers: 130.14
] 0 0

As you can see, it seems like we are identical, but my service is not discovered by my iPhone while the other one is.

Has anyone a idea how to fix this?

0

There are 0 answers