catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
327 stars 81 forks source link

enhancement: digital devices standalone CI support #126

Closed 9000h closed 6 years ago

9000h commented 9 years ago

I'm not sure if there is any demand to support the digital devices independent CI adapters, a sample implantation can be found here https://github.com/vinwareznic/astra-4/blob/master/modules/dvb/ddci.c and here for VDR (VDR 2.2.0 supports it direct) https://github.com/flensrocker/vdr-plugin-ddci

catalinii commented 9 years ago

If there are ppl interested in this let me know, also I would need hw to test it ...

9000h commented 9 years ago

I do have the hardware here but no real need atm.

9000h commented 9 years ago

close as nobody seems to be interested for now

9000h commented 8 years ago

the CA adapters for independent CA mode are not working/implemented jet the devices /dev/dvb/adapter0: total 0 crw-rw----+ 1 root video 212, 0 Nov 15 01:56 demux0 crw-rw----+ 1 root video 212, 1 Nov 15 01:56 dvr0 crw-rw----+ 1 root video 212, 3 Nov 15 01:56 frontend0 crw-rw----+ 1 root video 212, 2 Nov 15 01:56 net0

/dev/dvb/adapter1: total 0 crw-rw----+ 1 root video 212, 4 Nov 15 01:56 demux0 crw-rw----+ 1 root video 212, 5 Nov 15 01:56 dvr0 crw-rw----+ 1 root video 212, 7 Nov 15 01:56 frontend0 crw-rw----+ 1 root video 212, 6 Nov 15 01:56 net0

/dev/dvb/adapter2: total 0 crw-rw----+ 1 root video 212, 8 Nov 15 01:56 demux0 crw-rw----+ 1 root video 212, 9 Nov 15 01:56 dvr0 crw-rw----+ 1 root video 212, 11 Nov 15 01:56 frontend0 crw-rw----+ 1 root video 212, 10 Nov 15 01:56 net0

/dev/dvb/adapter3: total 0 crw-rw----+ 1 root video 212, 12 Nov 15 01:56 demux0 crw-rw----+ 1 root video 212, 13 Nov 15 01:56 dvr0 crw-rw----+ 1 root video 212, 15 Nov 15 01:56 frontend0 crw-rw----+ 1 root video 212, 14 Nov 15 01:56 net0

/dev/dvb/adapter4: total 0 crw-rw----+ 1 root video 212, 16 Nov 15 01:56 ca0 crw-rw----+ 1 root video 212, 17 Nov 15 01:56 ci0

here are also some info about the drivers http://www.spinics.net/lists/linux-media/msg39472.html

9000h commented 8 years ago

I did some tests with the DD CA in redirect mode which is comparable to a direct attached CA on some cards modprobe ddbridge adapter_alloc=3 an then the needed redirect "echo "01 02" > /sys/class/ddbridge/ddbridge0/redirect" in my case I got cleared streams with master and 0.5.

would be nice to get the independent mode also implemented as this gives the opportunity to assign the available CA's dynamical to the cards or if there is a "virtual CA" then MTD would be also possible if the CI supports it.

9000h commented 8 years ago

I could not get stable reproducible results atm in master an 0.5, in 0.5 some times the first CA get's as CA1 or CA2 detected and should be CA0

here are a sample there is no video/audio and the last "15/11 17:16:23.285188 CA1]: 00:ca_ca_info_callback" looks truncated

./minisatip -l -l -l -D7 -f
[15/11 17:11:37.000 main]: minisatip version 0.5.6, compiled with s2api version: 050A
[15/11 17:11:37.001 main]: New UDP socket 3 bound to 0.0.0.0:1900
[15/11 17:11:37.001 main]: setting multicast for 239.255.255.250
[15/11 17:11:37.001 main]: New UDP socket 4 bound to 239.255.255.250:1900
[15/11 17:11:37.001 main]: Mutex init 0x6392e0
[15/11 17:11:37.001 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x2069cb0
[15/11 17:11:37.002 main]: Mutex init 0x2069cb8
[15/11 17:11:37.002 main]: sockets_add: handle 3 (type 0) returning socket index 0 [0.0.0.0:0] read: 0x40800e
[15/11 17:11:37.002 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x206a900
[15/11 17:11:37.002 main]: Mutex init 0x206a908
[15/11 17:11:37.002 main]: sockets_add: handle 4 (type 0) returning socket index 1 [0.0.0.0:0] read: 0x40800e
[15/11 17:11:37.002 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x206b550
[15/11 17:11:37.002 main]: Mutex init 0x206b558
[15/11 17:11:37.002 main]: sockets_add: handle 5 (type 2) returning socket index 2 [0.0.0.0:0] read: 0x407ec1
[15/11 17:11:37.002 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x206c1a0
[15/11 17:11:37.002 main]: Mutex init 0x206c1a8
[15/11 17:11:37.002 main]: sockets_add: handle 6 (type 2) returning socket index 3 [0.0.0.0:0] read: 0x407ec1
[15/11 17:11:37.002 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x206cdf0
[15/11 17:11:37.002 main]: Mutex init 0x206cdf8
[15/11 17:11:37.002 main]: sockets_add: handle -2 (type 0) returning socket index 4 [0.0.0.0:0] read: 0x40800e
[15/11 17:11:37.002 main]: Mutex init 0x63c400
[15/11 17:11:37.002 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x206da40
[15/11 17:11:37.002 main]: Mutex init 0x206da48
[15/11 17:11:37.002 main]: sockets_add: handle -2 (type 0) returning socket index 5 [0.0.0.0:0] read: 0x40800e
[15/11 17:11:37.002 main]: Mutex init 0x63b9e0
[15/11 17:11:37.003 main]: starting init_all_hw 0
[15/11 17:11:37.003 main]: Mutex init 0x63a200
[15/11 17:11:37.003 main]: dvb.c:1003 allocation_wrapper malloc allocated 3160 bytes at 0x206e690
[15/11 17:11:37.003 main]: dvb.c:1003 allocation_wrapper malloc allocated 3160 bytes at 0x206f2f0
[15/11 17:11:37.003 main]: dvb.c:1003 allocation_wrapper malloc allocated 3160 bytes at 0x206ff50
[15/11 17:11:37.003 main]: dvb.c:1003 allocation_wrapper malloc allocated 3160 bytes at 0x2070bb0
[15/11 17:11:37.006 main]: Mutex init 0x206e698
[15/11 17:11:37.006 main]: trying to open [0] adapter 0 and frontend 0
[15/11 17:11:37.007 main]: opened DVB adapter 0 fe:7 dvr:8
[15/11 17:11:37.007 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:11:37.007 main]: adapter.c:155 allocation_wrapper malloc allocated 25014 bytes at 0x2071810
[15/11 17:11:37.007 main]: deleting pids on adapter 0, sid -1, pids=NULL
[15/11 17:11:37.025 main]: Detected adapter 0 handle 7 DVB Card Name: STV090x Multistandard
[15/11 17:11:37.025 main]: Detected delivery system for adapter 0: dvbs [5]
[15/11 17:11:37.025 main]: Detected delivery system for adapter 0: dvbs2 [6]
[15/11 17:11:37.025 main]: Detected delivery system for adapter 0: dss [4]
[15/11 17:11:37.025 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x20779d0
[15/11 17:11:37.025 main]: Mutex init 0x20779d8
[15/11 17:11:37.025 main]: sockets_add: handle 8 (type 5) returning socket index 6 [0.0.0.0:0] read: 0x407fc5
[15/11 17:11:37.025 main]: set_socket_thread: thread adb54700 for sockets 6
[15/11 17:11:37.025 main]: ca.c:527 allocation_wrapper malloc allocated 104 bytes at 0x2069500
[15/11 17:11:37.026 AD0]: Starting select_and_execute on thread ID adb54700, thread_name AD0
[15/11 17:11:40.2535 main]: initializing CA, fd 9 type 2 flags 0x1
[15/11 17:11:40.2535 main]: CA module not present or not ready
[15/11 17:11:40.2535 main]: done opening adapter 0 fe_sys 5 6 4 0
[15/11 17:11:40.2535 main]: Mutex init 0x206f2f8
[15/11 17:11:40.2535 main]: trying to open [1] adapter 0 and frontend 1
[15/11 17:11:40.2536 main]: opened DVB adapter 1 fe:9 dvr:10
[15/11 17:11:40.2538 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:11:40.2539 main]: adapter.c:155 allocation_wrapper malloc allocated 25014 bytes at 0x2078870
[15/11 17:11:40.2539 main]: deleting pids on adapter 1, sid -1, pids=NULL
[15/11 17:11:40.2551 main]: Detected adapter 1 handle 9 DVB Card Name: STV090x Multistandard
[15/11 17:11:40.2551 main]: Detected delivery system for adapter 1: dvbs [5]
[15/11 17:11:40.2551 main]: Detected delivery system for adapter 1: dvbs2 [6]
[15/11 17:11:40.2551 main]: Detected delivery system for adapter 1: dss [4]
[15/11 17:11:40.2552 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x207ea30
[15/11 17:11:40.2552 main]: Mutex init 0x207ea38
[15/11 17:11:40.2552 main]: sockets_add: handle 10 (type 5) returning socket index 7 [0.0.0.0:0] read: 0x407fc5
[15/11 17:11:40.2552 main]: set_socket_thread: thread ad353700 for sockets 7
[15/11 17:11:40.2552 AD1]: Starting select_and_execute on thread ID ad353700, thread_name AD1
[15/11 17:11:40.2552 main]: ca.c:527 allocation_wrapper malloc allocated 104 bytes at 0x2069570
[15/11 17:11:42.5062 main]: initializing CA, fd 11 type 2 flags 0x3
[15/11 17:11:42.5063 main]: slotid: 0
[15/11 17:11:42.5063 main]: tcid: 1
[15/11 17:11:42.5063 main]: done opening adapter 1 fe_sys 5 6 4 0
[15/11 17:11:42.5063 main]: Mutex init 0x206ff58
[15/11 17:11:42.5064 main]: trying to open [2] adapter 0 and frontend 2
[15/11 17:11:42.5064 CA1]: stackthread_func: start
[15/11 17:11:42.5065 main]: opened DVB adapter 2 fe:12 dvr:13
[15/11 17:11:42.5067 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:11:42.5068 main]: adapter.c:155 allocation_wrapper malloc allocated 25014 bytes at 0x20806a0
[15/11 17:11:42.5068 main]: deleting pids on adapter 2, sid -1, pids=NULL
[15/11 17:11:42.5068 main]: Detected adapter 2 handle 12 DVB Card Name: STV0367 DVB-C DVB-T
[15/11 17:11:42.5068 main]: Detected delivery system for adapter 2: dvbc [1]
[15/11 17:11:43.5068 main]: Detected delivery system for adapter 2: dvbt [3]
[15/11 17:11:43.5068 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x2086860
[15/11 17:11:43.5068 main]: Mutex init 0x2086868
[15/11 17:11:43.5069 main]: sockets_add: handle 13 (type 5) returning socket index 8 [0.0.0.0:0] read: 0x407fc5
[15/11 17:11:43.5070 main]: set_socket_thread: thread 9ffff700 for sockets 8
[15/11 17:11:43.5070 main]: No CA device detected on adapter 2
[15/11 17:11:43.5071 main]: done opening adapter 2 fe_sys 1 3 0 0
[15/11 17:11:43.5071 main]: Mutex init 0x2070bb8
[15/11 17:11:43.5071 main]: trying to open [3] adapter 0 and frontend 3
[15/11 17:11:43.5071 AD2]: Starting select_and_execute on thread ID 9ffff700, thread_name AD2
[15/11 17:11:43.5072 main]: opened DVB adapter 3 fe:14 dvr:15
[15/11 17:11:43.5074 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:11:43.5074 main]: adapter.c:155 allocation_wrapper malloc allocated 25014 bytes at 0x2087700
[15/11 17:11:43.5074 main]: deleting pids on adapter 3, sid -1, pids=NULL
[15/11 17:11:43.5074 main]: Detected adapter 3 handle 14 DVB Card Name: STV0367 DVB-C DVB-T
[15/11 17:11:43.5074 main]: Detected delivery system for adapter 3: dvbc [1]
[15/11 17:11:43.5075 main]: Detected delivery system for adapter 3: dvbt [3]
[15/11 17:11:43.5075 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x208d8c0
[15/11 17:11:43.5075 main]: Mutex init 0x208d8c8
[15/11 17:11:43.5075 main]: sockets_add: handle 15 (type 5) returning socket index 9 [0.0.0.0:0] read: 0x407fc5
[15/11 17:11:43.5075 main]: set_socket_thread: thread 9f7fe700 for sockets 9
[15/11 17:11:43.5075 main]: No CA device detected on adapter 3
[15/11 17:11:43.5075 main]: done opening adapter 3 fe_sys 1 3 0 0
[15/11 17:11:43.5075 main]: done init_hw 1
[15/11 17:11:43.5075 main]: Initializing with 4 devices
[15/11 17:11:43.5075 AD3]: Starting select_and_execute on thread ID 9f7fe700, thread_name AD3
[15/11 17:11:43.5076 main]: Starting select_and_execute on thread ID aed808c0, thread_name main
[15/11 17:11:43.5076 main]: ssdp_discovery: bootid: 24 deviceid: 7 http: 192.168.178.129:8080
[15/11 17:11:43.5076 main]: Discovery packet 1:
---
[15/11 17:11:43.5167 CA1]: ca_session_callback: reason 6 slot_id 0 session_number 1 resource_id 0
[15/11 17:11:43.5396 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 10041
[15/11 17:11:43.5396 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 1 resource_id 10041
[15/11 17:11:43.5396 CA1]: CAM connecting
[15/11 17:11:43.5396 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 1 resource_id 10041
[15/11 17:11:43.5396 CA1]: CAM connected
[15/11 17:11:43.5747 CA1]: 00:ca_rm_reply_callback
[15/11 17:11:43.5748 CA1]:   CAM provided resource id: 00010041
[15/11 17:11:43.5748 CA1]:   CAM provided resource id: 00020041
[15/11 17:11:43.5748 CA1]:   CAM provided resource id: 00030041
[15/11 17:11:43.5748 CA1]:   CAM provided resource id: 00240041
[15/11 17:11:43.5748 CA1]:   CAM provided resource id: 00400041
[15/11 17:11:44.6642 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 20041
[15/11 17:11:44.6642 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 2 resource_id 20041
[15/11 17:11:44.6642 CA1]: CAM connecting
[15/11 17:11:44.6642 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 2 resource_id 20041
[15/11 17:11:44.6642 CA1]: CAM connected
[15/11 17:11:45.7094 CA1]: 00:ca_ai_callback
[15/11 17:11:45.7095 CA1]:   Application type: 01
[15/11 17:11:45.7095 CA1]:   Application manufacturer: 0001
[15/11 17:11:45.7095 CA1]:   Manufacturer code: 0001
[15/11 17:11:45.7095 CA1]:   Menu string: UNDERWORLD 2.30
[15/11 17:11:45.7989 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 30041
[15/11 17:11:45.7989 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 3 resource_id 30041
[15/11 17:11:45.7989 CA1]: CAM connecting
[15/11 17:11:45.7989 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 3 resource_id 30041
[15/11 17:11:45.7989 CA1]: CAM connected
[15/11 17:11:46.8362 CA1]: 00:ca_ca_info_callback
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 0100
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 0500
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 0b00
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 0604
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 0606
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 0661
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 0662
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 1702
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 1722
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 1762
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 1800
[15/11 17:11:46.8362 CA1]:   Supported CA ID: 1801
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 1833
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 09c4
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 0d00
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 0d01
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 0d03
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 0d22
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 0919
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 1802
[15/11 17:11:46.8363 CA1]:   Supported CA ID: 1803
[15/11 17:11:46.8364 CA1]:   Supported CA ID: 183d
[15/11 17:11:46.8364 CA1]:   Supported CA ID: 2600
[15/11 17:12:00.22812 main]: Received SSDP packet from 192.168.178.1:1900 -> handle 3
[15/11 17:12:00.22812 main]: NOTIFY * HTTP/1.1
---
[15/11 17:12:43.65122 main]: Dropping packet from the same UUID as mine (from 192.168.178.129:1900)
Message repeated 5 times
[15/11 17:12:43.65127 AD2]: Requested adapter 2 close due to timeout, result 1 max_rtime 5075
[15/11 17:12:43.65127 AD2]: sockets_del: 8 -> handle 13, sid 2
[15/11 17:12:43.65127 AD2]: closing DVR socket -1 pos 8 aid 2
[15/11 17:12:43.65127 AD2]: closing adapter 2  -> fe:12 dvr:13
[15/11 17:12:43.65127 AD2]: adapter.c:637: get_adapter returns NULL for adapter_id 2
[15/11 17:12:43.65127 AD2]: adapter.c:456: get_adapter returns NULL for adapter_id 2
[15/11 17:12:43.65127 AD3]: Requested adapter 3 close due to timeout, result 1 max_rtime 5075
[15/11 17:12:43.65127 AD2]: done closing adapter 2
[15/11 17:12:43.65128 AD2]: sockets_del: 8 Last open socket is at index 9 current_handle 13
[15/11 17:12:43.65128 AD3]: sockets_del: 9 -> handle 15, sid 3
[15/11 17:12:43.65128 AD3]: closing DVR socket -1 pos 9 aid 3
[15/11 17:12:43.65128 AD3]: closing adapter 3  -> fe:14 dvr:15
[15/11 17:12:43.65128 AD3]: adapter.c:637: get_adapter returns NULL for adapter_id 3
[15/11 17:12:43.65128 AD3]: adapter.c:456: get_adapter returns NULL for adapter_id 3
[15/11 17:12:43.65128 AD3]: done closing adapter 3
[15/11 17:12:43.65129 AD3]: sockets_del: 9 Last open socket is at index 7 current_handle 15
[15/11 17:12:43.65166 AD1]: Requested adapter 1 close due to timeout, result 1 max_rtime 2551
[15/11 17:12:43.65166 AD1]: sockets_del: 7 -> handle 10, sid 1
[15/11 17:12:43.65166 AD1]: closing DVR socket -1 pos 7 aid 1
[15/11 17:12:43.65166 AD1]: closing adapter 1  -> fe:9 dvr:10
[15/11 17:12:43.65166 AD1]: adapter.c:637: get_adapter returns NULL for adapter_id 1
[15/11 17:12:43.65166 AD1]: adapter.c:456: get_adapter returns NULL for adapter_id 1
[15/11 17:12:43.65166 AD1]: done closing adapter 1
[15/11 17:12:43.65167 AD1]: sockets_del: 7 Last open socket is at index 5 current_handle 10
[15/11 17:12:43.65205 AD0]: No enabled sockets for Thread ID 7f45adb54700 name AD0 ... exiting 
[15/11 17:12:43.65228 AD2]: No enabled sockets for Thread ID 7f459ffff700 name AD2 ... exiting 
[15/11 17:12:43.65229 AD3]: No enabled sockets for Thread ID 7f459f7fe700 name AD3 ... exiting 
[15/11 17:12:43.65267 AD1]: No enabled sockets for Thread ID 7f45ad353700 name AD1 ... exiting 
[15/11 17:13:00.83043 main]: Received SSDP packet from 192.168.178.133:1900 -> handle 3
[15/11 17:13:00.83044 main]: NOTIFY * HTTP/1.1
---
[15/11 17:16:13.275787 main]: Mutex init 0x20779d8
[15/11 17:16:13.275788 main]: sockets_add: handle 7 (type 1) returning socket index 6 [192.168.178.140:57256] read: 0x407fc5
[15/11 17:16:13.275795 main]: minisatip.c:497 get_sid returns NULL for s_id = -1
[15/11 17:16:13.275795 main]: read RTSP (from handle 7 sock_id 6, len: 0, sid -1):
OPTIONS rtsp://192.168.178.129/?src=1&freq=12070&pol=h&msys=dvbs&sr=27500&pids=0,97,511,32,512 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)

[15/11 17:16:13.275795 main]: detect_dvb_parameters (S)-> src=1&freq=12070&pol=h&msys=dvbs&sr=27500&pids=0,97,511,32,512
[15/11 17:16:13.275795 main]: detect_dvb_parameters (E) -> src=1, fe=0, freq=12070000, fec=9, sr=27500000, pol=2, ro=3, msys=5, mtype=0, plts=2, bw=8000000, inv=2, pids=0,97,511,32,512 - apids=NULL - dpids=NULL x_pmt=NULL
[15/11 17:16:13.275795 main]: Setup stream -1 parameters, sock_id 6, handle 7
[15/11 17:16:13.275795 main]: stream.c:203 get_sid returns NULL for s_id = -1
[15/11 17:16:13.275795 main]: Mutex init 0x6399e0
[15/11 17:16:13.275795 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x208e760
[15/11 17:16:13.275795 main]: Mutex init 0x208e768
[15/11 17:16:13.275795 main]: set_sock_lock: sock_id 6 locks also mutex 0x208e768
[15/11 17:16:13.275796 main]: Mutex init 0x207ea38
[15/11 17:16:13.275796 main]: sockets_add: handle -2 (type 0) returning socket index 7 [0.0.0.0:0] read: 0x40800e
[15/11 17:16:13.275796 main]: set_sock_lock: sock_id 7 locks also mutex 0x208e768
[15/11 17:16:13.275796 main]: Setup stream done: sid: 0 for sock 6 handle 7
[15/11 17:16:13.275796 main]: copy_dvb_param start -> src=0, fe=0, freq=0, fec=9, sr=0, pol=0, ro=3, msys=0, mtype=0, plts=2, bw=8000000, inv=2, pids=NULL, apids=NULL, dpids=NULL x_pmt=NULL
[15/11 17:16:13.275796 main]: copy_dvb_parameters -> src=1, fe=0, freq=12070000, fec=9 sr=27500000, pol=2, ro=3, msys=5, mtype=0, plts=2, bw=8000000, inv=2, pids=0,97,511,32,512, apids=NULL, dpids=NULL x_pmt=NULL
[15/11 17:16:13.275796 main]: reply -> 7 (192.168.178.140:57256) CL:0 [sock_id 6]:
RTSP/1.0 200 OK
Date: Sun, Nov 15 16:16:13 2015 GMT
Session: 1804289383
Cseq: 2
Public: OPTIONS, DESCRIBE, SETUP, PLAY, TEARDOWN
Server: minisatip/0.5.6

[15/11 17:16:13.275803 main]: read RTSP (from handle 7 sock_id 6, len: 0, sid 0):
DESCRIBE rtsp://192.168.178.129/?src=1&freq=12070&pol=h&msys=dvbs&sr=27500&pids=0,97,511,32,512 RTSP/1.0
CSeq: 3
User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
Accept: application/sdp

[15/11 17:16:13.275803 main]: detect_dvb_parameters (S)-> src=1&freq=12070&pol=h&msys=dvbs&sr=27500&pids=0,97,511,32,512
[15/11 17:16:13.275803 main]: detect_dvb_parameters (E) -> src=1, fe=0, freq=12070000, fec=9, sr=27500000, pol=2, ro=3, msys=5, mtype=0, plts=2, bw=8000000, inv=2, pids=0,97,511,32,512 - apids=NULL - dpids=NULL x_pmt=NULL
[15/11 17:16:13.275804 main]: Setup stream 0 parameters, sock_id 6, handle 7
[15/11 17:16:13.275804 main]: copy_dvb_param start -> src=1, fe=0, freq=12070000, fec=9, sr=27500000, pol=2, ro=3, msys=5, mtype=0, plts=2, bw=8000000, inv=2, pids=0,97,511,32,512, apids=NULL, dpids=NULL x_pmt=NULL
[15/11 17:16:13.275804 main]: copy_dvb_parameters -> src=1, fe=0, freq=12070000, fec=9 sr=27500000, pol=2, ro=3, msys=5, mtype=0, plts=2, bw=8000000, inv=2, pids=0,97,511,32,512, apids=NULL, dpids=NULL x_pmt=NULL
[15/11 17:16:13.275804 main]: adapter.c:862: get_adapter returns NULL for adapter_id -1
[15/11 17:16:13.275804 main]: reply -> 7 (192.168.178.140:57256) CL:258 [sock_id 6]:
RTSP/1.0 200 OK
Date: Sun, Nov 15 16:16:13 2015 GMT
Session: 1804289383
Cseq: 3
Content-type: application/sdp
Content-Base: rtsp://192.168.178.129/
Server: minisatip/0.5.6
Content-Length: 258

v=0
o=- 1804289383 1804289383 IN IP4 192.168.178.129
s=SatIPServer:1 2 2 2
t=0 0
m=video 0 RTP/AVP 33
c=IN IP4 0.0.0.0
a=control:stream=1
a=fmtp:33 ver=1.0;src=1;tuner=1,255,1,15,12070,h,qpsk,,,dvbs,27500,;pids=0,97,511,32,512
b=AS:5000
a=inactive

[15/11 17:16:13.275809 main]: read RTSP (from handle 7 sock_id 6, len: 0, sid 0):
SETUP rtsp://192.168.178.129/stream=1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
Transport: RTP/AVP;unicast;client_port=56958-56959

[15/11 17:16:13.275809 main]: decode_transport ->type 2, ttl 0 new socket to: 192.168.178.140:56958
[15/11 17:16:13.275809 main]: New UDP socket 8 bound to 0.0.0.0:5500
[15/11 17:16:13.275810 main]: New UDP socket 8 connected to 192.168.178.140:56958
[15/11 17:16:13.275810 main]: output UDP buffer size for socket 8 is 1048576 bytes
[15/11 17:16:13.275810 main]: New UDP socket 9 bound to 0.0.0.0:5501
[15/11 17:16:13.275810 main]: New UDP socket 9 connected to 192.168.178.140:56959
[15/11 17:16:13.275810 main]: Mutex init 0x2086868
[15/11 17:16:13.275810 main]: sockets_add: handle 9 (type 6) returning socket index 8 [0.0.0.0:0] read: 0x40800e
[15/11 17:16:13.275810 main]: reply -> 7 (192.168.178.140:57256) CL:0 [sock_id 6]:
RTSP/1.0 200 OK
Date: Sun, Nov 15 16:16:13 2015 GMT
Cseq: 4
Transport: RTP/AVP;unicast;destination=192.168.178.140;source=192.168.178.129;client_port=56958-56959;server_port=5500-5501
Session: 1804289383;timeout=30
com.ses.streamID: 1
Server: minisatip/0.5.6

[15/11 17:16:13.275854 main]: read RTSP (from handle 7 sock_id 6, len: 0, sid 0):
PLAY rtsp://192.168.178.129/ RTSP/1.0
CSeq: 5
User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
Session: 1804289383
Range: npt=0.000-

[15/11 17:16:13.275854 main]: Play for stream 0, type 2, rsock 8, adapter -1, sock_id 6 handle 7
[15/11 17:16:13.275854 main]: starting init_all_hw 0
[15/11 17:16:13.275854 main]: Mutex init 0x206e698
[15/11 17:16:13.275854 main]: trying to open [0] adapter 0 and frontend 0
[15/11 17:16:13.275856 main]: opened DVB adapter 0 fe:10 dvr:11
[15/11 17:16:13.275859 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:16:13.275859 main]: deleting pids on adapter 0, sid -1, pids=NULL
[15/11 17:16:13.275873 main]: Detected adapter 0 handle 10 DVB Card Name: STV090x Multistandard
[15/11 17:16:13.275873 main]: Detected delivery system for adapter 0: dvbs [5]
[15/11 17:16:13.275873 main]: Detected delivery system for adapter 0: dvbs2 [6]
[15/11 17:16:13.275873 main]: Detected delivery system for adapter 0: dss [4]
[15/11 17:16:13.275873 main]: Mutex init 0x208d8c8
[15/11 17:16:13.275873 main]: sockets_add: handle 11 (type 5) returning socket index 9 [0.0.0.0:0] read: 0x407fc5
[15/11 17:16:13.275874 main]: set_socket_thread: thread 9effd700 for sockets 9
[15/11 17:16:13.275874 AD0]: Starting select_and_execute on thread ID 9effd700, thread_name AD0
[15/11 17:16:16.278382 main]: initializing CA, fd 12 type 2 flags 0x1
[15/11 17:16:16.278382 main]: CA module not present or not ready
[15/11 17:16:16.278382 main]: done opening adapter 0 fe_sys 5 6 4 0
[15/11 17:16:16.278382 main]: Mutex init 0x206f2f8
[15/11 17:16:16.278382 main]: trying to open [1] adapter 0 and frontend 1
[15/11 17:16:16.278383 main]: opened DVB adapter 1 fe:12 dvr:13
[15/11 17:16:16.278384 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:16:16.278384 main]: deleting pids on adapter 1, sid -1, pids=NULL
[15/11 17:16:16.278396 main]: Detected adapter 1 handle 12 DVB Card Name: STV090x Multistandard
[15/11 17:16:16.278397 main]: Detected delivery system for adapter 1: dvbs [5]
[15/11 17:16:16.278397 main]: Detected delivery system for adapter 1: dvbs2 [6]
[15/11 17:16:16.278397 main]: Detected delivery system for adapter 1: dss [4]
[15/11 17:16:16.278397 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x208f600
[15/11 17:16:16.278397 main]: Mutex init 0x208f608
[15/11 17:16:16.278397 main]: sockets_add: handle 13 (type 5) returning socket index 10 [0.0.0.0:0] read: 0x407fc5
[15/11 17:16:16.278397 main]: set_socket_thread: thread 9e7fc700 for sockets 10
[15/11 17:16:16.278397 AD1]: Starting select_and_execute on thread ID 9e7fc700, thread_name AD1
[15/11 17:16:18.280905 main]: initializing CA, fd 14 type 2 flags 0x3
[15/11 17:16:18.280905 main]: slotid: 0
[15/11 17:16:18.280905 main]: tcid: 1
[15/11 17:16:18.280906 main]: done opening adapter 1 fe_sys 5 6 4 0
[15/11 17:16:18.280906 main]: Mutex init 0x206ff58
[15/11 17:16:18.280906 main]: trying to open [2] adapter 0 and frontend 2
[15/11 17:16:18.280906 CA1]: stackthread_func: start
[15/11 17:16:18.280906 main]: opened DVB adapter 2 fe:15 dvr:17
[15/11 17:16:18.280907 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:16:18.280907 main]: deleting pids on adapter 2, sid -1, pids=NULL
[15/11 17:16:18.280907 main]: Detected adapter 2 handle 15 DVB Card Name: STV0367 DVB-C DVB-T
[15/11 17:16:18.280907 main]: Detected delivery system for adapter 2: dvbc [1]
[15/11 17:16:18.280907 main]: Detected delivery system for adapter 2: dvbt [3]
[15/11 17:16:18.280907 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x2091320
[15/11 17:16:18.280907 main]: Mutex init 0x2091328
[15/11 17:16:18.280907 main]: sockets_add: handle 17 (type 5) returning socket index 11 [0.0.0.0:0] read: 0x407fc5
[15/11 17:16:18.280907 main]: set_socket_thread: thread 9d7fa700 for sockets 11
[15/11 17:16:18.280907 main]: No CA device detected on adapter 2
[15/11 17:16:18.280907 main]: done opening adapter 2 fe_sys 1 3 0 0
[15/11 17:16:18.280907 main]: Mutex init 0x2070bb8
[15/11 17:16:18.280907 AD2]: Starting select_and_execute on thread ID 9d7fa700, thread_name AD2
[15/11 17:16:18.280907 main]: trying to open [3] adapter 0 and frontend 3
[15/11 17:16:18.280908 main]: opened DVB adapter 3 fe:18 dvr:19
[15/11 17:16:18.280908 main]: Done setting DVR buffer to 5775360 bytes
[15/11 17:16:18.280908 main]: deleting pids on adapter 3, sid -1, pids=NULL
[15/11 17:16:18.280909 main]: Detected adapter 3 handle 18 DVB Card Name: STV0367 DVB-C DVB-T
[15/11 17:16:18.280909 main]: Detected delivery system for adapter 3: dvbc [1]
[15/11 17:16:18.280909 main]: Detected delivery system for adapter 3: dvbt [3]
[15/11 17:16:18.280909 main]: utils.c:1142 allocation_wrapper malloc allocated 3136 bytes at 0x20921c0
[15/11 17:16:18.280909 main]: Mutex init 0x20921c8
[15/11 17:16:18.280909 main]: sockets_add: handle 19 (type 5) returning socket index 12 [0.0.0.0:0] read: 0x407fc5
[15/11 17:16:18.280909 main]: set_socket_thread: thread 9cff9700 for sockets 12
[15/11 17:16:18.280909 main]: No CA device detected on adapter 3
[15/11 17:16:18.280909 main]: done opening adapter 3 fe_sys 1 3 0 0
[15/11 17:16:18.280909 main]: done init_hw 1
[15/11 17:16:18.280909 main]: get free adapter -1 - a[0] => e:1 m:-1 sid_cnt:0 f:0 pol=0
[15/11 17:16:18.280909 main]: Got adapter 0 on socket 6
[15/11 17:16:18.280909 main]: set adapter 0 for stream 0 m:0 s:1
[15/11 17:16:18.280909 main]: setting DVB parameters for adapter 0 - master_sid 0 sid 0 old f:0
[15/11 17:16:18.280909 main]: deleting pids on adapter 0, sid -1, pids=NULL
[15/11 17:16:18.280909 main]: copy_dvb_param start -> src=0, fe=0, freq=0, fec=9, sr=0, pol=0, ro=3, msys=0, mtype=0, plts=2, bw=8000000, inv=2, pids=NULL, apids=NULL, dpids=NULL x_pmt=NULL
[15/11 17:16:18.280909 main]: copy_dvb_parameters -> src=1, fe=0, freq=12070000, fec=9 sr=27500000, pol=2, ro=3, msys=5, mtype=0, plts=2, bw=8000000, inv=2, pids=0,97,511,32,512, apids=NULL, dpids=NULL x_pmt=NULL
[15/11 17:16:18.280909 main]: deleting pids on adapter 0, sid 0, pids=NULL
[15/11 17:16:18.280909 AD3]: Starting select_and_execute on thread ID 9cff9700, thread_name AD3
[15/11 17:16:18.280909 main]: adding pids to adapter 0, sid 0, pids=0,97,511,32,512
[15/11 17:16:18.280909 main]: Dumping pids table for adapter 0, pid errors 0
[15/11 17:16:18.280909 main]: pid 0, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:18.280909 main]: pid 97, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:18.280910 main]: pid 511, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:18.280910 main]: pid 32, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:18.280910 main]: pid 512, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:18.280910 main]: set_socket_thread: thread 9effd700 for sockets 7
[15/11 17:16:18.280994 CA1]: ca_session_callback: reason 6 slot_id 0 session_number 1 resource_id 0
[15/11 17:16:19.281084 main]: send_diseqc fd 10, pos = 0, pol = 1, hiband = 1, diseqc => e0 10 38 f3 00
[15/11 17:16:19.281219 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 10041
[15/11 17:16:19.281219 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 1 resource_id 10041
[15/11 17:16:19.281219 CA1]: CAM connecting
[15/11 17:16:19.281219 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 1 resource_id 10041
[15/11 17:16:19.281219 CA1]: CAM connected
[15/11 17:16:19.281253 main]: tuning to 12070000(1470000) pol: h (2) sr:27500000 fec:  delsys:dvbs mod:qpsk rolloff:  pilot: , ts clear=280910, ts pol=281084
[15/11 17:16:19.281253 main]: Dumping pids table for adapter 0, pid errors 0
[15/11 17:16:19.281253 main]: pid 0, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:19.281253 main]: pid 97, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:19.281253 main]: pid 511, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:19.281253 main]: pid 32, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:19.281253 main]: pid 512, fd 0, type 0 packets 0, d/c errs 0/0, flags 2, key 255, sids: 0 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:19.281253 main]: setting filter on PID 0 for fd 20
[15/11 17:16:19.281253 main]: setting filter on PID 97 for fd 21
[15/11 17:16:19.281253 main]: setting filter on PID 511 for fd 22
[15/11 17:16:19.281254 main]: setting filter on PID 32 for fd 23
[15/11 17:16:19.281254 main]: setting filter on PID 512 for fd 24
[15/11 17:16:19.281254 main]: reply -> 7 (192.168.178.140:57256) CL:0 [sock_id 6]:
RTSP/1.0 200 OK
Date: Sun, Nov 15 16:16:19 2015 GMT
Session: 1804289383
Cseq: 5
RTP-Info: url=rtsp://192.168.178.129/;seq=281254;rtptime=1447604179
Range: npt=0.000-
Server: minisatip/0.5.6

[15/11 17:16:19.281254 AD0]: no data sent for more than 1s sid: 0 for 192.168.178.140:56958
[15/11 17:16:19.281262 main]: read RTSP (from handle 7 sock_id 6, len: 0, sid 0):
OPTIONS rtsp://192.168.178.129/ RTSP/1.0
CSeq: 6
User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
Session: 1804289383

[15/11 17:16:19.281262 main]: reply -> 7 (192.168.178.140:57256) CL:0 [sock_id 6]:
RTSP/1.0 200 OK
Date: Sun, Nov 15 16:16:19 2015 GMT
Session: 1804289383
Cseq: 6
Public: OPTIONS, DESCRIBE, SETUP, PLAY, TEARDOWN
Server: minisatip/0.5.6

[15/11 17:16:19.281560 CA1]: 00:ca_rm_reply_callback
[15/11 17:16:19.281560 CA1]:   CAM provided resource id: 00010041
[15/11 17:16:19.281560 CA1]:   CAM provided resource id: 00020041
[15/11 17:16:19.281560 CA1]:   CAM provided resource id: 00030041
[15/11 17:16:19.281560 CA1]:   CAM provided resource id: 00240041
[15/11 17:16:19.281560 CA1]:   CAM provided resource id: 00400041
[15/11 17:16:20.282459 AD0]: no data sent for more than 1s sid: 0 for 192.168.178.140:56958
[15/11 17:16:20.282459 AD0]: get_signal_new returned: Signal (0): 0, SNR(0): 0, BER: 0, err 2
[15/11 17:16:20.282531 AD0]: get_signal took 72 ms for adapter 0 handle 10 (status: 31, ber: 0, strength:40631, snr: 47855, max_strength: 40631, max_snr: 47855 0)
[15/11 17:16:20.282566 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 20041
[15/11 17:16:20.282566 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 2 resource_id 20041
[15/11 17:16:20.282566 CA1]: CAM connecting
[15/11 17:16:20.282567 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 2 resource_id 20041
[15/11 17:16:20.282567 CA1]: CAM connected
[15/11 17:16:20.283023 CA1]: 00:ca_ai_callback
[15/11 17:16:20.283024 CA1]:   Application type: 01
[15/11 17:16:20.283024 CA1]:   Application manufacturer: 0001
[15/11 17:16:20.283024 CA1]:   Manufacturer code: 0001
[15/11 17:16:20.283024 CA1]:   Menu string: UNDERWORLD 2.30
[15/11 17:16:21.283291 AD0]: Start streaming for stream 0, len 1316 to handle 8 => 192.168.178.140:56958
[15/11 17:16:21.283910 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 30041
[15/11 17:16:21.283910 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 3 resource_id 30041
[15/11 17:16:21.283910 CA1]: CAM connecting
[15/11 17:16:21.283910 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 3 resource_id 30041
[15/11 17:16:21.283910 CA1]: CAM connected
[15/11 17:16:22.284278 CA1]: 00:ca_ca_info_callback
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0100
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0500
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0b00
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0604
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0606
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0661
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0662
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1702
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1722
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1762
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1800
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1801
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1833
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 09c4
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0d00
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0d01
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0d03
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0d22
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 0919
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1802
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 1803
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 183d
[15/11 17:16:22.284278 CA1]:   Supported CA ID: 2600
[15/11 17:16:22.284344 main]: BW 574KB/s, Total BW: 0 MB, ns/read 562, r: 24, tt: 13 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:22.284502 CA1]: ca_session_callback: reason 5 slot_id 0 session_number 3 resource_id 30041
[15/11 17:16:22.284839 CA1]: ca_lookup_callback: slot_id 0 requested_resource_id 30041
[15/11 17:16:22.284839 CA1]: ca_session_callback: reason 0 slot_id 0 session_number 3 resource_id 30041
[15/11 17:16:22.284839 CA1]: CAM connecting
[15/11 17:16:22.284839 CA1]: ca_session_callback: reason 1 slot_id 0 session_number 3 resource_id 30041
[15/11 17:16:22.284840 CA1]: CAM connected
[15/11 17:16:23.285188 CA1]: 00:ca_ca_info_callback
[15/11 17:16:23.285188 CA1]:   Supported CA ID: 0b00
[15/11 17:16:23.285188 CA1]:   Supported CA ID: 2600
[15/11 17:16:23.285188 CA1]:   Supported CA ID: 1837
[15/11 17:16:23.285188 CA1]:   Supported CA ID: 09c4
[15/11 17:16:23.285188 CA1]:   Supported CA ID: 09af
[15/11 17:16:23.285188 CA1]:   Supported CA ID: 098c
[15/11 17:16:23.285347 main]: BW 566KB/s, Total BW: 1 MB, ns/read 510, r: 23, tt: 11 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:24.286351 main]: BW 591KB/s, Total BW: 1 MB, ns/read 410, r: 24, tt: 9 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:25.287355 main]: BW 542KB/s, Total BW: 2 MB, ns/read 477, r: 22, tt: 10 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:26.288359 main]: BW 616KB/s, Total BW: 2 MB, ns/read 465, r: 25, tt: 11 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:27.289361 main]: BW 640KB/s, Total BW: 3 MB, ns/read 503, r: 26, tt: 13 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:28.290364 main]: BW 616KB/s, Total BW: 4 MB, ns/read 459, r: 25, tt: 11 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:29.291368 main]: BW 566KB/s, Total BW: 4 MB, ns/read 441, r: 23, tt: 10 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:30.292442 main]: BW 616KB/s, Total BW: 5 MB, ns/read 505, r: 25, tt: 12 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:31.293447 main]: BW 517KB/s, Total BW: 5 MB, ns/read 485, r: 21, tt: 10 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 17:16:31.293531 main]: read RTSP (from handle 7 sock_id 6, len: 0, sid 0):
TEARDOWN rtsp://192.168.178.129/ RTSP/1.0
CSeq: 7
User-Agent: LibVLC/3.0.0-git (LIVE555 Streaming Media v2015.06.24)
Session: 1804289383

[15/11 17:16:31.293531 main]: closing stream 0
[15/11 17:16:31.293531 main]: sockets_del: 8 -> handle 9, sid 0
[15/11 17:16:31.293531 main]: sockets_del: 8 Last open socket is at index 12 current_handle 9
[15/11 17:16:31.293531 main]: sockets_del: 7 -> handle -2, sid 0
[15/11 17:16:31.293531 main]: sockets_del: 7 Last open socket is at index 12 current_handle -2
[15/11 17:16:31.293531 main]: closed adapter 0 for stream 0 m:-1 s:0
[15/11 17:16:31.293531 main]: deleting pids on adapter 0, sid 0, pids=NULL
[15/11 17:16:31.293531 main]: Dumping pids table for adapter 0, pid errors 0
[15/11 17:16:31.293531 main]: pid 511, fd 22, type 0 packets 29265, d/c errs 0/2, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293531 main]: pid 512, fd 24, type 0 packets 1351, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293531 main]: pid 32, fd 23, type 0 packets 1024, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293531 main]: pid 0, fd 20, type 0 packets 102, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293531 main]: pid 97, fd 21, type 0 packets 92, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293531 main]: Dumping pids table for adapter 0, pid errors 0
[15/11 17:16:31.293531 main]: pid 511, fd 22, type 0 packets 29265, d/c errs 0/2, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293531 main]: pid 512, fd 24, type 0 packets 1351, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293532 main]: pid 32, fd 23, type 0 packets 1024, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293532 main]: pid 0, fd 20, type 0 packets 102, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293532 main]: pid 97, fd 21, type 0 packets 92, d/c errs 0/0, flags 3, key 255, sids: -1 -1 -1 -1 -1 -1 -1 -1
[15/11 17:16:31.293532 main]: clearing filter on PID 511 FD 22
[15/11 17:16:31.293532 main]: clearing filter on PID 512 FD 24
[15/11 17:16:31.293532 main]: clearing filter on PID 32 FD 23
[15/11 17:16:31.293532 main]: clearing filter on PID 0 FD 20
[15/11 17:16:31.293532 main]: clearing filter on PID 97 FD 21
[15/11 17:16:31.293532 main]: closed stream 0
[15/11 17:16:31.293532 main]: minisatip.c:1202 get_sid returns NULL for s_id = 0
[15/11 17:16:31.293532 main]: reply -> 7 (192.168.178.140:57256) CL:0 [sock_id 6]:
RTSP/1.0 200 OK
Date: Sun, Nov 15 16:16:31 2015 GMT
Cseq: 7
Session: 1804289383
Server: minisatip/0.5.6

[15/11 17:16:31.293532 main]: socketworks.c:384 Unlock disabled mutex 0x208e768
[15/11 17:16:31.293532 main]: sockets_unlock: Changing socket 6 lock 0x208e768 to NULL
[15/11 17:16:31.293532 main]: select_and_execute[6]: Close on socket 7 (sid:0) from 192.168.178.140:57256 - type rtsp errno 0
[15/11 17:16:31.293532 main]: sockets_del: 6 -> handle 7, sid 0
[15/11 17:16:31.293532 main]: minisatip.c:859 get_sid returns NULL for s_id = 0
[15/11 17:16:31.293532 main]: Requested stream close 0 timeout -1 type -1
[15/11 17:16:31.293532 main]: closing stream 0
[15/11 17:16:31.293532 main]: sockets_del: 6 Last open socket is at index 12 current_handle 7
[15/11 17:16:31.293532 main]: Delete socket 6 done: sid -1
[15/11 17:16:32.294536 main]: BW 49KB/s, Total BW: 5 MB, ns/read 613, r: 2, tt: 1 ms, n: 0 (s: 0 ms, s_cnt 0)
9000h commented 8 years ago

most of the time in 0.5 I get some error -2 (write to CA device) -3 (timeout)

[15/11 19:37:34.58214 CA0]: 00:ca_ca_info_callback
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 0b00
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 2600
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 0648
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 0650
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 0d95
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 0d98
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 09c4
[15/11 19:37:34.58214 CA0]:   Supported CA ID: 0500
[15/11 19:37:35.58802 main]: BW 1624KB/s, Total BW: 6 MB, ns/read 484, r: 66, tt: 31 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 19:37:36.59806 main]: BW 1500KB/s, Total BW: 7 MB, ns/read 390, r: 61, tt: 23 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 19:37:37.60809 main]: BW 1575KB/s, Total BW: 9 MB, ns/read 456, r: 64, tt: 29 ms, n: 0 (s: 0 ms, s_cnt 0)
[15/11 19:37:37.60934 CA0]: Error reported by stack slot:0 error:-2
9000h commented 8 years ago

