1

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());             
    }
});
yorkw
  • 40,926
  • 10
  • 117
  • 130
Steve
  • 53,375
  • 33
  • 96
  • 141
  • Try calling jmDNS.requestServiceInfo(gtv2, event.getName()); in serviceAdded(ServiceEvent event) method, which resulting serviceResolved(ServiceEvent event) method get called, see if you can get more info in serviceResolved(ServiceEvent event) method. – yorkw Mar 29 '12 at 22:51

1 Answers1

0

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

Steve
  • 53,375
  • 33
  • 96
  • 141