PVR info does not show the Signal quality / SNR in Kodi 19.0-ALPHA2 (18.9.702) on RPi 4B

  • I am using the DVB-T2 adapter MyGica T230C on RPi 4B and with the same setup as in earlier official LibreELEC build 9.2.5 which worked (with checked Force old status checkbox in TV adapter config), I am not able to get the Signal quality / SNR displayed in Kodi anymore.

    Service backend is Tvheadend Server 4.2 ( HTS Tvheadend 4.2.8-36 ~ LibreELEC Tvh-addon v9.80.6.123 ), PVR client is Tvheadend HTSP Client 7.2.1.1 (both installed from the Nightly Add-ons list).

    Tested on some latest Nightly builds with the same results:

    LibreELEC-RPi4.arm-9.80-nightly-20201024-636e32e.tar

    LibreELEC-RPi4.arm-9.80-nightly-20201030-7f3b20d.tar

    LibreELEC-RPi4.arm-9.80-nightly-20201031-cf5a710.tar

    In TVheadend GUI on Status page the Signal quality / SNR is visible:

    SNR: 29.5 dB

    Signal Strength: -46.0 dBm

    When tried femon, I have found that SNR is still reported with the same - fix - value which does not reflect the Tvheadend's value and the Signal value is random after every femon start:

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 7% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 70% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 38% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 26% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 57% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK


    Is there any chance it could be fixed in future please? For me that feature was quite useful as I need to struggle with room antenna position often due to bad signal.


    FYI I have also tested Astrometa DVB-T2 (with Sony CXD2837ER demod.) with the same result, it also have more other issues due to bad driver but In TVheadend GUI on Status page the Signal quality / SNR is also visible (with reversed Signal Strength sign):

    SNR: 25.7 dB

    Signal Strength: 90.6 dBm

    In this case femon does not return random signal value but always 0.

    Edited once, last by ghtester (October 31, 2020 at 2:40 PM).

  • Just discovered by searching the Net that femon is a bit obsolete and there's a replacement - dvb-fe-tool - which works fine on both LE official 9.2.6 and latest LE 9.8 Nightly / RPi 4B:

    =================================

    LibreELEC:~ # dvb-fe-tool

    Device Silicon Labs Si2168 (/dev/dvb/adapter0/frontend0) capabilities:

    CAN_2G_MODULATION

    CAN_FEC_1_2

    CAN_FEC_2_3

    CAN_FEC_3_4

    CAN_FEC_5_6

    CAN_FEC_7_8

    CAN_FEC_AUTO

    CAN_GUARD_INTERVAL_AUTO

    CAN_HIERARCHY_AUTO

    CAN_INVERSION_AUTO

    CAN_MULTISTREAM

    CAN_MUTE_TS

    CAN_QAM_16

    CAN_QAM_32

    CAN_QAM_64

    CAN_QAM_128

    CAN_QAM_256

    CAN_QAM_AUTO

    CAN_QPSK

    CAN_TRANSMISSION_MODE_AUTO

    DVB API Version 5.11, Current v5 delivery system: DVBT2

    Supported delivery systems:

    DVBT

    [DVBT2]

    DVBC/ANNEX_A

    Frequency range for the current standard:

    From: 48.0 MHz

    To: 870 MHz

    Step: 62.5 kHz

    ============================================

    LibreELEC:~ # dvb-fe-tool --femon

    Lock (0x1f) Signal= -50.00dBm C/N= 23.50dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.75dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -51.00dBm C/N= 23.75dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -51.00dBm C/N= 23.75dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.50dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.00dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.00dB UCB= 150 postBER= 0

    =============================================

    These values are OK and corresponds with Status values in Tvheadend.

    The question is - how to get them displayed in Kodi - PVR info (LE 9.8 - Kodi 19.0-ALPHA3) as it worked earlier (LE 9.2.6 - Kodi 18.9.0) ?

    Edit - additional info I have discovered so far:

    The PVR info is displayed by "o'' key press in Kodi when PVR is active or can be invoked by kodi-send --host=127.0.0.1 --button=o or by kodi-send -a "PlayerProcessInfo" when enabled in Settings / PVR&Live TV / Playback / Show signal quality

    The affected (not working) info labels are:

    PVR.ActStreamSignal {value)

    PVR.ActStreamProgrSignal (progress bar)

    PVR.ActStreamSNR (value)

    PVR.ActStreamProgrSNR {progress bar)

    Edited 2 times, last by ghtester (November 12, 2020 at 2:07 PM).

  • OK, as I don't know how the info labels work, I have created a temporary simple solution.

    If somebody else is interested, this is a primitive example script which displays the Signal quality and SNR on screen using the Notification action.

    Tested and working on LE 9.2.6 official and on LE 9.80 Nightly.

    #!/bin/bash

    COUNTER=0

    while [ $COUNTER -lt 1000 ]; do

    output_sig=$(dvb-fe-tool --femon -c1 &> /tmp/femon )

    read femon_output < /tmp/femon

    signal=$(echo $femon_output | cut -c 13-30)

    snr=$(echo $femon_output | cut -c 31-43)

    kodi-send --action="Notification($signal,$snr,1000,null)" > /dev/null

    let COUNTER=COUNTER+1

    sleep 1

    done

  • After some more extensive testing with 3 USB DVB-T2 tuners I have found differences related to monitoring status returned by their drivers:

    Astrometa Sony CXD2837ER Kodi PVR info: Signal quality:0%, SNR:0%

    LibreELEC:~/tmp # dvb-fe-tool -f 1 --femon -c1

    Lock (0x1f) Signal= 122.47dBm C/N= 23.00dB UCB= 0 postBER= 456x10^3

    Astrometa Panasonic MN88473 Kodi PVR info: Signal quality:49%, SNR:0%

    LibreELEC:~/tmp # dvb-fe-tool -f 1 --femon -c1

    Lock (0x1f) Quality= Good Signal= 49.95% C/N= 23.59dB UCB= 0 PER= 0

    MyGica Silicon Labs Si2168 Kodi PVR info: Signal quality:0%, SNR:0%

    LibreELEC:~/tmp # dvb-fe-tool --femon -c1

    Lock (0x1f) Signal= -52.00dBm C/N= 26.00dB UCB= 161640 postBER= 0

    So it looks PVR info can show the Signal quality and SNR values only if the tuner driver reports these values in % but every tuner driver is returning very different values in fact, which are mostly incompatible.

    It would be nice when some configurable pass-through filter could be implemented above driver layer so for any tuner model would be possible to make it working properly.

    Otherwise PVR info page in Kodi should be changed to grab and display the Signal and C/N values as exactly provided by driver and not in % which is now obsolete.

    Edited once, last by ghtester (November 14, 2020 at 12:03 PM).

  • I haven't looked (and don't plan to) but I'd make an educated guess that most or all of the drivers you're using are not from the upstream Linux kernel, which means they are written to the whims of a vendor instead of conforming to a common kernel-dictated method for reporting values. DVB drivers are one of the most-icky bits of our codebase.

  • Thanks for your comment, chewitt. Yes I know you are right. I don't know (and despite some searching couldn't find / discover) any details how the info labels (related to StreamSignal and StreamSNR) works (I did not analyze the source codes as it's above my level).

    But I thought it could grab it from femon or dvb-fe-tool by a simple script. In this case it would be easy (for anyone) to make a modification but it looks it's not the case.

    I absolutely understand that low priority of this issue but I think if there are still the Signal and SNR values present at PVR info page, it should show the valid values or tagged them as unsupported and get removed instead.

    Anyway, I am happy with the simple solution outlined above, that's suitable for me (just improved the script example a bit and configured a mapping to IR remote key). BTW. the Notification command is very useful and I am using it also for CPU high temperature warning (as sometimes one or more cores stuck at 100%).