[linux-dvb] [PATCH] scan-s2: fixes and diseqc rotor support

BOUWSMA Barry freebeer.bouwsma at gmail.com
Wed Nov 12 13:47:45 CET 2008


On Wed, 12 Nov 2008, Alex Betis wrote:

> BTW, you give here example of NIT parsing, do you know the format of the
> message and what field specifies that the delivery system is DVB-S2? scan
> utility code doesn't parse it, so I just add both DVB-S and DVB-S2 scans for

I've spent yesterday hacking UTF-8 output into my old copy
of dvb-apps and then finding that the Greek 13E Hotbirds
channel `Βουλή:12168:h:2:27500:517:700:384' [UTF-8 encoded,
hope my MIME headers and ESMTP are correct] is not sent as
latin-greek charset, and thus doesn't appear properly for
me, but anyway, here is a code snippet of my `scan' that sends
the NIT dump of the scanned transponder to stderr, that I
use when needed.  Cut'n'paste; also part of a much larger
set of hacks, so it's meant as an example, and not to be
used as ``useful'' code:

+
+char *fec[10] = {"NONE", "1/2", "2/3", "3/4", "4/5", "5/6", "6/7", "7/8", "8/9", "AUTO" } ;
+if (tn.type == 0) {
+  if (dump_nits == 1) {
+    printf("NIT result:  %d %s %d   pos  %.1f%s  ", tn.param.frequency, tn.polarisation ? "V" : "H", tn.param.u.qpsk.symbol_rate, (float)tn.orbital_pos/10, tn.we_flag ? "E" : "W");
+    printf("  FEC %s",  fec[tn.param.u.qpsk.fec_inner] );
+if (tn.modulation & 0x04) {
+       printf("  DVB-S2");
+  if ((tn.modulation & 0x03) == 0x01) printf (" QPSK");
+  if ((tn.modulation & 0x03) == 0x02) printf (" 8PSK");
+
+}
+if (tn.param.inversion != 2)
+       printf("  inv %s",  tn.param.inversion ? "OFF" : "ON" /*XXX FIXME */);
+printf("\n");
+  }
+}
+


Also, I believe that the recent `dvbsnoop' invoked with
`-s ts -tssubdecode' on the NIT PID will verbosely parse
the components and display everything -- I believe I used
that source code as the basis for the above hack.

I wonder if any of my other dvb-apps/scan hacks would be
of interest for someone to clean up (for me, function
before form, especially when I don't have a clue as to
what I am doing)...


barry bouwsma



More information about the linux-dvb mailing list