Bug 364401 - module "Digital TV" not working for DVB-S/S2
Summary: module "Digital TV" not working for DVB-S/S2
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Chakra Linux
: NOR major
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
: 364739 366302 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-06-16 21:28 UTC by gonzo_mg
Modified: 2016-09-15 09:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gonzo_mg 2016-06-16 21:28:16 UTC
after updating kaffeine to version 2.0.3 the existing channels don't work anymore. even the channel scan on "Astra-19.2E" or other satellites is not working anymore.

Reproducible: Always

Steps to Reproduce:
1. start kaffeine
2. select module 5 "Digital TV"
3. initially / after selectign a channel

Actual Results:  
for (german) HD programs the channel information / osd information shows up correctly but no audio/video is playing. For the SD channels nothing works.

Expected Results:  
i should be able to watch tv ;-)

--- watching tv with vlc still works (even new channellist created with w_scan)

--- starting kaffeine from terminal produces following output:
16-06-16 23:09:05.645 [System  ] "Using libVLC with  --no-video-title-show"
16-06-16 23:09:05.770 [System  ] DvbManager::loadDeviceManager: using built-in dvb device manager
16-06-16 23:09:06.472 [System  ] DvbLinuxDevice::startDevice: unsupported transmission type:  4
16-06-16 23:09:06.472 [System  ] DvbLinuxDevice::startDevice: found dvb device "P18224e35153b1179" / "STB0899 Multistandard"

--- selecting module 5 "Digital TV" produces following output (an HD-channel was preselected):
16-06-16 23:09:54.310 [System  ] tune to: "S2 1743750 H 22000000 2/3 35 8PSK"
16-06-16 23:09:54.310 [System  ] DvbLinuxDevice::libdvbv5 ERROR Need a LNBf to work
16-06-16 23:09:58.654 [System  ] DvbDevice::frontendEvent: tuning failed for freq= 1743.75 MHz
16-06-16 23:10:15.132 [System  ] DvbSectionFilterInternal::processData: no payload

--- selecting another channel produces following output:
[00007f8768016428] core stream error: cannot pre fill buffer
16-06-16 23:11:08.526 [System  ] DvbSectionFilterInternal::processData: no payload

--- notion/suspicion: a missing argument while calling dvbv5
https://www.linuxtv.org/docs/libdvbv5/dvbv5-zap_8c-example.html

wasn't able to test "dvbv5-scan -l UNIVERSAL <initial file>" because of missing <initial file>
Comment 1 Mauro Carvalho Chehab 2016-06-18 10:27:49 UTC
Indeed, Kaffeine was trying to setup the LNBf itself, instead of relying at the library. I reworked at the code. It should now be able to use any of the LNBf types supported by the library.

I can't test it here, though, as I don't have any Satellite dish ATM. Could you please test the patch?
Comment 2 Mauro Carvalho Chehab 2016-06-18 13:10:39 UTC
Git commit 4abcda4497ac38e393e7b3e0c04b846349dcfdba by Mauro Carvalho Chehab.
Committed on 18/06/2016 at 10:25.
Pushed by mauroc into branch 'master'.

Fix DVB-S/S2 support

The LNBf settings were not being passed to libdvbv5, causing tune
to fail. Rework the code to use the LNBf types supported by the
library, and to set it accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

M  +18   -0    src/dvb/dvbbackenddevice.h
M  +1    -0    src/dvb/dvbchanneldialog.cpp
M  +6    -4    src/dvb/dvbconfig.h
M  +96   -143  src/dvb/dvbconfigdialog.cpp
M  +9    -2    src/dvb/dvbconfigdialog.h
M  +15   -52   src/dvb/dvbdevice.cpp
M  +5    -0    src/dvb/dvbdevice.h
M  +67   -0    src/dvb/dvbdevice_linux.cpp
M  +1    -0    src/dvb/dvbdevice_linux.h
M  +2    -6    src/dvb/dvbmanager.cpp
M  +1    -0    src/dvb/dvbtransponder.cpp
M  +2    -1    src/dvb/dvbtransponder.h

http://commits.kde.org/kaffeine/4abcda4497ac38e393e7b3e0c04b846349dcfdba
Comment 3 m.felix 2016-06-19 08:34:41 UTC
Hi, I recompiled kaffeine and can confirm, that the LNBf message is gone - great. 
But my dvb device now doesn't work by another problem:

