Make error with CAM

Support forum for minisatip
cata
Site Admin
Posts: 770
Joined: Tue May 12, 2015 1:01 am

Re: Make error with CAM

Post by cata »

Hi,

The PMT CA line displays the PMT pid and SID that are sent to the CI and not the CA pid for decoding.

Maybe the message is a bit confusing ....

BTW is version 0.4 working?

Thanks
cata
Site Admin
Posts: 770
Joined: Tue May 12, 2015 1:01 am

Re: Make error with CAM

Post by cata »

It is wrong message but the ca.c should send pmt pid to the CI.

Can you try if version 0.4 works?

Is tvheadend working for you?
Yuri
Posts: 68
Joined: Thu Oct 01, 2015 7:26 pm

Re: Make error with CAM

Post by Yuri »

Hi,
yes, PMT sent to CAM clear, without any warnings and errors - i made tests.
i tried version 0.4 with same negative result.
I'll try to test tvheadend in weekend at x86 computer. (now it installed at banana pi and has tbs drivers problem).
I see what in minisatip code absent handler MMI resources. It's really not needed?(i'm not good at this point)
BR
Yuri
Posts: 68
Joined: Thu Oct 01, 2015 7:26 pm

Re: Make error with CAM

Post by Yuri »

Forum denied me to send two messages in a row yesterday.
I tested tvheadend with local dvb. CAM worked, but very unstable. To make it work i had to switch to scrambled channel and disable-enable ca in web interface after every start tvheadend. Until next tvheadend start descrambler worked.
update:
tvheadend wrked stable with fake CA workaround: https://tvheadend.org/issues/2794#note-75
cata
Site Admin
Posts: 770
Joined: Tue May 12, 2015 1:01 am

Re: Make error with CAM

Post by cata »

Hi,

If you can provide remote access I can take a look...

Thanks
Yuri
Posts: 68
Joined: Thu Oct 01, 2015 7:26 pm

Re: Make error with CAM

Post by Yuri »

Hi,
sorry, did not work out. I'm behind two NATs.
BR
Yuri
Posts: 68
Joined: Thu Oct 01, 2015 7:26 pm

Re: Make error with CAM

Post by Yuri »

Hi,
i think i found mistake in code.
After i made this changes, descrambling now work:

