Bug 376556 - kaffeine does not find DVB-T2 channels
Summary: kaffeine does not find DVB-T2 channels
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-16 17:51 UTC by yulinux
Modified: 2017-02-22 17:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
additional information like screenshots, lsusb, dmesg, uname, kaffeine --debug and dvb-fe-tool outputs (121.78 KB, application/zip)
2017-02-16 17:51 UTC, yulinux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yulinux 2017-02-16 17:51:16 UTC
Created attachment 104060 [details]
additional information like screenshots, lsusb, dmesg, uname, kaffeine --debug and dvb-fe-tool outputs

Hallo, 
I have brought a cheap Chinese DVB-T2 device (casing of [1], but has a Panasonic MN88473 inside like [2]). Anyway, after copying the firmware into the right folder, the device seems to work, see dmesg.
The device has two frontends, as shown in the pictures attached. And I use kaffeine from git and linux kernel 4.10RC8.

When I do a scan in kaffeine for DVB-T2 channels, only DVB-T channels are found, see attached file. I does not matter which setting I try, when supervising the frontend with dvb-fe-tool -a0 -f1 --get, it never gets DELIVERY_SYSTEM = DVBT2.

When using w_scan it gets DELIVERY_SYSTEM = DVBT2, but does not find any DVB-T2 channels. If patching w_scan according to [3] (unfortunately a German site), it finds the DVB-T2 channels. The DVB-T2 channels do not work though in VLC. Only the DVB-T ones work in VLC.

When using tvheadend, it finds all DVB-T and DVB-T2 channels and all can be watched. So the kernel driver and the hardware should be fine.

Any idea what could be the problem? What could I test in order to debug the issue?

Thanks in advance.



[1] http://blog.palosaari.fi/2013/10/naked-hardware-14-dvb-t2-usb-tv-stick.html
[2] http://blog.palosaari.fi/2014/09/naked-hardware-18-astrometa-amdvb-t2-v2.html
[3] http://www.vdr-portal.de/board16-video-disk-recorder/board5-vdr-konfiguration/129128-w-scan-findet-dvb-t2-sender-nicht/
Comment 1 yulinux 2017-02-17 21:32:48 UTC
Just to clarify: It probably *is* the newer version of the device, but just in another case. The case is actually a bit different compared to the older one, it is labelled differently [1], which I missed.
But this is probably not relevant to this bug report.

[1] http://www.ixbt.com/monitor/images/astrometa-digital-tv-dongle/astrometa-digital-tv-dongle-1.jpg
Comment 2 Mauro Carvalho Chehab 2017-02-17 22:22:40 UTC
Next time, please don't attach a zip file (or tarball). Instead, put
each file inside it as a different attachment.

