Showing posts with label ca. Show all posts
Showing posts with label ca. Show all posts

Sunday, 5 February 2017

DVB TS Monitor ECM stream list.

ECM

DVB TS Monitor in latest DVBStreamExplorer (v4.0.25) now includes a list of all ECM streams found in TS.

This has been added as a convenience to have all ECM streams in TS listed in one place. Each ECM stream item includes basic information such as CA_system_ID and PID. It also includes information about which program(s) referenced the ECM stream.
Without this list one would have to walk through each service and its elementary streams to get information about ECM stream usage.

Set tuner from DVB TS Monitor

Another new feature is the option to set tuner directly from TS Monitor. No more switching back to main window, set tuner and then open TS Monitor again.
Even better, for certain relevant tree items in TS Monitor it's now possible to right-click on item to show a popup menu from where tuner dialog can be opened. Tuner dialog will be preset with parameters relevant in the context of selected item.
This should make it more convenient to quickly switch to a TS of interest. 
Currently context menu can be activated from following tree items:
  • Other MUX Services items.
  • Other MUX Network items.
  • EIT service items under Present/Following and Schedule.
Note that for all tuner operations TS Monitor scanning must be in stopped state.

Saturday, 25 April 2015

Decrypting service in DVBStreamExplorer using CI capable hardware

A little known feature in DVBStreamExplorer is the ability to decrypt DVB services using hardware that supports common interface (CI). You will need a TechnoTrend tuner card with CI support. This includes devices such as TT-connect CT 3650 CI and TT-connect S2 3650 CI. TT Budget cards with CI add-on card will also work. Cards with CI option from manufactures other than TechnoTrend will not work. Also this will only work with DVBStreamExplorer x86 version. CI and DiSEqC features are implemented in a proprietary DLL from TechnoTrend, ttBdaDrvApi_Dll.dll. Apparently this DLL is only available in 32 bit version.
You will also need a conditional access module (CAM) and a valid subscription smart-card. See picture below. It shows TT-connect CT 3650 CI, Conax CAM and subscription smart-card.




Insert your CAM and do a SI scan in DVBStreamExplorer. When completed switch to service view and DVBStreamExplorer should look similar to below.


Note that in lower right corner it can be seen that no service is currently selected.
To select a service for decryption locate an encrypted service in service view and double-click on it.
Lower right corner will now show that a service has been successfully selected.



Note this does not necessarily mean that service will be decrypted successfully. It just mean that tuning and selection of service was executed successfully.

You can check the DVBStreamExplorer log file for CI related entries. The log file can be found from options / preferences / logging.

Here is some logging from when CAM was inserted and initialized. The CA ID 0xb00 is for Conax.
 213 - Apr 25 09:25:51.189 - (9.842) - <4> - CI_OnSlotStatus(0,1)
 214 - Apr 25 09:25:51.189 - (9.842) - <4> - CI_SLOT_MODULE_INSERTED
 215 - Apr 25 09:25:57. 63 - (15.716) - <4> - CI_OnSlotStatus(0,2)
 216 - Apr 25 09:25:57. 63 - (15.716) - <4> - CI_SLOT_MODULE_OK
 217 - Apr 25 09:25:57. 63 - (15.716) - <4> - CI_SLOT_CA_OK
 218 - Apr 25 09:25:57. 63 - (15.716) - <4> - CA:  219 - Apr 25 09:25:57. 63 - (15.716) - <4> - supported CA ID[0]: 0x0B00

And here is some logging from when a service was selected for decryption.
1222 - Apr 25 12:10:11.524 - (9870.177) - <4> - Selecting service 'Discovery Channel'
1223 - Apr 25 12:10:11.623 - (9870.276) - <4> - CI_OnCAStatus(255,14,0)
1224 - Apr 25 12:10:11.623 - (9870.276) - <4> - CI_SWITCH_PRG_REPLY
1225 - Apr 25 12:10:11.623 - (9870.276) - <4> - ERR_NONE

