Difference between revisions of "Samsung channel list format"


From SamyGO
Jump to: navigation, search
(map-SateD)
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
=Channel Lists=
 
Samsung TV Sets store channel information in several files on /mtd_rwarea. The files can be extracted to a usb drive using a hidden built-in export/import function, by pressing Vol- and then holding enter for 5-10 seconds.
 
Samsung TV Sets store channel information in several files on /mtd_rwarea. The files can be extracted to a usb drive using a hidden built-in export/import function, by pressing Vol- and then holding enter for 5-10 seconds.
  
Following files are known:<br />
+
Following files are known:
map-AirA for analogue terrestrial channels<br />
+
* map-AirA for analogue terrestrial channels
map-AirD for digital terrestrial channels<br />
+
* map-AirD for digital terrestrial channels
map-CableA for analogue cable channels<br />
+
* map-CableA for analogue cable channels
map-CableD for digital cable channels<br />
+
* map-CableD for digital cable channels
map-SateD for digital satellite channels<br />
+
* map-SateD for digital satellite channels
Clone.bin binary file containing all settings of a TV Set<br />
+
* clone.bin binary file containing all settings of a TV Set
 
 
  
 
== map-AirD / map-CableD ==
 
== map-AirD / map-CableD ==
 
map-AirD and map-CableD are very similar in their structure. The list always contains a multiple of 1000 entries. If a there are less than a multiple of 1000 entries, the list is filled with null characters. Each entry has a fixed length of 248 bytes, what makes file size also a multiple of 248.000 bytes. The structure of a 248 byte entry is the following (start to count bytes at 1):
 
map-AirD and map-CableD are very similar in their structure. The list always contains a multiple of 1000 entries. If a there are less than a multiple of 1000 entries, the list is filled with null characters. Each entry has a fixed length of 248 bytes, what makes file size also a multiple of 248.000 bytes. The structure of a 248 byte entry is the following (start to count bytes at 1):
  
Byte 1-2: channel number<br />
+
* Byte 1-2: channel number
Byte 3-4: VPID<br />
+
* Byte 3-4: VPID
Byte 5-6: PID (same as VPID on video channels)<br />
+
* Byte 5-6: PCR PID
Byte 8: QAM modulation (0x41 QAM64, 0x42 QAM256)<br />
+
* Byte 7: favourite bitmask (&0x01 favourite)
Byte 10: Service Type (0x01 TV, 0x02 Radio, 0x0C DATA, 0x19 HD)<br />
+
* Byte 8: Not verified, maybe QAM modulation (0x41 QAM64, 0x42 QAM256)
Byte 11-12: SID<br />
+
* Byte 9: status bitmask (&0x80 active)
Byte 13-14: ONID<br />
+
* Byte 10: Service Type (0x01 TV, 0x02 Radio, 0x0C DATA, 0x19 HD)
Byte 15-16: NID<br />
+
* Byte 11-12: SID
Byte 24: encryption bitmask (byte 24 & 0x20, encrypted)<br />
+
* Byte 13-14: ONID
Byte 27-28: frequency<br />
+
* Byte 15-16: NID
Byte 33-34: symbol rate (in ksymb/s)<br />
+
* Byte 24: encryption bitmask (byte 24 & 0x20, encrypted)
Byte 35-36: bouqet<br />
+
* Byte 27-28: frequency
Byte 37-38: TSID<br />
+
* Byte 29-30: logical channel number LCN (used on freeview, uk)
Byte 45-244: channel name (100 chars)<br />
+
* Byte 33-34: symbol rate (in ksymb/s)
Byte 245-246: parental lock (0x00 no lock, 0x01 locked)<br />
+
* Byte 35-36: bouqet
Byte 248: checksum over bytes 1-247<br />
+
* Byte 37-38: TSID
 +
* Byte 44-243: channel name (100 chars unicode)
 +
* Byte 245-246: parental lock (0x00 no lock, 0x01 locked)
 +
* Byte 247: on x79 devices favourite bitmask: &0x01 fav1, &0x02 fav2, &0x04 fav3, &0x08 fav4
 +
* Byte 248: checksum over bytes 1-247
  
Fields are in big endian 64bit.
+
16-bit fields are big endian.
  
 
== map-SateD ==
 
== map-SateD ==
 
Number of list entries is always a multiple of 1000, missing entries are filled with null characters. Entry length is fixed to 144 bytes, so file size is a multiple of 144.000 bytes. Fixed length structure consists of the following:
 
Number of list entries is always a multiple of 1000, missing entries are filled with null characters. Entry length is fixed to 144 bytes, so file size is a multiple of 144.000 bytes. Fixed length structure consists of the following:
  
