<div dir="ltr"><br><br>
<div class="gmail_quote">2008/11/12 BOUWSMA Barry <span dir="ltr"><<a href="mailto:freebeer.bouwsma@gmail.com">freebeer.bouwsma@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">On Wed, 12 Nov 2008, Alex Betis wrote:<br><br></div>
<div class="Ih2E3d">> BTW, you give here example of NIT parsing, do you know the format of the<br>> message and what field specifies that the delivery system is DVB-S2? scan<br>> utility code doesn't parse it, so I just add both DVB-S and DVB-S2 scans for<br>
<br></div>I've spent yesterday hacking UTF-8 output into my old copy<br>of dvb-apps and then finding that the Greek 13E Hotbirds<br>channel `Βουλή:12168:h:2:27500:517:700:384' [UTF-8 encoded,<br>hope my MIME headers and ESMTP are correct] is not sent as<br>
latin-greek charset, and thus doesn't appear properly for<br>me, but anyway, here is a code snippet of my `scan' that sends<br>the NIT dump of the scanned transponder to stderr, that I<br>use when needed. Cut'n'paste; also part of a much larger<br>
set of hacks, so it's meant as an example, and not to be<br>used as ``useful'' code:<br><br>+<br>+char *fec[10] = {"NONE", "1/2", "2/3", "3/4", "4/5", "5/6", "6/7", "7/8", "8/9", "AUTO" } ;<br>
+if (tn.type == 0) {<br>+ if (dump_nits == 1) {<br>+ 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");<br>
+ printf(" FEC %s", fec[tn.param.u.qpsk.fec_inner] );<br>+if (tn.modulation & 0x04) {<br>+ printf(" DVB-S2");<br>+ if ((tn.modulation & 0x03) == 0x01) printf (" QPSK");<br>
+ if ((tn.modulation & 0x03) == 0x02) printf (" 8PSK");<br>+<br>+}<br>+if (tn.param.inversion != 2)<br>+ printf(" inv %s", tn.param.inversion ? "OFF" : "ON" /*XXX FIXME */);<br>
+printf("\n");<br>+ }<br>+}<br>+</blockquote>
<div>I must be missing something... How this code is aligned to the following modulation enumeration?</div>
<div>QPSK enumeration has value 0, 8PSK value 9.</div>
<div> </div>
<div><span class="k">typedef</span> <span class="k">enum</span> <span class="n">fe_modulation</span> <span class="p">{</span></div>
<div><span class="n"> QPSK</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">QAM_16</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">QAM_32</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">QAM_64</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">QAM_128</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">QAM_256</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">QAM_AUTO</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">VSB_8</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">VSB_16</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">PSK_8</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">APSK_16</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">APSK_32</span><span class="p">,</span></div>
<div><span class="p"> </span><span class="n">DQPSK</span><span class="p">,</span></div>
<div><span class="p"></span><span class="p">}</span> <span class="n">fe_modulation_t</span><span class="p">;</span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br><br><br>Also, I believe that the recent `dvbsnoop' invoked with<br>`-s ts -tssubdecode' on the NIT PID will verbosely parse<br>
the components and display everything -- I believe I used<br>that source code as the basis for the above hack.<br><br>I wonder if any of my other dvb-apps/scan hacks would be<br>of interest for someone to clean up (for me, function<br>
before form, especially when I don't have a clue as to<br>what I am doing)...<br><font color="#888888"><br><br>barry bouwsma<br></font></blockquote></div><br></div>