0.5 sometimes detected as CA0 or CA1

first try

[16/11 10:25:18.024 AD0]: Starting select_and_execute on thread ID 8fe07700, thread_name AD0
[16/11 10:25:20.2531 main]: initializing CA, fd 9 type 2 flags 0x1
[16/11 10:25:20.2531 main]: CA module not present or not ready
[16/11 10:25:20.2531 main]: done opening adapter 0 fe_sys 5 6 4 0
---
[16/11 10:25:23.5057 CA1]: stackthread_func: start

second try

[16/11 10:29:12.028 AD0]: Starting select_and_execute on thread ID efa6c700, thread_name AD0
[16/11 10:29:14.2540 main]: initializing CA, fd 9 type 2 flags 0x3
[16/11 10:29:14.2540 main]: slotid: 0
[16/11 10:29:14.2541 main]: tcid: 1
[16/11 10:29:14.2541 main]: done opening adapter 0 fe_sys 5 6 4 0
----
[16/11 10:29:14.2541 CA0]: stackthread_func: start
catalinii commented 8 years ago

Hi,

CA0 means /dev/dvb/adapter0/ca0, CA1 means adapter1/ca0, which is curious why the CI attaches to different adapters evrrytime.

If you increase ADAPTER_TIMEOUT in adapter.h and the adapters are not closed adter start, does it cause issues?

