Pairing with Google TV using the Pairing Protocol

1.4k views Asked by At

I have successfully opened a SSL/TLS connection for pairing and have sent all the required messages back and forth. I run into an issue when sending the secret though to the GTV. For some reason it says my secret is bad by sending back a message with the status of BadSecret. I chose to use the hexidecimal encoding for the secret.

Here is my hexidecimal representation of the whole secret protocol buffer.

00 00 00 0d 08 01 10 c8 01 18 28 22 04 0a 02 e2 7a

Notice that the first four bytes are for the size of the message. Everything in between is for the outer message. The last two bytes are my actual passcode. e27a was the secret code that showed up on the GTV.

If anyone has any clue to why the GTV may be responding that the secret is bad, I would greatly appreciate it.

2

There are 2 answers

1
Leon Nicholls On

I have used the code from the Google TV Remote app in my app and it works just fine: http://code.google.com/p/google-tv-remote/

1
Richard Hurt On

I am having the same problem, only with using Ruby. I can successfully connect to the TV, send messages back and forth, and initiate a pairing session. However, no matter how I encode my four character response (i.e. "FED0") the server returns:

data: \b\x01\x10\x92\x03
  outer (status) : STATUS_BAD_SECRET
  outer (type)   : 0

I've tried looking at the Java code in the sample application but it is pretty obtuse and appears to use quite a bit of RSA public key stuff, which is difficult to digest.

Can someone please, in plain English, explain how the SECRET encoding works?