manio / vdr-plugin-dvbapi

VDR dvbapi plugin for use with OSCam
http://www.streamboard.tv/wbb2/thread.php?threadid=40060
GNU General Public License v2.0
58 stars 25 forks source link

Oscam connection issue #116

Closed piotrekcrash closed 7 years ago

piotrekcrash commented 7 years ago

Hi,

I'm using KII Pro with: LibreELEC release: S905.arm-8.0.0c-I VDR 2.2.0 / vdr-plugin-dvbapi 2.2.3 OSCam v1.20-unstable_svn, build r11350

I have problem with connection between VDR and OSCam over dvbapi. It's possible to connect both only if directly after System boot I'm changing fast encrypted channels one by one, then dvbapi Client apper in Oscam Clients section and everything works correct to next system boot. But If I'm not make this process on beginning then dvbapi never connect to OSCam.

When dvbapi is not connected to OSCam in logs apper something like this:

Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: 0.0 CA_PMT decoding len=15 lm=4 prg=7357 len=0 Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: pid=2,01fb len=0 (0x0) Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: pid=4,025f len=0 (0x0) Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: pid=4,02c3 len=0 (0x0) Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: 0.0 got CA pmt ciCmd=-1 caLm=4 Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: 0.0 answer to query suppressed Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: 0.0 set CAM decrypt (SID 7357 (0x1CBD), caLm 4, HasCaDescriptors 0) Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: CA_PMT doesn't contain CA descriptors

but when after few channel changes this will connect it look like this:

Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: 0.0 CA_PMT decoding len=61 lm=4 prg=15708 len=4c Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: ci_cmd(G)=01 Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: pid=2,00a7 len=0 (0x0) Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: pid=4,006c len=0 (0x0) Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: pid=4,006d len=0 (0x0) Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: 0.0 got CA pmt ciCmd=1 caLm=4 Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: 0.0 answer to query suppressed Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: 0.0 set CAM decrypt (SID 15708 (0x3D5C), caLm 4, HasCaDescriptors 1) Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: send: channelSid=0x3d5c (15708) Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2994] DVBAPI: Write, sock=0 Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: OSCam not connected, (re)connecting... Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: created socket with socket_fd=38 Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: Successfully (re)connected to OSCam Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: Write, sock=38 Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: socket_fd=38 len=42 wrote=42 Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: send: channelSid=0x3d5c (15708) Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: Write, sock=38 Feb 28 16:55:16 LibreELEC00 vdr[2715]: [2787] DVBAPI: socket_fd=38 len=107 wrote=107

and then in OSCam log i can see:

2017/02/28 16:55:16 265ED022 c (dvbapi) Client connected: 'vdr-plugin-dvbapi 2.2.3 / VDR 2.2.0' (protocol version = 2)

My conf:

[dvbapi] enabled = 1 au = 1 pmt_mode = 4 listen_port = 2000 user = vdr boxtype = pc

VDR:

dvbapi.LogLevel = 3 dvbapi.OSCamHost = localhost dvbapi.OSCamPort = 2000

All system logs I uploaded here;

VDR_dvbapi_OSCam_logs.zip

In file 09_Journal-cur.log there's a lot of entries from dvbapi

Is there any solution for this problem? Thanks

manio commented 7 years ago

The main problem is here: Feb 28 16:55:03 LibreELEC00 vdr[2715]: [2940] DVBAPI: CA_PMT doesn't contain CA descriptors

This is known VDR disease. It just doesn't collect CAPMT information at all in own channels.conf file (in contrast to tvheadend, wchich I am currently using btw). The other related problem is that VDR is doing retune after CAPMT description has changed. So it is stopping streaming and restarting it (tvh is also handling such situations in the better way IMHO, so the channel is still playing). So after your fresh VDR start you have to switch to a channel at least once (to VDR collect this information), or wait for the idle epg-scan for do this for you. In other words - more time VDR is running, more fast channels are zapping :) VDR was probably designed to be runned 24h a day - so in this configuration there would be probably not such problems, because the epg scan thread is constantly scanning transponders. If you are re-starting VDR often, than it indeed could be a problem - as you are confirming with this issue. Anyway - it is not a dvbapi plugin issue - so I am closing this one.

If you wish - you have to raise this problem on the VDR side, but be prepared that my time which I am now spending on the dvbapi plugin is very limited.

piotrekcrash commented 7 years ago

Many thanks for You answer. I also considered to run my KII Pro as Server (24h) and some other TV Box with LE as Clients to VDR Server. Strange thing is in older LibreELEC 7.0 with:

VDR version 2.2.0 dvbapi PKG_VERSION="c76c24e" It works perfect, directly after system boot all works without any problem. But there was used older protocol of OSCam with "camd.socket". Is there still possible to use it like older one or now only TCP mode is available? If "camd.socket" still available I'll test if this works correct on current LE version.

BTW great work with this plugin. Thanks

manio commented 7 years ago

Newer plugin version only use network mode (camd.socket was deprecated since some version).

piotrekcrash commented 7 years ago

Thanks.