9000h commented 8 years ago

atm I did test with the kernel redirect and there is virtual only one adapter with all frontends modprobe ddbridge adapter_alloc=3 an then the needed redirect "echo "00 02" > /sys/class/ddbridge/ddbridge0/redirect" so frontend0 got redirected to the ca0

Nov 15 01:48:04 satip kernel: [ 1703.988651] Digital Devices PCIE bridge driver 0.9.20, Copyright (C) 2010-15 Digital Devices GmbH
Nov 15 01:48:04 satip kernel: [ 1703.990083] DDBridge driver detected: Digital Devices Cine S2 V6.5 DVB adapter
Nov 15 01:48:04 satip kernel: [ 1703.990127] DDBridge: HW 0001000d REGMAP 00010004
Nov 15 01:48:04 satip kernel: [ 1703.990331] DDBridge: using 1 MSI interrupt(s)
Nov 15 01:48:04 satip kernel: [ 1703.999516] Port 0: Link 0, Link Port 0 (TAB 1): DUAL DVB-S2
Nov 15 01:48:04 satip kernel: [ 1704.001765] Port 1: Link 0, Link Port 1 (TAB 2): DUAL DVB-C/T
Nov 15 01:48:04 satip kernel: [ 1704.002830] Port 2: Link 0, Link Port 2 (TAB 3): CI
Nov 15 01:48:04 satip kernel: [ 1704.004847] Port 3: Link 0, Link Port 3 (TAB 4): NO MODULE

 ls -lR /dev/dvb/adapter?
