catalinii / minisatip

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

Web Interface: STR and SNR no working #901

Closed Javito68 closed 2 years ago

Javito68 commented 2 years ago

Hello everyone, I have the following problem:

Version: Minisatip Version: 1.1.46 on debian 10 Target: WinTV-dualHD minisatip installed as a service according to file: autostart.readme

options file: /etc/minisatip.conf: SERVER_ARGS = "- x 8090 -M *: 1-1.6 -R / var / lib / minisatip / html /"

works ok, except STR and SNR progress bars (view file) minisatip2 what is the problem?

Thanks!!!

lars18th commented 2 years ago

Hi @Javito68 ,

The problem is because the different implementation of the DVB Tuner drivers in Linux. Some returns no values, other returns values in different ranges, and different APIs exist to get the values. Then minisatip implements one trick for this: the parameter --multiplier. Please read the help in the homepage.

Futhermore, perhaps you want to test also the issue #902 to check with the tool "dvbv5-zap" if your tuner returns valid values.

I hope this helps.

Javito68 commented 2 years ago

Hi lars18th, thanks for answering, now I have managed to see the tuner0, the 1 no

options file: /etc/minisatip.conf: SERVER_ARGS = "- x 8090 -M *: 1-1.6 -R / var / lib / minisatip / html /"

minisatip3

tests with: dvbv5-zap:

tuner 0: dvbv5-zap -a 0 -c dvb_channel.conf "Cuatro HD" using demux 'dvb0.demux0' reading channels from file 'dvb_channel.conf' service has pid type 05: 1706 tuning to 578000000 Hz video pid 1701 dvb_set_pesfilter 1701 dvb_dev_set_bufsize: buffer set to 6160384 audio pid 1703 dvb_set_pesfilter 1703 (0x00) Lock (0x1f) C/N= 23.75dB UCB= 2156137 postBER= 0 Lock (0x1f) Signal= -29.00dBm C/N= 24.00dB UCB= 2156137 postBER= 0

Tuner1: dvbv5-zap -a 1 -c dvb_channel.conf "TV3" using demux 'dvb1.demux0' reading channels from file 'dvb_channel.conf' service has pid type 05: 901 tuning to 658000000 Hz video pid 111 dvb_set_pesfilter 111 dvb_dev_set_bufsize: buffer set to 6160384 audio pid 112 dvb_set_pesfilter 112 (0x00) Lock (0x1f) Signal= -31.00dBm C/N= 23.50dB UCB= 1424896 postBER= 0 Lock (0x1f) Signal= -32.00dBm C/N= 23.00dB UCB= 1424896 postBER= 8.90x10^-6

the two running at the same time, I observe that I receive values from the two tuners, what is the problem?

Thanks!!!

lars18th commented 2 years ago

Hi @Javito68 ,

the two running at the same time, I observe that I receive values from the two tuners, what is the problem?

I feel I found the problem. Let me to explain why this happens:

https://github.com/catalinii/minisatip/blob/74adf9665163b62f5f62fe210b6dff6999ccf02f/src/dvb.c#L1378

So the problem is not that minisatip is using a different call. The problem is this line: https://github.com/catalinii/minisatip/blob/74adf9665163b62f5f62fe210b6dff6999ccf02f/src/dvb.c#L1372

So, in fact minisatip is not getting any tuner value when the DVB API is less than 5.10: https://github.com/catalinii/minisatip/blob/74adf9665163b62f5f62fe210b6dff6999ccf02f/src/dvb.c#L1440-L1442

Then the solution is to implement the same strategy that does the "dvb5-zap" tool. That's to encapsulate the calls with the function dvb_fe_retrieve_stats(): https://github.com/gjasny/v4l-utils/blob/cd138c90d94385a816fb463d47f62b21fdc29106/lib/libdvbv5/dvb-fe.c#L1077. With this function if the reading checks first if the driver can provide the values or not.

As a resum: The "dvb5-zap" tool not fails getting values as it has a more complex implementation. The current minisatip implementation don't have support for tuner drivers with an API less than 5.10.

My suggestion is to change the current implementation supporting any DVB 5.x API, and checking the properties before the syscall. And take note that different tuners with different API could be enabled inside the same system. So checking the OS DVBAPIVERSION it's a but strategy.

I hope @catalinii will want to fix it. Regards.

Javito68 commented 2 years ago

thanks for the investigation lars18th, a greeting!!!

lars18th commented 2 years ago

thanks for the investigation lars18th, a greeting!!!

I hope @catalinii will want to fix this.

lars18th commented 2 years ago

Hi @catalinii ,

This is and old issue. Please, could you please close it? Thank you.

catalinii commented 2 years ago

Based on the code get_signal_new return -1 if the version of dvb headers is < 5.10 which in turn disables the new API to get the signal values.

If the new signal API is disabled, minisatip will use the old API: https://github.com/catalinii/minisatip/blob/74adf9665163b62f5f62fe210b6dff6999ccf02f/src/dvb.c#L1459 I think providing minisatip logs with -l dvb argument would help

Jalle19 commented 2 years ago

Hi @catalinii ,

This is and old issue. Please, could you please close it? Thank you.

Closing 😄