Pairing with Google TV using the pairing protocol

I successfully opened the SSL / TLS connection for pairing and sent all the necessary messages back and forth. I encounter a problem when posting a secret, but on a GTV. For some reason, he says my secret is bad by sending a message with the BadSecret status. I decided to use hexadecimal encoding for privacy.

Here is my hexadecimal representation of the entire secret protocol buffer.

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

Note that the first four bytes refer to the size of the message. Everything in between is for external communication. The last two bytes are my actual password. e27a was the secret code that appeared on the GTV.

If anyone knows why the GTV can answer that the secret is bad, I would really appreciate it.

+4
source share
2 answers

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

+1
source

I have the same problem, only 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 (ie, "FED0"), the server returns:

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

I tried to take a look at the Java code in the sample application, but it is pretty dumb and seems to use quite a bit of RSA public key material , which is hard to digest.

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

0
source

Source: https://habr.com/ru/post/1390332/


All Articles