(In reply to yulinux from comment #0)
> Created attachment 104060 [details]
> additional information like screenshots, lsusb, dmesg, uname, kaffeine
> --debug and dvb-fe-tool outputs
> 
> Hallo, 
> I have brought a cheap Chinese DVB-T2 device (casing of [1], but has a
> Panasonic MN88473 inside like [2]). Anyway, after copying the firmware into
> the right folder, the device seems to work, see dmesg.
> The device has two frontends, as shown in the pictures attached. And I use
> kaffeine from git and linux kernel 4.10RC8.

> When using tvheadend, it finds all DVB-T and DVB-T2 channels and all can be
> watched. So the kernel driver and the hardware should be fine.
> 
> Any idea what could be the problem? What could I test in order to debug the
> issue?

Ok, let's go by parts. The Realtek rtl2832 is a chip that always come with DVB-T internally, and supports only pure DVB-T. No DVB-T2 support. As the frontend is integrated with the demux on those devices, the Kernel
recognizes it as frontend0.

Devices based on such chipset that supports other standards come with an extra chip for the frontend. In this case, Panasonic MN88473, with can do both DVB-T and DVB-T2.

As you're adding the same frequency table for both DVB-T and DVB-T2, I suspect that Kaffeine is using the first adapter (with supports only DVB-T) when seeking for channels. As far as I remember, I didn't add
any special logic there that would make it so select the better adapter when scanning the file. So, it should just get the first available one.

You can easily test it by changing the adapter two for "no source" (or something different than "Automatischer Suchlauf").

With such change, when you ask to scan "Automatischer Suchlauf", it should use the second frontend (the Panasonic one).

If this works, I'll take a look at the code and seek for a solution to do it automatically, but you'll likely need to test such patch, as I guess I don't have any RTL-based device with an extra DVB-T2 frontend.
Comment 3 yulinux 2017-02-18 00:41:47 UTC
(In reply to Mauro Carvalho Chehab from comment #2)
> Next time, please don't attach a zip file (or tarball). Instead, put
> each file inside it as a different attachment.
Ok.

> Ok, let's go by parts. The Realtek rtl2832 is a chip that always come with
> DVB-T internally, and supports only pure DVB-T. No DVB-T2 support. As the
> frontend is integrated with the demux on those devices, the Kernel
> recognizes it as frontend0.
> 
> Devices based on such chipset that supports other standards come with an
> extra chip for the frontend. In this case, Panasonic MN88473, with can do
> both DVB-T and DVB-T2.
> 
> As you're adding the same frequency table for both DVB-T and DVB-T2, I
> suspect that Kaffeine is using the first adapter (with supports only DVB-T)
> when seeking for channels. As far as I remember, I didn't add
> any special logic there that would make it so select the better adapter when
> scanning the file. So, it should just get the first available one.
> 
> You can easily test it by changing the adapter two for "no source" (or
> something different than "Automatischer Suchlauf").
> 
> With such change, when you ask to scan "Automatischer Suchlauf", it should
> use the second frontend (the Panasonic one).


When I set adapter 2 (RTL2832) DVB-T: No source
and adapter 1 (Panasonic MN88473) DVB-C: No source and DVB-T2: Automatischer Suchlauf, then only DVB-T channels are found. Therewhile I can use 
$ dvb-fe-tool -a0 -f1 --get
and I see that the frequency changes and that it is always in DELIVERY_SYSTEM = DVBT. But it uses the correct frontend (Panasonic MN88473) as far as I can see.

When I set adapter 2 (RTL2832) DVB-T: Automatischer Suchlauf
and adapter 1 (Panasonic MN88473) DVB-C: No source and DVB-T2: No source,  then again only DVB-T channels are found. Therewhile I can use 
$ dvb-fe-tool -a0 -f0 --get
and I see that the frequency changes and that it is always in DELIVERY_SYSTEM = DVBT. But this one of course can only do DVB-T only, as it is the wrong frontend (RTL2832).

So I think that kaffeine uses the correctly the Panasonic MN88473, but fails to search for DVB-T2 channels. 

May there be some information missing in the frequency table for scanning? Is the frequency table used actually, if I say "Automatischer Suchlauf"?

 
> If this works, I'll take a look at the code and seek for a solution to do it
> automatically, but you'll likely need to test such patch, as I guess I don't
> have any RTL-based device with an extra DVB-T2 frontend.
I'd like to test patches.
Comment 4 Mauro Carvalho Chehab 2017-02-21 14:21:56 UTC
As the problem doesn't seem to be related with the DVB-T adapter 0, I'm doing some tests here with another device that supports DVB-T/T2/C on the same frontend.

With this device, I was able to reproduce the issue ;)

The problem is actually unrelated to DVB-T2 tuning, but, instead, with the automatic scan.

Here, I set Kaffeine to use the "co-All" frequencies:

[dvb-t/co-All]
T2 473000000 6MHz AUTO AUTO AUTO AUTO AUTO AUTO 0
...

and I set my RF generator to modulate at 473 MHz with 6MHz bandwidth, in order to match the first channel there. With such settings, Kaffeine worked fine.

However, the automatic scan logic is setting the device to DVB-T, instead of DVB-T2, with causes the frontend to not tune.

I'll work on a patch fixing the automatic scan logic for DVB-T2. In the mean time, if you set the adapter to use an existing entry that matches your city frequencies, you should be able to make it work.
Comment 5 Mauro Carvalho Chehab 2017-02-21 16:03:37 UTC
Support for scanning DVB-T2 added. Please notice that it will scan first for DVB-T channels. After that, it will scan for DVB-T2.
Comment 6 yulinux 2017-02-22 14:14:05 UTC
Thank you, it works! The new channels are found. Unfortunately there is no picture now in the new DVB-T2 HD channels, only sound is there. Those I try are not encrypted and the necessary codecs are installed. If you record those, there is no video inside the file, too. Will open a separate bug report for this one.


As there are obviously missing entries in the scanfile.dvb, should I write down, what is missing?

Following, the DVB-T2 frequencies in MHz for de-Nordrhein-Westfalen according to [1]. This list includes also some frequencies that will start next month here. The bandwidth for 650 Mhz is 8 MHz, but this is not written in the document. For DVB-T1 is was everywhere 8 MHz, but I don't know if this is also the case for this future other DVB-T2 channels.

506
514
538
586
594
626
650
674
690


And according to [2] also for DVB-T1 some frequencies are missing (marked with an asterisk ). The other parameters are also written in that file. This is the list in total:

474*
482*
506
514
522
538
546
554
570
586
594
602
666*
674
690
698
706
722
730
746
762
778*
786

Maybe/probably the other states in Germany also have some data missing.

But with the automatically search function now working, this is not very important any more. Or is it?

Thanks again.


[1] http://www.dvbt2hd.de/files/Senderstandorte_und_Kanaele_(Regelbetrieb_ab_29._Maerz_2017).pdf

[2] http://www.ueberallfernsehen.de/dvbtdownloads127.pdf
Comment 7 Mauro Carvalho Chehab 2017-02-22 16:46:20 UTC
(In reply to yulinux from comment #6)
> Thank you, it works! The new channels are found. 

Good! I'll close this bug then.

> Unfortunately there is no picture now in the new DVB-T2 HD channels

Will answer about that on BZ #376805.

> As there are obviously missing entries in the scanfile.dvb, should I write
> down, what is missing?

The scanfile.dvb is auto-generated from dtv-scan-tables:
   https://git.linuxtv.org/dtv-scan-tables.git/

You should send a patch to it with the frequencies/standards for your city. 
A new scanfile.dvb is generated every week when changes are made upstream, and can be updated on Kaffeine via its GUI.

> Maybe/probably the other states in Germany also have some data missing.
> 
> But with the automatically search function now working, this is not very
> important any more. Or is it?

No, but it is nice to have the frequency files, as it allows a faster scan.

Regards,
Mauro
Comment 8 Mauro Carvalho Chehab 2017-02-22 17:06:37 UTC
(In reply to Mauro Carvalho Chehab from comment #7)
> (In reply to yulinux from comment #6)

> The scanfile.dvb is auto-generated from dtv-scan-tables:
>    https://git.linuxtv.org/dtv-scan-tables.git/
> 
> You should send a patch to it with the frequencies/standards for your city. 
> A new scanfile.dvb is generated every week when changes are made upstream,
> and can be updated on Kaffeine via its GUI.

Forgot to mention. Please read:

    https://www.linuxtv.org/wiki/index.php/Dtv-scan-tables

For more details about it and how to submit new entries.