Again this does not not necessarily mean that service will be decrypted successfully. It just means that connection to CAM is in good state.

To check that service is actually decrypted open DVB TS Monitor. Make sure that "Options / Parse A/V elementary headers" is enabled. Start the scan. In current service tab, services node locate the service selected for decryption. Verify that it looks something like below.



If you see details about A/V streams as tagged above, it means that service is successfully decrypted. That is unless the service was not encrypted at all to begin with. Note that it can take up to a minute or in rare cases even more for the header details to appear. This is because each stream in TS is scanned one by one for some time looking for header information.

Once decryption is verified you can save TS to disk. You can then view decrypted service in VLC. You can also stream service over UDP. Other clients can then pick up the decrypted service.


Thursday, 6 February 2014

Discover section table_id with TS File Demux

When processing a TS file with TS File Demux a file named sectionreport.csv is created in output directory. This file contains various statistics about sections found in stream. Starting from TS File Demux V2.2.11 a new field, table_id, has been added to this file. This field contains a list of unique table_id's found in section stream. Sometimes this information can be useful, especially for streams containing multiple types of tables.
Below is an example of sectionreport.csv file after processing a DVB TS file.



It can be seen that PID 17 (0x11) contains SDT actual transport stream (0x42) and SDT other transport stream (0x46) tables.
PID 18 (0x12) contains various types of EIT tables.
PID 20 (0x14) contains TDT and TOT tables.
PID 48 (0x40) is a CA EMM stream containing table_id's 0x82 and 0x84 tables.
PID 102 (0x66) is a CA ECM stream containing table_id's 0x80 and 0x81 tables.
PID 8001 (0x1f41) contains a DSM-CC carousel. Table_id 0x3b is userNetworkMessage and table_id 0x3c is downloadDataMessage.

You can open the sample sheet here https://docs.google.com/spreadsheet/ccc?key=0AlzKD8F--RuTdDNrUFpSY0lMWkpxWG1lTTJZaUotTnc&usp=sharing


Saturday, 11 August 2012

Extracting CA EMM/ECM sections with TS File Demux

In this post I will demonstrate how to use TS File Demux section  filter feature to extraxt CA entitlement management message (EMM) / entitlement control message (ECM) sections. I will use a local DVB-T MUX 770 MHz from GO as example.
Screenshot below show the MUX in DVBStreamExplorer with Boomerang TV service expanded.

Boomerang TV service expanded in DVBStreamExplorer TS Mon


I have outlined CA EMM and ECM streams which are those of interest for this post. It can be seen that CA provider is Norwegian Telekom (CA_ID 0x0b00) which would imply that the CA system is Conax. The EMM PID is carried on PID 0x0063 (99) and the ECM PID for Boomerang TV service is carried on PID 0x01f6 (502).
I used DVBStreamExplorer to capture a Transport Stream file that I will use as input in TS File Demux. But you can use any software capable of capturing Transport Stream file.

After launching TS File Demux the first thing to do is to open the Transport Stream file saved in previous step. TS File Demux will scan the file for program and PID information and you will end up with something similar to screenshot below.

TS File Demux after selecting TS file

You can now locate the PID streams of interest and add filters. You can can double-click on an entry containing a PID value in programs tree to populate filter controls. The application will try to find the most appropriate filter type from the context. You can change parameters before adding the filter by applying 'Add' button.
Below is screenshot after adding 0x0063 (EMM) and 0x01f6 (EMM) section filters.

TS File Demux after adding filters



Now apply 'Start' button and the selected streams will be saved to the folder specified. Two files were generated, sec_0x0063.bin and sec_0x01f6.bin. Their file names were generated from the filter type (section ) and from the PID values saved.
Below is screenshot of sec_0x01f6.bin shown in a hex editor (PSPad).

ECM section in hex highlighted in hex editor

One ECM section is highlighted. It can be seen that table_id field is 0x80 and section_length field is 0x44 (68) bytes.
It is beyond the scope of this post trying to interpret the content of ECM section. I will leave this as an exercise for the reader.
Happy CA exploring!