/dev/dvb/adapter0:
total 0
crw-rw----+ 1 root video 212, 16 Nov 15 18:27 ca0
crw-rw----+ 1 root video 212, 17 Nov 15 18:27 ci0
crw-rw----+ 1 root video 212,  0 Nov 15 18:27 demux0
crw-rw----+ 1 root video 212,  4 Nov 15 18:27 demux1
crw-rw----+ 1 root video 212,  8 Nov 15 18:27 demux2
crw-rw----+ 1 root video 212, 12 Nov 15 18:27 demux3
crw-rw----+ 1 root video 212,  1 Nov 15 18:27 dvr0
crw-rw----+ 1 root video 212,  5 Nov 15 18:27 dvr1
crw-rw----+ 1 root video 212,  9 Nov 15 18:27 dvr2
crw-rw----+ 1 root video 212, 13 Nov 15 18:27 dvr3
crw-rw----+ 1 root video 212,  3 Nov 15 18:27 frontend0
crw-rw----+ 1 root video 212,  7 Nov 15 18:27 frontend1
crw-rw----+ 1 root video 212, 11 Nov 15 18:27 frontend2
crw-rw----+ 1 root video 212, 15 Nov 15 18:27 frontend3
crw-rw----+ 1 root video 212,  2 Nov 15 18:27 net0
crw-rw----+ 1 root video 212,  6 Nov 15 18:27 net1
crw-rw----+ 1 root video 212, 10 Nov 15 18:27 net2
crw-rw----+ 1 root video 212, 14 Nov 15 18:27 net3
9000h commented 8 years ago

