<div dir="ltr">Hello Michel,<br><br>Thanks for your proposals.<br><br>I also has a thought about S2 parameter in frequency file, but decided to perform both DVB-S and DVB-S2 scans automatically since it easy on maintaining the frequency file.<br>
<br>I will probably leave "S" frequency as is and will add "S1" and "S2" if you want to specify what delivery should be used.<br>Also, I've been reported that some drivers can't work with AUTO modulation so it have to be implicitly specified. scan-s2 will have to monitor the modulation and scan S2 channels directly when 8PSK is specified or scan only DVB-S if QPSK is specified.<br>
<br>I'll review your patches later, don't have time now.<br><br><div class="gmail_quote">On Sat, Nov 1, 2008 at 5:11 PM, Michel Verbraak <span dir="ltr"><<a href="mailto:michel@verbraak.org">michel@verbraak.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Alex,<br>
<br>
Tested your scan-s2 with a Technisat HD2 card.<br>
<br>
Scanning works. But some channels are reported twice with different frequency. I found an error which is fixed by the patch file named scan.c.diff1.<br>
<br>
I would also like to propose the following change (see file scan.c.diff2 or scan.c.diff which includes both patches). This change makes it possible to only scan for DVB-S channels or DVB-S2 channels or both. This is done by specifying lines starting with S or S2 in the input file.<br>
<br>
example input file:<br>
# Astra 19.2E SDT info service transponder<br>
# freq pol sr fec<br>
S 12522000 H 22000000 2/3 <only DVB-S channels are scanned><br>
S 11914000 H 27500000 AUTO<br>
S 10743750 H 22000000 5/6<br>
S 12187500 H 27500000 3/4<br>
S 12343500 H 27500000 3/4<br>
S 12515250 H 22000000 5/6<br>
S 12574250 H 22000000 5/6<br>
S2 12522000 H 22000000 AUTO <only DVB-S2 channels are scanned><br>
S2 11914000 H 27500000 AUTO<br>
<br>
I hope this is usefull.<br>
<br>
Regards,<br><font color="#888888">
<br>
Michel.<br>
</font><br>--- scan-s2-88afcf030566/scan.c.orig 2008-11-01 10:09:43.000000000 +0100<br>
+++ scan-s2-88afcf030566/scan.c 2008-11-01 15:55:14.000000000 +0100<br>
@@ -906,10 +906,7 @@<br>
// New transponder<br>
t = alloc_transponder(tn.frequency);<br>
<br>
- // For sattelites start with DVB-S, it will switch to DVB-S2 if DVB-S gives no results<br>
- if(current_tp->delivery_system == SYS_DVBS || current_tp->delivery_system == SYS_DVBS2) {<br>
- tn.delivery_system = SYS_DVBS;<br>
- }<br>
+ tn.delivery_system = current_tp->delivery_system;<br>
<br>
copy_transponder(t, &tn);<br>
}<br>
@@ -1578,7 +1575,10 @@<br>
if_freq = abs(t->frequency - lnb_type.low_val);<br>
}<br>
if (verbosity >= 2)<br>
+ if (t->delivery_system == SYS_DVBS)<br>
dprintf(1,"DVB-S IF freq is %d\n", if_freq);<br>
+ else if (t->delivery_system == SYS_DVBS2)<br>
+ dprintf(1,"DVB-S2 IF freq is %d\n", if_freq);<br>
}<br>
<br>
<br>
@@ -1640,7 +1640,8 @@<br>
// get the actual parameters from the driver for that channel<br>
if ((ioctl(frontend_fd, FE_GET_PROPERTY, &cmdseq)) == -1) {<br>
perror("FE_GET_PROPERTY failed");<br>
- return;<br>
+ t->last_tuning_failed = 1;<br>
+ return -1;<br>
}<br>
<br>
t->delivery_system = p[0].u.data;<br>
@@ -1722,12 +1723,6 @@<br>
<br>
rc = tune_to_transponder(frontend_fd, t);<br>
<br>
- // If scan failed and it's a DVB-S system, try DVB-S2 before giving up<br>
- if (rc != 0 && t->delivery_system == SYS_DVBS) {<br>
- t->delivery_system = SYS_DVBS2;<br>
- rc = tune_to_transponder(frontend_fd, t);<br>
- }<br>
-<br>
if (rc == 0) {<br>
return 0;<br>
}<br>
@@ -1992,6 +1987,42 @@<br>
t->frequency,<br>
pol[0], t->symbol_rate, fec2str(t->fec), rolloff2str(t->rolloff), qam2str(t->modulation));<br>
}<br>
+ else if (sscanf(buf, "S2 %u %1[HVLR] %u %4s %4s %6s\n", &f, pol, &sr, fec, rolloff, qam) >= 3) {<br>
+ t = alloc_transponder(f);<br>
+ t->delivery_system = SYS_DVBS2;<br>
+ t->modulation = QAM_AUTO;<br>
+ t->rolloff = ROLLOFF_AUTO;<br>
+ t->fec = FEC_AUTO;<br>
+ switch(pol[0])<br>
+ {<br>
+ case 'H':<br>
+ case 'L':<br>
+ t->polarisation = POLARISATION_HORIZONTAL;<br>
+ break;<br>
+ default:<br>
+ t->polarisation = POLARISATION_VERTICAL;;<br>
+ break;<br>
+ }<br>
+ t->inversion = spectral_inversion;<br>
+ t->symbol_rate = sr;<br>
+<br>
+ // parse optional parameters<br>
+ if(strlen(fec) > 0) {<br>
+ t->fec = str2fec(fec);<br>
+ }<br>
+<br>
+ if(strlen(rolloff) > 0) {<br>
+ t->rolloff = str2rolloff(rolloff);<br>
+ }<br>
+<br>
+ if(strlen(qam) > 0) {<br>
+ t->modulation = str2qam(qam);<br>
+ }<br>
+<br>
+ info("initial transponder %u %c %d %s %s %s\n",<br>
+ t->frequency,<br>
+ pol[0], t->symbol_rate, fec2str(t->fec), rolloff2str(t->rolloff), qam2str(t->modulation));<br>
+ }<br>
else if (sscanf(buf, "C %u %u %4s %6s\n", &f, &sr, fec, qam) >= 2) {<br>
t = alloc_transponder(f);<br>
t->delivery_system = SYS_DVBC_ANNEX_AC;<br>
<br>--- scan-s2-88afcf030566/scan.c.orig 2008-11-01 10:09:43.000000000 +0100<br>
+++ scan-s2-88afcf030566/scan.c 2008-11-01 15:55:14.000000000 +0100<br>
@@ -1640,7 +1640,8 @@<br>
// get the actual parameters from the driver for that channel<br>
if ((ioctl(frontend_fd, FE_GET_PROPERTY, &cmdseq)) == -1) {<br>
perror("FE_GET_PROPERTY failed");<br>
- return;<br>
+ t->last_tuning_failed = 1;<br>
+ return -1;<br>
}<br>
<br>
t->delivery_system = p[0].u.data;<br>
<br>--- scan-s2-88afcf030566/scan.c.orig 2008-11-01 10:09:43.000000000 +0100<br>
+++ scan-s2-88afcf030566/scan.c 2008-11-01 15:55:14.000000000 +0100<br>
@@ -906,10 +906,7 @@<br>
// New transponder<br>
t = alloc_transponder(tn.frequency);<br>
<br>
- // For sattelites start with DVB-S, it will switch to DVB-S2 if DVB-S gives no results<br>
- if(current_tp->delivery_system == SYS_DVBS || current_tp->delivery_system == SYS_DVBS2) {<br>
- tn.delivery_system = SYS_DVBS;<br>
- }<br>
+ tn.delivery_system = current_tp->delivery_system;<br>
<br>
copy_transponder(t, &tn);<br>
}<br>
@@ -1578,7 +1575,10 @@<br>
if_freq = abs(t->frequency - lnb_type.low_val);<br>
}<br>
if (verbosity >= 2)<br>
+ if (t->delivery_system == SYS_DVBS)<br>
dprintf(1,"DVB-S IF freq is %d\n", if_freq);<br>
+ else if (t->delivery_system == SYS_DVBS2)<br>
+ dprintf(1,"DVB-S2 IF freq is %d\n", if_freq);<br>
}<br>
<br>
<br>
@@ -1722,12 +1723,6 @@<br>
<br>
rc = tune_to_transponder(frontend_fd, t);<br>
<br>
- // If scan failed and it's a DVB-S system, try DVB-S2 before giving up<br>
- if (rc != 0 && t->delivery_system == SYS_DVBS) {<br>
- t->delivery_system = SYS_DVBS2;<br>
- rc = tune_to_transponder(frontend_fd, t);<br>
- }<br>
-<br>
if (rc == 0) {<br>
return 0;<br>
}<br>
@@ -1992,6 +1987,42 @@<br>
t->frequency,<br>
pol[0], t->symbol_rate, fec2str(t->fec), rolloff2str(t->rolloff), qam2str(t->modulation));<br>
}<br>
+ else if (sscanf(buf, "S2 %u %1[HVLR] %u %4s %4s %6s\n", &f, pol, &sr, fec, rolloff, qam) >= 3) {<br>
+ t = alloc_transponder(f);<br>
+ t->delivery_system = SYS_DVBS2;<br>
+ t->modulation = QAM_AUTO;<br>
+ t->rolloff = ROLLOFF_AUTO;<br>
+ t->fec = FEC_AUTO;<br>
+ switch(pol[0])<br>
+ {<br>
+ case 'H':<br>
+ case 'L':<br>
+ t->polarisation = POLARISATION_HORIZONTAL;<br>
+ break;<br>
+ default:<br>
+ t->polarisation = POLARISATION_VERTICAL;;<br>
+ break;<br>
+ }<br>
+ t->inversion = spectral_inversion;<br>
+ t->symbol_rate = sr;<br>
+<br>
+ // parse optional parameters<br>
+ if(strlen(fec) > 0) {<br>
+ t->fec = str2fec(fec);<br>
+ }<br>
+<br>
+ if(strlen(rolloff) > 0) {<br>
+ t->rolloff = str2rolloff(rolloff);<br>
+ }<br>
+<br>
+ if(strlen(qam) > 0) {<br>
+ t->modulation = str2qam(qam);<br>
+ }<br>
+<br>
+ info("initial transponder %u %c %d %s %s %s\n",<br>
+ t->frequency,<br>
+ pol[0], t->symbol_rate, fec2str(t->fec), rolloff2str(t->rolloff), qam2str(t->modulation));<br>
+ }<br>
else if (sscanf(buf, "C %u %u %4s %6s\n", &f, &sr, fec, qam) >= 2) {<br>
t = alloc_transponder(f);<br>
t->delivery_system = SYS_DVBC_ANNEX_AC;<br>
<br></blockquote></div><br></div>