Byte 1-2: channel number<br />
+
* Byte 1-2: channel number
Byte 3-4: VPID<br />
+
* Byte 3-4: VPID
Byte 5-6: PID (same as VPID on video channels)<br />
+
* Byte 5-6: PID (same as VPID on video channels)
Byte 7: MPEG4 (0x00 on MPEG2, 0x01 on MPEG4 channels)<br />
+
* Byte 7: MPEG4 (0x00 on MPEG2, 0x01 on MPEG4 channels)
Byte 9-14: 0x0001 0307 0500<br />
+
* Byte 9-14: 0x0001 0307 0500
Byte 15: service type (0x01 TV, 0x02 Radio, 0x0C Data, 0x19 HD)<br />
+
* Byte 15: service type (0x01 TV, 0x02 Radio, 0x0C Data, 0x19 HD)
Byte 17-18: SID<br />
+
* Byte 17-18: SID
Byte 19-20: Transponder ID (matched against TransponderDataBase.dat)<br />
+
* Byte 19-20: Transponder ID (matched against TransponderDataBase.dat)
Byte 21-22: Sat ID (matched against SatDataBase.dat)<br />
+
* Byte 21-22: Sat ID (matched against SatDataBase.dat)
Byte 23-24: 0x0000<br />
+
* Byte 23-24: 0x0000
Byte 25-26: TSID<br />
+
* Byte 25-26: TSID
Byte 27-28: 0x00<br />
+
* Byte 27-28: 0x00
Byte 29-30: ONID<br />
+
* Byte 29-30: ONID
Byte 31-32: 0xFFFF<br />
+
* Byte 31-32: 0xFFFF
Byte 33-34: ????, 0xFFFF when channel is new, after that an unknown number<br />
+
* Byte 33-34: ????, 0xFFFF when channel is new, after that an unknown number
Byte 35-36: ????, 0xFFFF when channel is new, after that an unknown number<br />
+
* Byte 35-36: ????, 0xFFFF when channel is new, after that an unknown number
Byte 37-138: channel name (50 chars)<br />
+
* Byte 37-138: channel name (50 chars)
Byte 139-140: bouqet (always the same for channels of one provider)<br />
+
* Byte 139-140: bouqet (always the same for channels of one provider)
Byte 142: parental lock marker (not tested yet)<br />
+
* Byte 142: parental lock marker (not tested yet)
Byte 143: favourite bitmask (the lowest 4 bits represent a favourite list from 1-4, if its 1, the channel is on it, if 0, its not)<br />
+
* Byte 143: favourite bitmask (the lowest 4 bits represent a favourite list from 1-4, if its 1, the channel is on it, if 0, its not)
Byte 144: checksum over bytes 1-143<br />
+
* Byte 144: checksum over bytes 1-143
  
Fields are in big endian 64bit.
+
Fields are in big endian 16bit.
  
 
== Clone.bin ==
 
== Clone.bin ==
Line 64: Line 68:
 
The channel block of the file has exactly as many entries as channels are in the list, the block starts at byte offset 0x1342 and its max. length is to byte offset 0x14F59. Empty entries are filled with 0xFF. The structure of the entries is fixed length 81 bytes, consisting of the following:
 
The channel block of the file has exactly as many entries as channels are in the list, the block starts at byte offset 0x1342 and its max. length is to byte offset 0x14F59. Empty entries are filled with 0xFF. The structure of the entries is fixed length 81 bytes, consisting of the following:
  
Byte 1-50: channel name (50 chars)<br />
+
* Byte 1-50: channel name (50 chars)
Byte 51-52: channel number<br />
+
* Byte 51-52: channel number
Byte 53-54: VPID<br />
+
* Byte 53-54: VPID
Byte 55-56: PID (mainly same as vpid, differs on radio channels)<br />
+
* Byte 55-56: PID (mainly same as vpid, differs on radio channels)
Byte 57: frequency<br />
+
* Byte 57: frequency
Byte 58: 0x04<br />
+
* Byte 58: 0x04
Byte 59: MPEG4? (0x01 on SD channels, 0x21 on HD channels)<br />
+
* Byte 59: MPEG4? (0x01 on SD channels, 0x21 on HD channels)
Byte 60-61: NID<br />
+
* Byte 60-61: NID
Byte 62-63: TSID<br />
+
* Byte 62-63: TSID
Byte 64-65: ONID<br />
+
* Byte 64-65: ONID
Byte 66-67: SID<br />
+
* Byte 66-67: SID
Byte 68-71: 0xFFFF FFFF<br />
+
* Byte 68-71: 0xFFFF FFFF
Byte 72: service type (0x01 TV, 0x02 Radio, 0x19 HD)<br />
+
* Byte 72: service type (0x01 TV, 0x02 Radio, 0x19 HD)
Byte 73: 0x04<br />
+
* Byte 73: 0x04
Byte 74: seems to be a bitmask, if bitvalue 0x04 is in it, the channel is encrypted, other bits unknown<br />
+
* Byte 74: seems to be a bitmask, if bitvalue 0x04 is in it, the channel is encrypted, other bits unknown
Byte 75: 0x25<br />
+
* Byte 75: 0x25
Byte 76: character length of channel name<br />
+
* Byte 76: character length of channel name
Byte 77-81: 0x00 0000 0000<br />
+
* Byte 77-81: 0x00 0000 0000
  
In contrast to map-AirD, map-CableD and map-SateD fields are little endian 32bit.
+
In contrast to map-AirD, map-CableD and map-SateD fields are little endian 8bit.

Latest revision as of 08:06, 28 February 2010

