Bug#521694: dvb-apps: dvbscan failes to set frontend

Bernhard Übelacker bernhardu at vr-web.de
Fri May 8 03:19:16 UTC 2015


Hello Sebastian, hello Eric,
I stumbled over the same error and found this report, so I attach
my findings to it - even when this report is alreay quite old ...

As of today it seems "dvbscan" has more than one problem:
- needed input file format seems more like
    /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
- polarization from the input file gets not used
    (Failed to set frontend)
- return value of dvbfe_get_info is checked wrong
    (Unable to query frontend status)
- when we succeed above we get into function dvbscan_scan_dvb
    which is empty ???

Therefore, in my opinion, the file /usr/bin/dvbscan in its current
state is useless.

When you was building from source you already used instead
of util/dvbscan/dvbscan the executable util/scan/scan.

That one from the package worked flawless for me (at least DVB-S):

$ /usr/bin/scan /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
scanning /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
initial transponder 12551500 V 22000000 5
>>> tune to: 12551:v:0:22000
DVB-S IF freq is 1951500
...
0x0011 0x0fa7: pmt_pid 0x0000 (null) -- Thomson SAT IPDL (running)
Network Name 'BetaDigital'
dumping lists (1223 services)
...


Kind regards,
Bernhard
-------------- next part --------------
$ cat /usr/share/dvb/dvb-s/Astra-19.2E
# Astra 19.2E SDT info service transponder
# freq pol sr fec
[CHANNEL]
        DELIVERY_SYSTEM = DVBS
        FREQUENCY = 12551500
        POLARIZATION = VERTICAL
        SYMBOL_RATE = 22000000
        INNER_FEC = 5/6
        INVERSION = AUTO


$ dvbscan /usr/share/dvb/dvb-s/Astra-19.2E
# no output at all


$ cat /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
S 12551500 V 22000000 5/6


$ dvbscan /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
Failed to open frontend


$ id
uid=108(hts) gid=113(hts) Gruppen=113(hts)


$ ls -lisah /dev/dvb/adapter0/frontend0
4556 0 crw-rw---- 1 root video 212, 0 Apr 17 23:13 /dev/dvb/adapter0/frontend0


# adduser hts video
Füge Benutzer »hts« der Gruppe »video« hinzu ...
Benutzer hts wird zur Gruppe video hinzugefügt.
Fertig.


$ id
uid=108(hts) gid=113(hts) Gruppen=113(hts),44(video)


$ dvbscan /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
Failed to set frontend


--- dvbscan.c.orig      2015-05-08 04:22:10.509663577 +0200
+++ dvbscan.c   2015-05-08 04:22:16.729843422 +0200
@@ -104,6 +104,7 @@ static int scan_load_callback(struct dvb
        struct transponder *t = new_transponder();
        append_transponder(t, &toscan, &toscan_end);
        memcpy(&t->params, &channel->fe_params, sizeof(struct dvbfe_parameters));
+       t->polarization = channel->polarization;
 
        add_frequency(t, t->params.frequency);
        t->params.frequency = 0;


$ util/dvbscan/dvbscan /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
Unable to query frontend status


                        while((time(NULL) - starttime) < TIMEOUT_WAIT_LOCK) {
                                if (dvbfe_get_info(fe, DVBFE_INFO_LOCKSTATUS, &feinfo,
                                                        DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0) !=
-                                       DVBFE_INFO_QUERYTYPE_IMMEDIATE) {
+                                       DVBFE_INFO_LOCKSTATUS) {
                                        fprintf(stderr, "Unable to query frontend status\n");
                                        exit(1);
                                }


--- dvbscan_dvb.c.orig  2013-05-13 12:19:02.000000000 +0200
+++ dvbscan_dvb.c       2015-05-08 04:48:27.619113832 +0200
@@ -27,4 +27,5 @@
 void dvbscan_scan_dvb(struct dvbfe_handle *fe)
 {
        // FIXME
+       fprintf(stderr, "dvbscan_scan_dvb: not implemented\n");
 }


$ util/dvbscan/dvbscan /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
dvbscan_scan_dvb: not implemented


########


$ /usr/bin/scan /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
scanning /usr/share/dvb/dvb-legacy/dvb-s/Astra-19.2E
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
initial transponder 12551500 V 22000000 5
>>> tune to: 12551:v:0:22000
DVB-S IF freq is 1951500
...
0x0011 0x0fa7: pmt_pid 0x0000 (null) -- Thomson SAT IPDL (running)
Network Name 'BetaDigital'
dumping lists (1223 services)
...


More information about the pkg-vdr-dvb-devel mailing list