the ca.c did only check for ca0 on the adapter but there can be more than one, in tables.c add_ca and del_ca it looks right.

also should MAX_CA_DEVICES be same as MAX_CA ??

ca.c:#define MAX_CA_DEVICES 8 ca.c:#define MAX_CA_DEVICE_RESOURCES 8 tables.c:SCA ca[MAX_CA]; tables.c: for (i = 0; i < MAX_CA; i++) tables.c: if (i == MAX_CA) tables.c: for (i = 0; i < MAX_CA; i++) tables.c: i = MAX_CA; root@satip:/usr/src/satip/minisatip-0.5-6# grep MAX_CA *.h tables.h:#define MAX_CA 4

9000h commented 8 years ago

if I I get a decrypted stream it has artefacts SD and HD

[16/11 20:26:32.104538 main]: BW 1421KB/s, Total BW: 76 MB, ns/read 397, r: 58, tt: 23 ms, n: 0 (s: 0 ms, s_cnt 0)
[16/11 20:26:33.105542 main]: BW 1446KB/s, Total BW: 77 MB, ns/read 391, r: 59, tt: 23 ms, n: 0 (s: 0 ms, s_cnt 0)
[16/11 20:26:33.105702 AD0]: WARNING: read on socket id 6, handle 8, took 298014248 ms
[16/11 20:26:33.105702 AD2]: Requested adapter 2 close due to timeout, result 0 max_rtime 105684
[16/11 20:26:34.106546 main]: BW 1436KB/s, Total BW: 79 MB, ns/read 465, r: 59, tt: 27 ms, n: 0 (s: 0 ms, s_cnt 0)
[16/11 20:26:35.107551 main]: BW 1468KB/s, Total BW: 80 MB, ns/read 389, r: 60, tt: 23 ms, n: 0 (s: 0 ms, s_cnt 0)
[16/11 20:26:36.108555 main]: BW 1444KB/s, Total BW: 82 MB, ns/read 426, r: 59, tt: 25 ms, n: 0 (s: 0 ms, s_cnt 0)
[16/11 20:26:37.109621 main]: BW 1495KB/s, Total BW: 83 MB, ns/read 461, r: 61, tt: 28 ms, n: 0 (s: 0 ms, s_cnt 0)
9000h commented 8 years ago