Code: Select all

        if ((size = en50221_ca_format_pmt((struct mpeg_pmt_section *) b, capmt,
//                      sizeof(capmt), CA_LIST_MANAGEMENT_ONLY, 0,
                        sizeof(capmt), 0, CA_LIST_MANAGEMENT_ONLY,
                        CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0)
                LOG("Failed to format CA PMT object");
BR
cata
Site Admin
Posts: 770
Joined: Tue May 12, 2015 1:01 am

Re: Make error with CAM

Post by cata »

Thanks Yuri, I have added the fix to the latest commit.
Yuri
Posts: 68
Joined: Thu Oct 01, 2015 7:26 pm

Re: Make error with CAM

Post by Yuri »

Hi,
After start minisatip performed CI initialisation. If i immediately switch to scrambled channel, all work ok:

Code: Select all

oot@OrangePI:/usr/src/minisatip-test# ./minisatip -d 0:4-0 -D 5 -R /usr/local/etc/html -f -l -t | grep CA
[02/04 22:49:16.191 main]: No CA device detected on adapter 0
[02/04 22:49:18.428 main]: initializing CA, fd 12 type 2 flags 0x3
[02/04 22:49:18.429 CA1]: stackthread_func: start
[02/04 22:49:18.506 CA1]: ca_session_callback: reason 6 slot_id 0 session_number 1 resource_id 0
[02/04 22:49:18.809 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 10041
[02/04 22:49:18.809 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 1 resource_id 10041
[02/04 22:49:18.810 CA1]: CAM connecting
[02/04 22:49:18.810 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 1 resource_id 10041
[02/04 22:49:18.810 CA1]: CAM connected
[02/04 22:49:19.120 CA1]: 00:ca_rm_reply_callback
[02/04 22:49:19.330 CA1]: 00:ca_rm_enq_callback
[02/04 22:49:19.539 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 20041
[02/04 22:49:19.539 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 2 resource_id 20041
[02/04 22:49:19.540 CA1]: CAM connecting
[02/04 22:49:19.540 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 2 resource_id 20041
[02/04 22:49:19.540 CA1]: CAM connected
[02/04 22:49:19.857 CA1]: 00:ca_ai_callback
[02/04 22:49:19.857 CA1]:   Application type: 01
[02/04 22:49:19.857 CA1]:   Application manufacturer: 4a60
[02/04 22:49:19.857 CA1]:   Manufacturer code: 0001
[02/04 22:49:19.857 CA1]:   Menu string: DRE NKE
[02/04 22:49:20.059 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 30041
[02/04 22:49:20.059 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 3 resource_id 30041
[02/04 22:49:20.059 CA1]: CAM connecting
[02/04 22:49:20.060 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 3 resource_id 30041
[02/04 22:49:20.060 CA1]: CAM connected
[02/04 22:49:20.376 CA1]: 00:ca_ca_info_callback
[02/04 22:49:20.376 CA1]:   Supported CA ID: 2710
[02/04 22:49:20.376 CA1]:   Supported CA ID: 7be1
[02/04 22:49:20.376 CA1]:   Supported CA ID: 7be0
[02/04 22:49:20.376 CA1]:   Supported CA ID: 4ae1
[02/04 22:49:20.376 CA1]:   Supported CA ID: 4ae0
[02/04 22:49:23.381 AD1]: PMT CA pid 3520 len 102 ver 28 sid 34012 (84dc)
[02/04 22:49:23.383 AD1]: PMT pid: 0DCA (3530), pmt_len 102, pi_len 54, sid 84DD (34013)
If minisatip sometime worked at unscrambled channel or stay idle, switching to scrambled channel performed CI initialisation, but this is long enough and CA PMT sending failed:

Code: Select all

02/04 22:51:02.898 main]: initializing CA, fd 11 type 2 flags 0x3
[02/04 22:51:02.899 CA1]: stackthread_func: start
[02/04 22:51:02.976 CA1]: ca_session_callback: reason 6 slot_id 0 session_number 1 resource_id 0
[02/04 22:51:03.279 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 10041
[02/04 22:51:03.279 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 1 resource_id 10041
[02/04 22:51:03.280 CA1]: CAM connecting
[02/04 22:51:03.280 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 1 resource_id 10041
[02/04 22:51:03.280 CA1]: CAM connected
[02/04 22:51:03.589 CA1]: 00:ca_rm_reply_callback
[02/04 22:51:03.804 AD1]: PMT CA pid 3520 len 102 ver 28 sid 34012 (84dc)
[02/04 22:51:03.805 AD1]: Adapter 1, Failed to send CA PMT object, error -1
[02/04 22:51:03.811 CA1]: 00:ca_rm_enq_callback
[02/04 22:51:04.019 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 20041
[02/04 22:51:04.019 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 2 resource_id 20041
[02/04 22:51:04.019 CA1]: CAM connecting
[02/04 22:51:04.019 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 2 resource_id 20041
[02/04 22:51:04.019 CA1]: CAM connected
[02/04 22:51:04.336 CA1]: 00:ca_ai_callback
[02/04 22:51:04.337 CA1]:   Application type: 01
[02/04 22:51:04.337 CA1]:   Application manufacturer: 4a60
[02/04 22:51:04.337 CA1]:   Manufacturer code: 0001
[02/04 22:51:04.337 CA1]:   Menu string: DRE NKE
[02/04 22:51:04.540 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 30041
[02/04 22:51:04.540 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 3 resource_id 30041
[02/04 22:51:04.540 CA1]: CAM connecting
[02/04 22:51:04.540 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 3 resource_id 30041
[02/04 22:51:04.540 CA1]: CAM connected
[02/04 22:51:04.855 CA1]: 00:ca_ca_info_callback
[02/04 22:51:04.855 CA1]:   Supported CA ID: 2710
[02/04 22:51:04.855 CA1]:   Supported CA ID: 7be1
[02/04 22:51:04.855 CA1]:   Supported CA ID: 7be0
[02/04 22:51:04.855 CA1]:   Supported CA ID: 4ae1
[02/04 22:51:04.856 CA1]:   Supported CA ID: 4ae0
After reswitching channel all work ok:

Code: Select all

[02/04 22:51:04.855 CA1]:   Supported CA ID: 4ae1
[02/04 22:51:04.856 CA1]:   Supported CA ID: 4ae0
[02/04 22:51:27.313 AD1]: PMT CA pid 3520 len 102 ver 28 sid 34012 (84dc)
How possible made delay sending CA PMT before CI initialised after switch channel?
BR
digihoe
Posts: 15
Joined: Tue Apr 12, 2016 9:07 am

Re: Make error with CAM

Post by digihoe »

Maybe it's better to always initialise the CI with launch of the minisatip server. Or atheist make it an option.

Best regards!
Post Reply