eclair4151 / samsung_encrypted_POC

A proof of concept to pair and send commands to H and J series Samsung TVs
10 stars 5 forks source link

Encryption key broken after tv restart #5

Open klassm opened 6 years ago

klassm commented 6 years ago

Hi, after restarting the device (power off, power on) the encryption key is broken. You have to pair it again. I guess there is something missing in the protocol to do a key refresh. Thanks, Matthias

eclair4151 commented 6 years ago

Hi, from what i can tell from everyone that has had this issue, you are trying to send commands to it to early. it takes up to a minute after the TV is turned on before it will accept commands from a previously paired key. Try to pair it and then after restarting the tv wait a minute then send a command and see if it works.

klassm commented 6 years ago

Hi,

well I guess this is true if you only use the power button on your remote to power off the television. This is not what I do - I got a remote controlled switch between the television and the power plug. This is equivalent to pulling the plug when switching off the tv.

When powering on the tv afterwards, that session key is invalid - no matter how long I wait.

By the way: I guess that one minute of waiting corresponds to the time the tv needs to get a network connection. This also seems to be equivalent to the output of samsungctl:

Error: None
 ~/I/samsungctl   master *…  python3 -m samsungctl --host 192.168.0.24 --timeout 5 --method pin --name FHEMRemote KEY_CHDOWN
close status: 12602

12602 is also the output code I get when the remote is successfully registered.

Matthias

eclair4151 commented 6 years ago

Hmm hard to say. I don't have access to one of these TVs anymore so its pretty hard for me to debug issues. If i get a chance ill try to pair and unplug the tv and see if i can get it working.

McKael commented 6 years ago

I think I can confirm that the peering is lost after the TV has rebooted (real reboot, not stand-by mode).

I'm not sure I can get the list of paired devices from the TV -- BTW I don't even know if one can disconnect a device and clear the pairing from the TV interface itself, actually.