question

Jan Ruske avatar image
Jan Ruske asked

fire TV direct control via IP socket listen on TCP port 5555 - authentication algorithm

When I connect to the fire TV via IP socket and send the CNXN command (43 4e 58 4e 00 00 00 01 00 10 00 00 07 00 00 00 32 02 00 00 bc b1 a7 b1 68 6f 73 74 3a 3a 00) for init a AUTH response appears (I think like PIN request on TV when Smartphone connected the first time with fireTV).

What kind of algorithm is behind it? Is this a secret or any where described?

I am thankful for every hint!

Jan

fire tvcontroller
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image Levon@Amazon ♦ commented ·

Hi Jan,

Please describe your use case in more detail: what exactly are you building / writing, what is it for? Thanks!

0 Likes 0 ·
Barry Gordon avatar image
Barry Gordon answered

I am also looking for help in this area. I have read about the new security and and authorization requirements that come out in android OS 4.2.2. I read all the material regarding how to send authorization commands (AUTH). My fire TV cube has requested permission to allow the use of the public RSA key and I have agreed to it. It did this twice, I assume for the two computers I use it with.

I send the CNXN command and get back the AUTH reply with a token of 1. I send the AUTH command with a token of 3 and the payload of adbkey.pub That always times out with no response from the FireTV. That is what happens if the command received by the FireTV is not valid. I can not figure out what is wrong with the command. Please, someone hel.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Barry Gordon avatar image
Barry Gordon answered

for Levon@Amazon. The voice capabilities on the FireTV cube do not provide for the commands on the remote. (up, down, left right, select, back, menu, forward, and reverse) Only Home and Play/Pause are provided. This necessitates the use of the FireTV remote to navigate through the available qapps and streaming services. As a professional integrator and builder of home theater systems I would like avoid the use of the FTV remote and have the FireTV controilled over TCP using the same command sequences adb does. I had this working with a prior fireTV, but never the cube. If the navigation commands were provided as audio then I would not need this.

2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image Levon@Amazon ♦ commented ·

Hi Barry,

I forwarded your comments to the relevant team, and will respond on your other ticket here: https://forums.developer.amazon.com/questions/174963/adb-permission-control-dialog-does-not-remember-au.html -- thanks!

0 Likes 0 ·
Jacek avatar image Jacek Levon@Amazon ♦ commented ·

Why not to open the API that android Fire TV Remote app is using?

1 Like 1 ·
Barry Gordon avatar image
Barry Gordon answered

For Levon@Amazon Any idea when the "relevant" team might post an answer on my other ticket?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Barry Gordon avatar image
Barry Gordon answered

I am now completely controlling my Amazon Fire TV cube using TCP/IP. It is much better than the ADB solution. With the ADB solution, Amazon chose not to remember the Authorization codes so they had to be re-entered each time you started.

There is a company named 'Video Storm' They make an active cable that allows you to control Android devices (I am doing nVidia Shield and Fire TV Cube). Performance is identical to the Bluetooth remote. They also have free Control 4 and RTI drivers for their device. The TCP/IP programming is very simple and I did it in my theater's control system in a couple of hours.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Phil G avatar image
Phil G answered

@Barry Gordon This is great. Thank you for sharing!

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

MiamiDev avatar image
MiamiDev answered

Can you share more about the Video Storm cable? Thanks!

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mkaye avatar image
mkaye answered

I am a Crestron programmer & want to add authentication to the module to control the FireTV over IP

I am looking for where I find documentation & routines to do this?

mark

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jeffrey avatar image
Jeffrey answered

I put together the following google sheet that describes the commands to control FireTV via ADB. Perhaps the syntax is the same. Let me know if this works.

https://docs.google.com/spreadsheets/d/1bEGgEoshrGuf8iD4EvhsuZbOfm3gASTqRf5jFnOvNs4/edit?usp=sharing

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.