<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.samygo.tv/index.php?action=history&amp;feed=atom&amp;title=Samsung_TV_network_remote_control_protocol</id>
	<title>Samsung TV network remote control protocol - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.samygo.tv/index.php?action=history&amp;feed=atom&amp;title=Samsung_TV_network_remote_control_protocol"/>
	<link rel="alternate" type="text/html" href="http://wiki.samygo.tv/index.php?title=Samsung_TV_network_remote_control_protocol&amp;action=history"/>
	<updated>2026-05-31T01:03:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>http://wiki.samygo.tv/index.php?title=Samsung_TV_network_remote_control_protocol&amp;diff=3597&amp;oldid=prev</id>
		<title>Juzis28: Created page with &quot;Here is an example of reversing network remote protocol on LE32D550 and an application for iPhone and Android smartphones to control TV through WiFi. If you check open ports o...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.samygo.tv/index.php?title=Samsung_TV_network_remote_control_protocol&amp;diff=3597&amp;oldid=prev"/>
		<updated>2013-01-21T13:11:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Here is an example of reversing network remote protocol on LE32D550 and an application for iPhone and Android smartphones to control TV through WiFi. If you check open ports o...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here is an example of reversing network remote protocol on LE32D550 and an application for iPhone and Android smartphones to control TV through WiFi. If you check open ports on TV with nmap, you`ll see some of them are open:&lt;br /&gt;
 nmap -p 1-65535 tv.lan&lt;br /&gt;
 &lt;br /&gt;
 Starting Nmap 5.21 ( http://nmap.org )&lt;br /&gt;
 Nmap scan report for tv.lan (192.168.1.102)&lt;br /&gt;
 Host is up (0.0016s latency).&lt;br /&gt;
 Not shown: 65531 closed ports&lt;br /&gt;
 PORT      STATE SERVICE&lt;br /&gt;
 52235/tcp open  unknown&lt;br /&gt;
 52396/tcp open  unknown&lt;br /&gt;
 55000/tcp open  unknown&lt;br /&gt;
 55001/tcp open  unknown&lt;br /&gt;
 MAC Address: 60:6B:BD:AB:FC:95 (Unknown)&lt;br /&gt;
 &lt;br /&gt;
 Nmap done: 1 IP address (1 host up) scanned in 9.04 seconds&lt;br /&gt;
&lt;br /&gt;
55000 port is used for remote control over network. &lt;br /&gt;
=Authentication=&lt;br /&gt;
When connection on port 55000 is established, remote control must be authenticated. It sends datagram.&lt;br /&gt;
 0000   00 13 00 69 70 68 6f 6e 65 2e 69 61 70 70 2e 73  ...iphone.iapp.s&lt;br /&gt;
 0010   61 6d 73 75 6e 67 38 00 64 00 14 00 4d 54 6b 79  amsung8.d...MTky&lt;br /&gt;
 0020   4c 6a 45 32 4f 43 34 78 4c 6a 45 77 4d 41 3d 3d  LjE2OC4xLjEwMA==&lt;br /&gt;
 0030   10 00 5a 32 52 7a 4e 7a 4d 30 64 47 64 30 5a 41  ..Z2RzNzM0dGd0ZA&lt;br /&gt;
 0040   3d 3d 0c 00 63 32 4d 77 64 48 6b 75 63 47 77 3d  ==..c2MwdHkucGw=&lt;br /&gt;
And the meaning of this bytes.&lt;br /&gt;
 offset  value and description&lt;br /&gt;
 ------	---------------------&lt;br /&gt;
 0x00   	0x00 - datagram type?&lt;br /&gt;
 0x01	0x0013 - string length (little endian)&lt;br /&gt;
 0x03	&amp;quot;iphone.iapp.samsung&amp;quot; - string content&lt;br /&gt;
 0x16	0x0038 - payload size (little endian)&lt;br /&gt;
 0x18	payload&lt;br /&gt;
It is unknown the meaning of the string above, TV can accept any string in here.&lt;br /&gt;
Payload starts with 2 bytes: 0×64 and 0×00, then comes 3 strings encoded with [http://en.wikipedia.org/wiki/Base64 base64 algorithm]. Every string is preceded by 2-bytes field containing encoded string length. These three strings are as follow:&lt;br /&gt;
:*remote control device IP,&lt;br /&gt;
:*unique ID – value to distinguish controllers,&lt;br /&gt;
:*name – it will be displayed as controller name.&lt;br /&gt;
TV replies with giving us following datagram:&lt;br /&gt;
 0000   02 0c 00 69 61 70 70 2e 73 61 6d 73 75 6e 67 06  ...iapp.samsung.&lt;br /&gt;
 0010   00 0a 00 02 00 00 00                             .......&lt;br /&gt;
It means:&lt;br /&gt;
offset  value and description&lt;br /&gt;
------	---------------------&lt;br /&gt;
 0x00   	don't know, it it always 0x00 or 0x02&lt;br /&gt;
 0x01	0x000c - string length (little endian)&lt;br /&gt;
 0x03	&amp;quot;iapp.samsung&amp;quot; - string content&lt;br /&gt;
 0x0f	0x0006 - payload size (little endian)&lt;br /&gt;
 0x11	payload&lt;br /&gt;
String content is always ''iapp.samsung or iphone.livingroom.iapp.samsung''. Meaning of these strings is unclear, I suggest to not compare it with any specific value during response parsing (maybe other devices using another values).&lt;br /&gt;
&lt;br /&gt;
Payload is one of the following:&lt;br /&gt;
:*0×64, 0×00, 0×01, 0×00 – access granted, you can now send key codes and it will be executed by TV,&lt;br /&gt;
:*0×64, 0×00, 0×00, 0×00 – access denied – user rejected your network remote controller,&lt;br /&gt;
:*0x0A, 0×00, 0×02, 0×00, 0×00, 0×00 – waiting for user to grant or deny access for your app,&lt;br /&gt;
:*0×65, 0×00 – timeout or cancelled by user.&lt;br /&gt;
Access is granted only during current TCP connection, when your app or TV disconnect, you have to repeat the authentication process.&lt;br /&gt;
=Sending key codes=&lt;br /&gt;
Now you can send simple datagrams containing key codes.&lt;br /&gt;
 0000   00 13 00 69 70 68 6f 6e 65 2e 69 61 70 70 2e 73  ...iphone.iapp.s&lt;br /&gt;
 0010   61 6d 73 75 6e 67 11 00 00 00 00 0c 00 53 30 56  amsung.......S0V&lt;br /&gt;
 0020   5a 58 31 5a 50 54 46 56 51                       ZX1ZPTFVQ&lt;br /&gt;
It means:&lt;br /&gt;
offset  value and description&lt;br /&gt;
------	---------------------&lt;br /&gt;
 0x00  	always 0x00&lt;br /&gt;
 0x01   0x0013 - string length (little endian)&lt;br /&gt;
 0x03	&amp;quot;iphone.iapp.samsung&amp;quot; - string content&lt;br /&gt;
 0x16	0x0011 - payload size (little endian)&lt;br /&gt;
 0x18	payload&lt;br /&gt;
And the payload is:&lt;br /&gt;
 offset  value and description&lt;br /&gt;
 ------	---------------------&lt;br /&gt;
 0x18   	three 0x00 bytes&lt;br /&gt;
 0x1b	0x000c - key code size (little endian)&lt;br /&gt;
 0x1d	key code encoded as base64 string&lt;br /&gt;
TV response will be similar to authentication response, but with different payload data. I will not describe this data detailed because I wasn’t investigated it much.&lt;br /&gt;
Key codes list is published in [[D-Series_Key_Codes | SamyGO wiki]]&amp;lt;br&amp;gt;&lt;br /&gt;
Useful information can be found also in [https://github.com/tomquist/SamyGo-Android-Remote/tree/master/src/de/quist/samy/remocon SamyGO Android Remote sources.]&lt;br /&gt;
==Reference==&lt;br /&gt;
#[http://sc0ty.pl/2012/02/samsung-tv-network-remote-control-protocol Original article]&lt;/div&gt;</summary>
		<author><name>Juzis28</name></author>
		
	</entry>
</feed>