ok the artefacts with the last test where also shown on other applications like vdr, so I try another CI AlphaCrypt Light with a Viacess Subscription Card and the stream was clean.

3PO commented 8 years ago

atm I did test with the kernel redirect and there is virtual only one adapter with all frontends modprobe ddbridge adapter_alloc=3 an then the needed redirect "echo "00 02" > /sys/class/ddbridge/ddbridge0/redirect" so frontend0 got redirected to the ca0

Is there a possibility to redict to all frontends at the same time?

9000h commented 8 years ago

I do not think so.

3PO commented 8 years ago

It seems this is general Linux Problem. MTD works fine under Windows:

--> http://support.digital-devices.eu/knowledgebase.php?article=78

9000h commented 8 years ago

but that's not "redirect to all front-ends at the same time?" it's more to combine the filtered pids from different streams going as one to the same CI and then it split afterwards in the right direction and also respecting the MTD limit of the used CI.

3PO commented 8 years ago

Yes, you're right mate, this was a misunderstanding.

But the question is, if it's possible to make a CAM work with all Tuners of e.g. a DD Max S8?

catalinii commented 8 years ago

Hey guys sorry to hijack the discussion, but if you can offer a test system (remote access) I can try to work on the independent mode.

3PO commented 8 years ago

[...] if you can offer a test system (remote access) ...