Channel Lists

Samsung TV Sets store channel information in several files on /mtd_rwarea. The files can be extracted to a usb drive using a hidden built-in export/import function, by pressing Vol- and then holding enter for 5-10 seconds.

Following files are known:

  • map-AirA for analogue terrestrial channels
  • map-AirD for digital terrestrial channels
  • map-CableA for analogue cable channels
  • map-CableD for digital cable channels
  • map-SateD for digital satellite channels
  • clone.bin binary file containing all settings of a TV Set

map-AirD / map-CableD

map-AirD and map-CableD are very similar in their structure. The list always contains a multiple of 1000 entries. If a there are less than a multiple of 1000 entries, the list is filled with null characters. Each entry has a fixed length of 248 bytes, what makes file size also a multiple of 248.000 bytes. The structure of a 248 byte entry is the following (start to count bytes at 1):

  • Byte 1-2: channel number
  • Byte 3-4: VPID
  • Byte 5-6: PCR PID
  • Byte 7: favourite bitmask (&0x01 favourite)
  • Byte 8: Not verified, maybe QAM modulation (0x41 QAM64, 0x42 QAM256)
  • Byte 9: status bitmask (&0x80 active)
  • Byte 10: Service Type (0x01 TV, 0x02 Radio, 0x0C DATA, 0x19 HD)
  • Byte 11-12: SID
  • Byte 13-14: ONID
  • Byte 15-16: NID
  • Byte 24: encryption bitmask (byte 24 & 0x20, encrypted)
  • Byte 27-28: frequency
  • Byte 29-30: logical channel number LCN (used on freeview, uk)
  • Byte 33-34: symbol rate (in ksymb/s)
  • Byte 35-36: bouqet
  • Byte 37-38: TSID
  • Byte 44-243: channel name (100 chars unicode)
  • Byte 245-246: parental lock (0x00 no lock, 0x01 locked)
  • Byte 247: on x79 devices favourite bitmask: &0x01 fav1, &0x02 fav2, &0x04 fav3, &0x08 fav4
  • Byte 248: checksum over bytes 1-247

16-bit fields are big endian.

map-SateD

Number of list entries is always a multiple of 1000, missing entries are filled with null characters. Entry length is fixed to 144 bytes, so file size is a multiple of 144.000 bytes. Fixed length structure consists of the following:

  • Byte 1-2: channel number
  • Byte 3-4: VPID
  • Byte 5-6: PID (same as VPID on video channels)
  • Byte 7: MPEG4 (0x00 on MPEG2, 0x01 on MPEG4 channels)
  • Byte 9-14: 0x0001 0307 0500
  • Byte 15: service type (0x01 TV, 0x02 Radio, 0x0C Data, 0x19 HD)
  • Byte 17-18: SID
  • Byte 19-20: Transponder ID (matched against TransponderDataBase.dat)
  • Byte 21-22: Sat ID (matched against SatDataBase.dat)
  • Byte 23-24: 0x0000
  • Byte 25-26: TSID
  • Byte 27-28: 0x00
  • Byte 29-30: ONID
  • Byte 31-32: 0xFFFF
  • Byte 33-34: ????, 0xFFFF when channel is new, after that an unknown number
  • Byte 35-36: ????, 0xFFFF when channel is new, after that an unknown number
  • Byte 37-138: channel name (50 chars)
  • Byte 139-140: bouqet (always the same for channels of one provider)
  • Byte 142: parental lock marker (not tested yet)
  • Byte 143: favourite bitmask (the lowest 4 bits represent a favourite list from 1-4, if its 1, the channel is on it, if 0, its not)
  • Byte 144: checksum over bytes 1-143

Fields are in big endian 16bit.

Clone.bin

Clone.bin is a binary file containing every setting of a TV, in one single file. Firmware T-CRLPEUHC is known to produce a Clone.bin, when using built-in import/export feature.

The channel block of the file has exactly as many entries as channels are in the list, the block starts at byte offset 0x1342 and its max. length is to byte offset 0x14F59. Empty entries are filled with 0xFF. The structure of the entries is fixed length 81 bytes, consisting of the following:

  • Byte 1-50: channel name (50 chars)
  • Byte 51-52: channel number
  • Byte 53-54: VPID
  • Byte 55-56: PID (mainly same as vpid, differs on radio channels)
  • Byte 57: frequency
  • Byte 58: 0x04
  • Byte 59: MPEG4? (0x01 on SD channels, 0x21 on HD channels)
  • Byte 60-61: NID
  • Byte 62-63: TSID
  • Byte 64-65: ONID
  • Byte 66-67: SID
  • Byte 68-71: 0xFFFF FFFF
  • Byte 72: service type (0x01 TV, 0x02 Radio, 0x19 HD)
  • Byte 73: 0x04
  • Byte 74: seems to be a bitmask, if bitvalue 0x04 is in it, the channel is encrypted, other bits unknown
  • Byte 75: 0x25
  • Byte 76: character length of channel name
  • Byte 77-81: 0x00 0000 0000

In contrast to map-AirD, map-CableD and map-SateD fields are little endian 8bit.