[linux-dvb] CI problems with Twinhan VP-3040 (DTT-CI)

Manu Abraham abraham.manu at gmail.com
Mon Oct 10 16:14:51 CEST 2005


Henrik Sjoberg wrote:

>Hi,
>
>I am struggling with my Twinhan VP-3040 to get the CI working. Everything
>looks fine up to the point where I actually want to tell the CAM to
>decrypt a channel.
>I'm no EN50221-master, but I believe that the problem is that in the
>ca_pmt, both program_info_length and ES_info_length fields are zero,
>meaning that there is no ca_pmt_cmd_id in the message. Hence, there is
>nothing telling the CAM to start decripting.
>
>Could someone with a bit more insight in EN50221 look at my logs and tell
>me if I'm on the right track and a bit more on how my ca_pmt mesage should
>look.
>
>Ok, let's move on to some logs
>
>
>First, we start out with ca_zap:
>
>[root at evermeet ~]# /usr/src/dvb-apps//util/ca_zap/ca_zap -c
>~/.tzap/channels.conf -n TV3 -t ter
>Using Adpater=[/dev/dvb/adapter0]
> Frontend=[/dev/dvb/adapter0/frontend0]
> Demux=[/dev/dvb/adapter0/demux0]
> Slot=[/dev/dvb/adapter0/ca0]
>Parsing /root/.tzap/channels.conf
>Terrestrial frontend
>Channel TV3
>parse_ter_channel_list: Channel=[TV3], Frequency=[786000000],
>Video=[1039], Audio=[1038], Service=[1030]
>Service ID=[1030]
>parse_pat: ----------------->parse PAT section
>parse_pat: PAT => Section Length=[73], TS ID=[1110]
>parse_si: PMT PID = [1030]
>parse_si: PAT: Close Demux /dev/dvb/adapter0/demux0
>parse_pmt: PMT Words=[ 02 b0 73 04 06 c9 00 00 e4 0f f0 00 05 ef a4 f0 12
>0f 04 4f 54 56 00 90 01 86 fe 04 45 50 47 32 fd 01 20 02
>e4 0f f0 11 09 0f 05 00 e0 32 10 01 01 13 01 20 14 03 02 05 08 03 e4 0e f0
>11 09 0f 05 00 e0 32 10 01 01 13 01 20 14 03 02 05 08 06
> e4 0c f0 07 56 05 73 77 65 09 00 05 e4 08 f0 12 0f 04 4f 54 56 00 90 01
>86 fe 04 31 30 33 32 fd 01 80 e1 df dc cc ]
>
>parse_pmt: ----------->parse PMT section, PMT PID=[1030], bytes=[118]
>parse_pmt_header: Table ID=[2], Section Length=[115], Program
>Number=[1030], Section Number=[0], PCR PID=[1039], Program info lengt
>h=[0]
>parse_pmt: Program info length=[0]
>
>        parse_streams: Elements=[ 05 ef a4 f0 12 0f 04 4f 54 56 00 90 01
>86 fe 04 45 50 47 32 fd 01 20]
>        parse_streams: Stream=[0], Stream Type=[5], Elementary PID=[4004],
>ES info length=[18]
>
>copy_en50221_pmt_object: Copying EN50221 Header
>copy_en50221_pmt_object: Program Number=[1030], Program info length=[0]
>copy_en50221_pmt_object: Program level descriptor count=[0]
>copy_en50221_stream_object: Stream Type=[5], Elementary PID=[4004], ES
>length=[18], Number of descriptors=[0]
>do_en50221_pmt_object: CA PMT List Management=[03]
>set_pmt_command: Setting PMT Command
>do_en50221_pmt_object: Object length=[88], Total length=[11]
>asn_1_encode: Length=[11]
>asn_1_encode: length indicator=[0b]
>do_en50221_pmt_object: ASN.1 words=[1], Length Array=[  11 ]
>en50221_encode_header: CA PMT List Mgmt=[3], Program Number=[1030],
>Program info length=[0]
>write_en50221_pmt_object: EN50221 header encoded
>en50221_encode_streams: Stream type=[05], ES PID=[fa4], ES Info length=[12]
>debug_message: CA MESSAGE=[ 9f 80 32 0b 03 04 06 d1 10 00 05 ef a4 f0 00  ]
>
>
>decoding the message gives:
>9f 80 32 - ca_pmt
>0b - length
>03 - select 'only'
>04 06 - Program # (1030)
>d1 - Reserved+Version=8,current_next_ind=1
>10 00 - reserved+program_info_length=0
>05 - stream_type=5
>ef a4 - Reserved+Elementary PID=4004
>f0 00 - Reserved+ES_info_length=0
>
>>From what I can tell from ca_zap, the program_info_length is actually
>zero, while the ES_info_length is not. However, since the number of
>  
>

program_info_length is the length of the descriptors at program level.

>descriptors is zero, ES_info_length is set to zero too. From the dvbsnoop
>log (see below) it seems that there ARE ca descriptors in the ES_info.
>
>  
>

for each stream, you will have es_info_length. Since you have CA 
descriptors at stream level, this is probably decryption at stream 
level, but most probably you don't have decryption at stream level, but 
only at program level, but your provider has moved the descriptors to 
stream level.

Some providers do this, i don't know why it is being done.

>Could someone please help me understand this. Am I right when I believe
>that the problem is that there is no ca_pmt_cmd_id in the message? If so,
>why is there not? Is it a problem in en50221_encode.c?
>  
>

Yes, first of all there is no ca_pmt_cmd_id. The reason is that 
program_length=0
Your CA descriptors are at stream level, these descriptors will need to 
be copied to program level and ca_pmt_cmd_id be set for decryption to work.


Regards,
Manu




More information about the linux-dvb mailing list