Re: Re: [dvbtools-devel] dvbtune-0.5 inverts diseqc pol and band bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nico Sabbi wrote:
Nico Sabbi wrote:
Zoilo Gomez wrote:

The Diseqc-specs at http://www.eutelsat.com/satellites/pdf/Diseqc/Reference%20docs/bus_spec.pdf (table on page 13) confirm that dvbtune is in fact sending the wrong command.

With a patched dvbtune (pol-bit and band-bit both inverted) it works OK, and is also according to the Eutelsat specs.


I have attached a patch for you.

The problem is only in dvbtune (version 0.5); you may not have been using dvbtune (dvbtools); dvbscan and szap (linuxtv-dvb-apps) do not suffer from this problem.

Z.


------------------------------------------------------------------------

diff -Naur dvbtune-0.5.orig/tune.c dvbtune-0.5/tune.c
--- dvbtune-0.5.orig/tune.c    2004-02-06 15:00:36.000000000 +0100
+++ dvbtune-0.5/tune.c    2007-04-30 21:22:53.000000000 +0200
@@ -203,7 +203,7 @@
     * bits are: option, position, polarizaion, band
     */
    cmd.cmd.msg[3] =
- 0xf0 | (((sat_no * 4) & 0x0f) | (hi_lo ? 1 : 0) | (pol ? 0 : 2)); + 0xf0 | (((sat_no * 4) & 0x0f) | (hi_lo ? 0 : 1) | (pol ? 2 : 0)); diseqc_send_msg(secfd, pol,
            &cmd, hi_lo,




I disagree with your changes:
according to the specs that you linked the fields are:
*switch-number
*switch option
*satellite position
*polarization
*frequency_is_in_hi_band
*bytecode


                        1 A A V Lo F0
                        2 A A V Hi F1
                        3 A A H Lo F2
                        4 A A H Hi F3
                        5 A B V Lo F4
                        6 A B V Hi F5
                        7 A B H Lo F6
                        8 A B H Hi F7
                        9 B A V Lo F8
                       10 B A V Hi F9
                       11 B A H Lo FA
                       12 B A H Hi FB
                       13 B B V Lo FC
                       14 B B V Hi FD
                       15 B B H Lo FE
                       16 B B H Hi FF

assuming that in the code "pol" stands for "pol_is_vertical" and that "hi_lo" stands for "hi_band" ( frequency above SLOF) and counting bits from 8..1
- the last bit must be set to 1 when hi_band is 1
- the forelast bit (0x2) must be set when the polarization is horizontal (this polv is 0).

Please, explain why you believe that the current code is incorrect

Not so much a matter of believe, but of results.

My switch was not working, and selecting the wrong input. Hence I looked into the source, put some printfs and found that the DiSEqC command being sent was incorrect, i.e. different from the table above. So I changed the code, then it was working correctly.

Perhaps it would be better to change the code in the calling function; your opinion that (hi_lo==1) means high band seems logical, but in that case the value being passed to the function is wrong.

(pol==1) meaning "vertical" seems somewhat more ambiguous to me, perhaps a better name would be "vpol" (in which case however the calling function is sending the wrong value, inverted) or hpol (in which case it's OK).

Z.


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux