Difference between revisions of "Samsung OTN protocol"
(One intermediate revision by the same user not shown) | |||
Line 109: | Line 109: | ||
=Get „m_notice“ file. Same as notice, contains info for the latest firmware version= | =Get „m_notice“ file. Same as notice, contains info for the latest firmware version= | ||
− | <noinclude> | + | <noinclude>{{cc-by-nc-sa-3.0|details}}</noinclude> |
Latest revision as of 19:19, 8 April 2015
Contents
- 1 Connect to OTN-Server and request a seedkey for authentification
- 2 Send some status messages to OTN-Log-Server (ignored in this article)
- 3 Get „version“ file. Infos about URLs and the public-key for encryption and signatures
- 4 Get „notice“ file. Encrypted response file (xml <pdl>) with the firmware information
- 5 Get „m_notice“ file. Same as notice, contains info for the latest firmware version
Connect to OTN-Server and request a seedkey for authentification
GET /openapi/device/auth/seedkey HTTP/1.1 Accept: */* Host: www.samsungotn.net User-Agent: Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV; Maple2012) AppleWebKit/534.7 (KHTML, like Gecko) SmartTV Safari/534.7 CountryCode: US AppKey: ed29e9fe-4225-418c-88ee-2f1bc01e6a8e-2ad7f3ce-23c0-4cdb-afff-d1481531f1bb ModelId: T-GASDEUC ModelName: UE32D7000 MACAddr: 112b98ad27cac Firmcode: SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615 DUID: RRNFGLIYQJYA IsSSL: 1 HTTP/1.1 200 OK Cache-Control: private Content-Type: text/xml; charset=utf-8 Date: Wed, 08 Apr 2015 18:05:58 GMT Connection: close <?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <session id="cf957fac"><user id="_T-GASDEUC_2d122da89134" protected="no" confirmed="yes" /><seedkey>131705db-c826-4b1f-9315-55ca2475d04e-891e1d8e-e687-4110-859e-b3241e2f7db2</seedkey><expired>2015-04-09T18:05:58Z</expired></session></rsp>
Send some status messages to OTN-Log-Server (ignored in this article)
POST /openapi/log/otn/RRNFGLIYQJYA HTTP/1.1 User-Agent: curl/7.36.0 Host: 157.55.184.57 Accept: */* Content-Length: 154 Content-Type: application/x-www-form-urlencoded S=cf957fac&U=_T-GASDEUC_2d122da89134&t=2015-04-08T20:06:01&c=UPGRADE&e=OOBE_DOWN&v=0&d=OK&OLDFIRMCODE=SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615 HTTP/1.1 200 OK Cache-Control: private Content-Type: text/xml; charset=utf-8 Date: Wed, 08 Apr 2015 18:06:01 GMT Connection: close <?xml version="1.0" encoding="utf-8"?><rsp stat="ok"> </rsp>
Get „version“ file. Infos about URLs and the public-key for encryption and signatures
GET /openapi/conf/version HTTP/1.1 Accept: */* Host: www.samsungotn.net User-Agent: Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV; Maple2012) AppleWebKit/534.7 (KHTML, like Gecko) SmartTV Safari/534.7 CountryCode: US AppKey: ed29e9fe-4225-418c-88ee-2f1bc01e6a8e-2ad7f3ce-23c0-4cdb-afff-d1481531f1bb Token: cf957fac+_T-GASDEUC_2d122da89134+0bf4efc06f374855b347b3a7a944354d9d44371f IPAddr: 10.0.0.1 HTTP/1.1 200 OK Cache-Control: private Content-Type: text/xml; charset=utf-8 Date: Wed, 08 Apr 2015 18:06:02 GMT Connection: close <?xml version="1.0" encoding="UTF-8"?><rsp stat="ok"> <geoinfo given_ip="" real_ip="nn.nn.nn.nn" region_code="un:un:un" /><noticeinfo regist_num="3411178" url="http://www.samsungotn.net/openapi/tv/${ModelId}/${Firmcode}/notice" m_url="http://www.samsungotn.net/openapi/tv/${ModelId}/${Firmcode}/m_notice" cipher="aes-128-cbc" pass="TOMJWL:${SecKey}" pass_dgst="SHA1" substitute="yes" /><ds_key name="${ModelId}.Pem" substitute="yes"><![CDATA[-----BEGIN RSA PUBLIC KEY----- MIGHAoGBAIlZqiqNdNi+ip2B2tES0l9WLKXwen1PbDsqllZNzailTncSpHnjbVdZg vLVV4pQOwiguqiLT09zpO27pBNXJuo+HHcjrfIKAyfsm8Vhz/EwbinAfmNutk2qTk KIlTc88aSNEw3DUVL0tUYOQklMBMmG4NnSCltwhXQsTaGYVKbPAgER -----END RSA PUBLIC KEY-----]]></ds_key> </rsp>
Get „notice“ file. Encrypted response file (xml <pdl>) with the firmware information
GET /openapi/tv/T-GASDEUC/SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615/notice HTTP/1.1 Accept: */* Host: www.samsungotn.net User-Agent: Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV; Maple2012) AppleWebKit/534.7 (KHTML, like Gecko) SmartTV Safari/534.7 If-Modified-Since: Mon, 06 Apr 2009 06:46:57 GMT DUID: RRNFGLIYQJYA HTTP/1.1 200 OK Cache-Control: private Content-Length: 3232 Content-Type: application/octet-stream; charset=iso-8859-1 Last-Modified: Wed, 08 Apr 2015 18:06:03 GMT If-Modified-Since: Wed, 08 Apr 2015 18:06:03 GMT Date: Wed, 08 Apr 2015 18:06:03 GMT Connection: close Salted__<encrypted_data>
Decrypted sample
<?xml version="1.0" encoding="UTF-8"?><pdl> <edit name="prompt_period" mode="assign" value="172800"/> <edit name="log_url" mode="assign" value="http://www.samsungotn.net/openapi/log/otn/${DUID}" substitute="yes"/> <match pass_through="false"> <edit name="latest_firmcode" mode="assign" value="SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615"/> <method name="http_direct"> <filelist> <file id="3107" url="http://az43064.vo.msecnd.net/firmware/tv/67/SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615/appext.img" size="31723696" dest="appext.img" dgst_method="SHA1" dgst="eece3fe1f5a88753da83df4ba2472527c5f35590" dgst_ds_pem="${ModelId}.pem" dgst_ds="004ec318f64e357031fe9584d69f71d90ecb5c8cd30e9e15ac8ac19b550ea65d36e33e8a348dd2f7128590f559a2993dfffec413455b657a7316ca7cb039441c85057365a8bb6f5c556ff854c14f2f193d6fca20d92739de29843c80ae2bf92556318b5d49f4c0e17c22f152eab69e09ea0d78d0d4db91051310d7ed8e4c0745" cipher="aes-128-cbc" pass="W1JZWO:${SecKey}" crc32="3719808121" pass_dgst="SHA1" substitute="yes"/> <file id="3108" url="http://az43064.vo.msecnd.net/firmware/tv/67/SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615/exe.img" size="79204528" dest="exe.img" dgst_method="SHA1" dgst="74c23f5418efb554741df8931b3db38f4d619cfc" dgst_ds_pem="${ModelId}.pem" dgst_ds="323746b21955342e21340c1c95a0eb0eafbdaba4bcb5e3aa816c970e82c82ecc4becbd12bb1176c5d5618681aab6a68c64484fb4a5757d0847e8a7b62770911f623f78b62b56786787ea5e0ea4c513af1a0428393f5e3def85bad7ecc55b28669045117ed82d2cbc1ffaa7bbb881914f304c8d6d94ff0263f4f782784adfdc86" cipher="aes-128-cbc" pass="890JK6:${SecKey}" crc32="672818400" pass_dgst="SHA1" substitute="yes"/> <file id="3109" url="http://az43064.vo.msecnd.net/firmware/tv/67/SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615/Image" size="3189344" dest="Image" dgst_method="SHA1" dgst="2c2335a75265221611153915a93fbc620bd0ffd3" dgst_ds_pem="${ModelId}.pem" dgst_ds="0dae71d431cce702fca809cbc569154620af6c743304769cadc99b2f672f43398833969cad7e1da3fc44bc14889451a03ba0305967b03474128cec2a343f880a528fa5f8d31268640d9364bcea96437cb8f54d66e8dcf16fd291af93f0e999268e6f0753d0d257b33d206ef0edf32b80bd269a78e5f68b4ee57ac073e101124c" cipher="aes-128-cbc" pass="A089RS:${SecKey}" crc32="1168571699" pass_dgst="SHA1" substitute="yes"/> <file id="3110" url="http://az43064.vo.msecnd.net/firmware/tv/67/SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615/rootfs.img" size="4714800" dest="rootfs.img" dgst_method="SHA1" dgst="3c33e032956952a0e10e8f471a194bd080e91152" dgst_ds_pem="${ModelId}.pem" dgst_ds="721dc3361d1ad1a6c48e18f99c1236aa362879953329a2e49fb288e2358efaf8f4c656ff3d12f8e8336b183252ff714fd6145234741b09cf9e60ecb14575596fd8522d56681017aff66da02cd4b788eb11a6e865336ae1e2a5bcb23770d3bc0c41c8f2482c44ad78a97f6fef87e756b85c4e78f46768bf09f5c18335fb834122" cipher="aes-128-cbc" pass="YYAP7A:${SecKey}" crc32="2426550054" pass_dgst="SHA1" substitute="yes"/> </filelist> </method> <execute method="http_direct" timeout="259200" retry="100" retry_method="backoff" loglevel="0" sched="relative" sched_delay="0"/> <edit name="versionnote" mode="assign" value="http://az43064.vo.msecnd.net/xmldata/versionnote_SWU_T-GASDEUC_001021_I04_ES000DS000KS000RS000_120615_${OSDLanguage}.xml"/> </match> </pdl>