-- The console output on startup looks well:
19-06-16 10:24:18.952 [Info    ] Using built-in dvb device manager
19-06-16 10:24:19.016 [Info    ] Found dvb device P13d0210313d02103: Conexant CX24120/CX24118

--- When I try to search for channels on Hotbird-13.0E, this message scroll on console:
19-06-16 10:26:37.175 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
19-06-16 10:26:37.175 [Warning ] ioctl FE_SET_PROPERTY failed for frontend /dev/dvb/adapter0/frontend0
19-06-16 10:26:37.842 [Critical] FE_DISEQC_SEND_MASTER_CMD: Die Wartezeit für die Verbindung ist abgelaufen
19-06-16 10:26:37.842 [Critical] sending diseq failed
19-06-16 10:26:37.842 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
19-06-16 10:26:37.842 [Warning ] ioctl FE_SET_PROPERTY failed for frontend /dev/dvb/adapter0/frontend0
19-06-16 10:26:37.958 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
19-06-16 10:26:37.959 [Warning ] ioctl FE_SET_PROPERTY failed for frontend /dev/dvb/adapter0/frontend0
19-06-16 10:26:38.625 [Critical] FE_DISEQC_SEND_MASTER_CMD: Die Wartezeit für die Verbindung ist abgelaufen
19-06-16 10:26:38.625 [Critical] sending diseq failed

-- When I try to search for channnels for Astra-19.2E, the message is the same, but it doesn't scroll on console
19-06-16 10:31:10.551 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
19-06-16 10:31:10.551 [Warning ] ioctl FE_SET_PROPERTY failed for frontend /dev/dvb/adapter0/frontend0

