wirbel-at-vdr-portal / w_scan_cpp

w_scan_cpp - test repo. No issues/pull requests here, for latest Version, see it's Homepage, https://www.gen2vdr.de/wirbel/w_scan_cpp/index2.html.
https://www.gen2vdr.de/wirbel/w_scan_cpp/index2.html
GNU General Public License v2.0
12 stars 1 forks source link

Troubles scanning DVB-T only networks with SAT>IP tuners #17

Open lars18th opened 7 months ago

lars18th commented 7 months ago

Hi @wirbel-at-vdr-portal ,

I'm using different SAT>IP DVB-T/T2 tuners in different countries. When the signal is DVB-T2 the tool works as expected. However, when scanning DVB-T only networks the program fails because it wants to tune DVB-T2 only. Any option to enforce using DVB-T only?

Note: The problem is that it first scans DVB-T2, and don't find anything, and after it wants to scan DVB-T. But this is a waste of time. The request is to scan DVB-T only disabling the first DVB-T2 scanning.

lars18th commented 7 months ago

Hi,

To be more clear... Using something like this:

./w_scan_cpp -ft -c NL --satip --satip-server '192.168.1.44:554|DVBT-1|MySvr:0x08' -V > ./scan-nl.m3u

The SAT>IP tuner is enforced to use only DVB-T. Therefore the requests to tune any frequency in DVB-T2 will fail. But the tool tries 4 times for each frequency in DVB-T2. This consumes a lot of wasted time. And only after this first T2 pass it starts to scan in DVB-T. Any idea to improve this? Perhaps a command line parameter to select the accepted modulations (T, T2 or both)? Or when using "DVBT" in the SAT>IP server then not scan for DVB-T2?

Please comment. Thank you.

wirbel-at-vdr-portal commented 7 months ago

Well, the problems starts at the point where you try to be over complicated on the commandline. Remove the '|DVBT-1' from the command line, don't restrict unnecessary. Even giving IP address is usually not wanted, unless really unavoidable.

I would use only

/w_scan_cpp -ft -c NL --satip -V > ./scan-nl.m3u

Netherlands uses both, DVB-T and DVB-T2.

The selection between T and T2 is part of the country setting. I don't want more options for this, less is more.

Regarding the waste of time. This tools is meant for users with not too much knowledge about their current tv system, who just want use this and have channels. Capturing as much as possible is the goal, but not saving time.

lars18th commented 7 months ago

Hi @wirbel-at-vdr-portal ,

Thank you for your response. However, take note that this tool (command line only) could be used by scripts to generate scanning logs. Therefore, if it's more flexible (without disturbing users) then we can have a win-win.

After a short review of the code, with this simple "hack" in the file w_scan_cpp/vdr/PLUGINS/src/wirbelscan-2023.10.15/scanner.cpp we can overcome the DVB-T2 scanning:

--- scanner.cpp 2024-02-07 11:26:48.081200643 +0100
+++ scanner.cpp.bak     2024-02-07 11:23:38.461171179 +0100
@@ -728,9 +728,6 @@
              case SCAN_TERRESTRIAL: {
                 std::array<int,2> DelSys = {1,0}; // {T2,T}
                 sys_parm = DelSys[mod_parm];      // NOTE: mod_parm is abused as 'system'
-                // HACK! BEGIN
-                if (sys_parm == 1) continue;
-                // HACK! END
                 if (thisSystem != sys_parm) {
                    thisSystem = sys_parm;
                    std::string Gen2(sys_parm, '2');

In the code of the plugin exists the paremeter wSetup.enable_s2 that is used to enforce to scan only DVB-S, disabling DVB-S2. I suggest (if you agree with that) to promote this parameter to enable/disable DVB-T2 and DVB-C2 scannings. And after that add the code in the w_scan_cpp tool to enable/disable it.

What you think?

lars18th commented 7 months ago

Remove the '|DVBT-1' from the command line, don't restrict unnecessary. Even giving IP address is usually not wanted, unless really unavoidable.

This is strictly needed when you're connecting with the SAT>IP server over a tunnel. For this reason I'm enabling the RTP-over-TCP mode. Please remember that this tool is also for engineers. 😉

lars18th commented 7 months ago

The selection between T and T2 is part of the country setting. I don't want more options for this, less is more.

In this case: Why not support "custom" country settings? Or "neutral" country settings?

These are only examples.

lars18th commented 7 months ago

Hi @wirbel-at-vdr-portal ,

Any ideas to improve this? For example, you'll accept to use the enable_s2 plugin setting (defined in wirbelscan.cpp) to control DVB-T2 and DVB-C2 too?

lars18th commented 6 months ago

Hi @wirbel-at-vdr-portal ,

I've created a simple solution to solve this. At time the enable_s2 flag is not supported in the "w_scan_cpp" tool, therefore I've added support for it. Futhermore, I've updated the wirbelscan plugin to promote this flag for DVB-T too.

The two PR related are:

I hope you'll agree with this clean and simple solution. I don't have finished the PR of the tool with the HISTORY because I prefer if first you merge the plugin change.

Please test it and comment. Regards.