No Problem, i can do this.

9000h commented 8 years ago

so in principal MTD should work with Linux if you stay on the same transponder/card.

MTD on multiple transponders/cards is working only on windows with DD drivers atm.

catalinii commented 8 years ago

Is my understanding correct that this happens only if you are attaching the CAM to a specific tuner ?

Also, if you set it in independent mode (then you get the /dev/dvb/adapterX/secY device ?) can you dump the TS into the sec device to get it decrypted by the CAM and no matter what tuner it comes from ?

Thanks

9000h commented 8 years ago

/dev/dvb/adapterX/secY was used in the early DD drivers an it' obsolete

https://github.com/DigitalDevices/dddvb/blob/781686c87d91aac02f7d4001ab9be9218e65ed98/docs/ci there are some simple test apps provided https://github.com/DigitalDevices/dddvb/tree/781686c87d91aac02f7d4001ab9be9218e65ed98/apps

catalinii commented 8 years ago

So you are saying that you can dump the TS data from multiple tuners into ci0 (in independent mode) or that's still not supported?

9000h commented 8 years ago

the Alphacrypt CI supports I believe up to 4 streams in MTD, the streams are not the full ts from a transponder or multiple transponders only the pids needed combined, the decrypted output from the CI has to be split afterwards.

here is a first userland implementation as plugin for VDR https://github.com/jasmin-j/vdr-plugin-ddci2/tree/devel_mtd

catalinii commented 8 years ago

I was afraid you are going to say that :)

I was thinking that looking thru the code that this might be the only way but at least is doable (as long as the pids from different transponders are different).

9000h commented 8 years ago

some additional info about MDT (MTD = Multi- Transponder-Decoding), most of them are from "real_schorsch at vdr-portal.de" who invents this method long time ago (2007-8) for the NetCeiver hardware http://www.baycom.de/hardware/netceiver http://www.baycom.de/download/netceiver/netceiver_white_paper.pdf

For real MTD it's a must that the CAM (like the AlphaCrypt CI) is able to decrypt more than one service. Normally the CAM did not know if the TS did come from one or more transponders. The reason is that the CI-Hardware needs to filter the TS, in our case the MTD part needs to be implemented in Linux user-space as there is no support in the drivers itself. The Hardware/software doing it has to multiplex and may also rewrite the PIDs and service numbers to a new virtual ts stream assigned to the responsible CI and diplex rewrite the ts output from the CI . That means the CI is getting a regular "virtual" TS stream. The MTD Hardware/software needs to filter as with more than one transponder the PIDs will may clash and on the other hand the bandwidth of an CI-Slot is limited to a max of 9MB/s.

CI Modules with MTD support (info it's bit old some cards mentioned are obsolete):

4 Tuner:

Mascom Alphacrypt (Light) (App 3.16/3.20) with Sky S02 and SRG
Mascom Easy TV (3.20) with Sky S02 and ORF
Mascom Alphacrypt Classic (App 3.16/3.20)
MasCom Cryptoworks with ORF
MaxCam+ 
Deltacrypt CI

2 Tuner:

SMIT Irdeto ICE Crypt Blue with ORF Ice Card 
SMIT Irdeto/Cryptoworks with ORF
SMIT Viaccess with SRG
Technicrypt CW (26.0.5.0.31) with ORF (probably with limitations)
SMIT Conax
Unicam  
Maxcam Twin 2x 2  
kaffeekanne commented 8 years ago

Could this approach also be suitable for dvb devices with CI connected directly to or mounted on the PCB or only for DD devices with "multipurpose" CI? There are still some older PCI devices with working kernel drivers for CI like the TT S2-3200 and newer USB-Boxes featuring CI.

catalinii commented 8 years ago

Hi,

This discussion is about DD CI. The normal CI should work already.

Thanks

wulf21 commented 8 years ago

Hi, I just wanted to say that I would be very interested in this feature. I have a VU+ SOLO SE where the CI slot is not attached to the tuner.

Through trial and error I found that the device is dev/ci0. I printed part of the file contents in ssh console with awk and only this one has shown a reaction after inserting the ci module, all the devices found under dev/dvb/adapter0/ca0-ca4 have shown no reaction.

With started enigma2 and playback of an encrypted channel the command lsof showed, that neither of them have been opened by the process, only dev/ci0 and dev/nexus_dvb_ci were in use.

What I tested was simply replacing the device path in ci.c, however this didn't work.

catalinii commented 8 years ago

Hi

The purpose of ci0 in vu+ ( i have a gigablue quad plus) is different than the DD CI. I also tried to force to use the CI0 but in the end seems dvben50221 cannot use the CAM so not much to there.

However the code seems simillar with dvben50221 but to make it work I would be needed to add code similar to enigma's dvb_ci library which is too big of a hassle.

I might be looking into different ways of resolving that issue (at some point).

Thanks

sundalon commented 7 years ago

Hi there, just being curious: is there any work being spent on this feature?

catalinii commented 7 years ago

Hi,

Yes it is on my to do for 0.7.

Thanks

emilsvennesson commented 7 years ago

@catalinii If you need a remote system to work on this, then please don't hesitate to tell me. I'd /love/ to see this working! :-)

c-o-m-m-a-n-d-e-r commented 7 years ago

Please implement the DDCI2 Plugin technic. i can support with HW (DD Max S8) if needed

tunip commented 7 years ago

There are a few people with recent DD CI hardware (me too). As I understand it right, catalinii is working on the implementation right now.

c-o-m-m-a-n-d-e-r commented 7 years ago

glad to hear that! i also have an AlphaCrypt Modul with MTD ... ready for testing ;-)

9000h commented 7 years ago

btw there are also some USB CI Devices in the wild like the WinTV CI (Terratec CI and Mascom CI Programmer), a working driver is now available here: https://www.vdr-portal.de/forum/index.php?thread/130720-wintv-ci-cinergy-usb-ci-und-ddci2/&postID=1292422#post1292422

9000h commented 6 years ago

support is in now

9000h commented 5 years ago

just for reference, HelmutB fom vdr portal did identify a issue with the mapping of the emm pids, if the ci modul checks the crc and it's not corrected the emm update of the card will fail. https://www.vdr-portal.de/forum/index.php?thread/132680-patch-mtd-update-der-crc-32-pr%C3%BCfsumme-in-der-ca-table-nach-dem-mappen-der-emmpid/&postID=1314649#post1314649

catalinii commented 5 years ago

Ddci.c does not re-map the emm pids of pid 1. As a result of that the emms crc should be the same. Can u test if the emms are working with minisatip?

9000h commented 5 years ago

I need to prepare my setup for the test, it needs some time.