Sorry, that the messages are in german.
Comment 4 Mauro Carvalho Chehab 2016-06-19 13:58:07 UTC
(In reply to m.felix from comment #3)
> Hi, I recompiled kaffeine and can confirm, that the LNBf message is gone -
> great. 

Good! One less issue.

> But my dvb device now doesn't work by another problem:
> 
> -- The console output on startup looks well:
> 19-06-16 10:24:18.952 [Info    ] Using built-in dvb device manager
> 19-06-16 10:24:19.016 [Info    ] Found dvb device P13d0210313d02103:
> Conexant CX24120/CX24118
> 
> --- When I try to search for channels on Hotbird-13.0E, this message scroll
> on console:
> 19-06-16 10:26:37.175 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
> 19-06-16 10:26:37.175 [Warning ] ioctl FE_SET_PROPERTY failed for frontend
> /dev/dvb/adapter0/frontend0
> 19-06-16 10:26:37.842 [Critical] FE_DISEQC_SEND_MASTER_CMD: Die Wartezeit
> für die Verbindung ist abgelaufen
> 19-06-16 10:26:37.842 [Critical] sending diseq failed
> 19-06-16 10:26:37.842 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
> 19-06-16 10:26:37.842 [Warning ] ioctl FE_SET_PROPERTY failed for frontend
> /dev/dvb/adapter0/frontend0
> 19-06-16 10:26:37.958 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
> 19-06-16 10:26:37.959 [Warning ] ioctl FE_SET_PROPERTY failed for frontend
> /dev/dvb/adapter0/frontend0
> 19-06-16 10:26:38.625 [Critical] FE_DISEQC_SEND_MASTER_CMD: Die Wartezeit
> für die Verbindung ist abgelaufen
> 19-06-16 10:26:38.625 [Critical] sending diseq failed
> 
> -- When I try to search for channnels for Astra-19.2E, the message is the
> same, but it doesn't scroll on console

As I said, unfortunately, I don't have any Satellite dish anymore, but I have a DVB-S generator. Unfortunately, it won't simulate the LNBf, but, as this problem seems to be solved, maybe I can 
simulate tuning into a DVB-S channel, if you could provide me something like 30 seconds of a mpeg-TS record with all PIDs (never actually tried generating a DVB-S on it).

So, could you please record 30 seconds with dvbv5-zap? The syntax to record it is:

dvbv5-zap -r -P -t 30 --lnbf=universal -c ~/dtv-scan-tables/dvb-s/Astra-19.2E 12551500

The above assumes that you're using an universal LNBf. It also assumes that you have a copy of the dtv-scan-tables stored on your home directory, and you're using the Astra-19.2E file. You can download the more updated scantable from: https://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-LATEST.tar.bz2, or use the one provided with your distribution, if it is already using DVBv5 format.

PS.: as the file will be big, you'll likely need to put it in a Google Drive/Dropbox.

> 19-06-16 10:31:10.551 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
> 19-06-16 10:31:10.551 [Warning ] ioctl FE_SET_PROPERTY failed for frontend
> /dev/dvb/adapter0/frontend0
> 
> Sorry, that the messages are in german.

I did some updates at Kaffeine, and the messages should now be all in English. Should help with future bug reports. In this specific case, it is clear for me where it is failing. So, no need to re-run with the new version.
Comment 5 Mauro Carvalho Chehab 2016-06-19 16:20:37 UTC
(In reply to Mauro Carvalho Chehab from comment #4)
> (In reply to m.felix from comment #3)

> > 19-06-16 10:26:37.175 [Critical] FE_SET_PROPERTY: Das Argument ist ungültig
> > 19-06-16 10:26:37.175 [Warning ] ioctl FE_SET_PROPERTY failed for frontend
> > /dev/dvb/adapter0/frontend0

I guess I found the culprit for this issue. Basically, libdvbv5 supports an special antenna arrangement for SCR/Unicable. I didn't add the needed bits to Kaffeine yet, but it was already passing an extra parameter to the library. It happens that such parameter were not initialized properly, causing the library to try to tune into an out of range frequency:

19-06-16 13:04:26.812 [Debug   ] src/dvb/dvbdevice_linux.cpp#84: void dvbv5_log(int, const char*, ...): BPF: 101 KHz
19-06-16 13:04:26.951 [Debug   ] src/dvb/dvbdevice_linux.cpp#84: void dvbv5_log(int, const char*, ...): L-Band frequency: 10700,50 MHz (offset = 23252,00 MHz)

(those logs are with a newer libdvbv5 patch I merged today)

Anyway, I was able to produce a Kaffeine fix, and to test it with a DVB-S board and my RF generator, using a setup that would be the one with an universal LNBf. As I said, I can't simulate the LNBf here, so I'd appreciate if you could test. Also, I ended by using a DVB-C  MPEG-TS, as I'm currently lacking a DVB-S (and DVB-S2) mpeg TS samples.

The patch is at:
    http://commits.kde.org/kaffeine/4e857581ad963117fe8e55f1f6426f6f7fd31a3d

Please test and provide feedback. Thanks!
Comment 6 m.felix 2016-06-19 17:15:23 UTC
It works!
I recompiled kaffeine again, with your latest patch. The error message is gone.
And after I exchanded the LNB satelites and restored my old channel list (sqlite.db), it works again.
Zapping the channels works well.

Thanks for the quick fix.

P.S. To record something with dvbv5-zap, I have to add the output and satelite number.
dvbv5-zap -r -P -t 30 --lnbf=universal -c /tmp/dvb-s/Astra-19.2E 12551500 -S 1 -v -o dvbs_record.ts
Comment 7 Mauro Carvalho Chehab 2016-06-19 18:44:38 UTC
(In reply to m.felix from comment #6)
> It works!

Great!

> Thanks for the quick fix.

Anytime.

> P.S. To record something with dvbv5-zap, I have to add the output and satelite number.
> dvbv5-zap -r -P -t 30 --lnbf=universal -c /tmp/dvb-s/Astra-19.2E 12551500 -S 1 -v -o dvbs_record.ts

Ah, yeah, that's needed in order to setup the DiSEqC switch.

As the bug is fixed, I'm closing it. If you notice some other problem, please open a new bug.

Fixed on:   http://commits.kde.org/kaffeine/4e857581ad963117fe8e55f1f6426f6f7fd31a3d
Comment 8 gonzo_mg 2016-06-19 20:23:51 UTC
I can reconfirm that after compiling the latest git-version everything is working well again.

Thanks for the fast response!
Comment 9 Mauro Carvalho Chehab 2016-06-27 21:51:16 UTC
*** Bug 364739 has been marked as a duplicate of this bug. ***
Comment 10 Mauro Carvalho Chehab 2016-09-15 09:38:32 UTC
*** Bug 366302 has been marked as a duplicate of this bug. ***