Question

According to the Google Anymote Protocol documentation, a GoogleTV device can be discovered by sending mDNS packets.

A GoogleTV device should respond by identifying itself with the string "_anymote._tcp.local".

However, when I send out a mDNS packet, I receive a response with NSZGT1-6017678.local.

Unless the documentation is incorrect, I don't see a way to identify the device as a GTV device.

Is there something I am missing?

For example, only the airplay string actually returns any device in the following code:

String airplay = "_airplay._tcp.local.";
String gtv1 = "_anymote._tcp.local.";
String gtv2 = "_anymote._tcp.local";

JmDNS jmDNS = JmDNS.create();

jmDNS.addServiceListener(gtv1, new ServiceListener() {

    public void serviceResolved(ServiceEvent event) {}

    public void serviceRemoved(ServiceEvent event) {}

    public void serviceAdded(ServiceEvent event) {
        System.out.println("Service added: "  + event.getName() + " " +     event.getInfo().getName());             
    }
});
Was it helpful?

Solution

Apparently mDNS is not used for discovering devices, although it can be, there's just no way to filter out just GTV devices that I have found.

Instead a message is broadcast on the network on port 9101. See the following implementation:

http://code.google.com/p/google-tv-remote/source/browse/src/com/google/android/apps/tvremote/BroadcastDiscoveryClient.java

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top