dtvtune

From LinuxTVWiki
Revision as of 12:31, 9 January 2015 by Wirbel (talk | contribs) (Documentation)
Jump to: navigation, search


NOTE: THIS IS A TEST PAGE ONLY. / DIGITAL PLAYGROUND FOR A NON-EXISTING TOOL.


Introduction

dtvtune is small utility to tune and debug digital tv cards.

It complements the w_scan command line channel scanner and helps debugging DTV cards and tv software related problems.
dtvtune requires DVB API v5.
If just tune is wanted, this tool behaves like femon and reports signal/lock.

Purpose

  • check dtv card tuning with given set of parameters
  • do roughly estimates of real life demod bit error rates by monitoring CRC32 of SI tables received in application.
  • check tuning implementations and unknown devices/delsys for w_scan
  • tool for playing with api v5.
  • report dtv cards properties.
  • do not rely on external libs.


Documentation

dtvtune does not have a man page.

However if you run it with parameter -H, a summary of it's command options is displayed.

  usage: ./dtvtune [options...] 
         -a N, --adapter N
                 use device /dev/dvb/adapterN/ [default: /dev/dvb/adapter0/]
                 (also allowed: -a /dev/dvb/adapterN/frontendM)
         -b N, --bandwidth_hz N, (default: 0 for 'AUTO')
                 bandwidth in Hz, N = {1720000 .. 10000000}
                 DVB-T/T2, ISDB-T, ISDB-Tsb
         -c s, --code_rate s
                 inner fec (cable/sat) / coderate high priority (terr)
                 s = (FEC_NONE,
                      FEC_1_2,
                      FEC_2_3,
                      FEC_3_4,
                      FEC_4_5,
                      FEC_5_6,
                      FEC_6_7,
                      FEC_7_8,
                      FEC_8_9,
                      FEC_AUTO,
                      FEC_3_5,
                      FEC_9_10,
                      FEC_2_5)
         -d s, --delivery_system s (default: not defined)
                 sets the delivery system.
                 s = (SYS_DVBC_ANNEX_A,
                      SYS_DVBC_ANNEX_B,
                      SYS_DVBC_ANNEX_C
                      SYS_DVBT,
                      SYS_DVBT2
                      SYS_DVBS,
                      SYS_DVBS2,
                      SYS_DSS,
                      SYS_TURBO
                      SYS_DVBH,
                      SYS_DAB,
                      SYS_DTMB,
                      SYS_CMMB
                      SYS_ISDBT,
                      SYS_ISDBS,
                      SYS_ISDBC,
                      SYS_ATSC,
                      SYS_ATSCMH)
         -f N, --frequency N, (default: 0)
                 center frequency in Hz, except satellite: kHz
         -g s, --guard_interval s
                 sets the DVB-T/T2 guard interval
                 s = (GUARD_INTERVAL_1_32,
                      GUARD_INTERVAL_1_16,
                      GUARD_INTERVAL_1_8,
                      GUARD_INTERVAL_1_4,
                      GUARD_INTERVAL_AUTO,
                      GUARD_INTERVAL_1_128,
                      GUARD_INTERVAL_19_128,
                      GUARD_INTERVAL_19_256,
                      GUARD_INTERVAL_PN420,
                      GUARD_INTERVAL_PN595,
                      GUARD_INTERVAL_PN945)
         -h s, --hierarchy s
                 set DVB-T/T2 hierachy. Usually HIERARCHY_NONE
                 s = (HIERARCHY_NONE,
                      HIERARCHY_1,
                      HIERARCHY_2,
                      HIERARCHY_4,
                      HIERARCHY_AUTO)
         -i s, --inversion s
                 specify spectral inversion (default: INVERSION_AUTO)
                 s = (INVERSION_OFF,
                      INVERSION_ON,
                      INVERSION_AUTO)
         -l s, --lna s
                 low noise amp for terr devices (default: LNA_AUTO)
                 s = (LNA_OFF,
                      LNA_ON,
                      LNA_AUTO)
         -m s, --modulation s
                 s = (QPSK,
                      QAM_16,
                      QAM_32,
                      QAM_64,
                      QAM_128,
                      QAM_256,
                      QAM_AUTO,
                      VSB_8,
                      VSB_16,
                      PSK_8,
                      APSK_16,
                      APSK_32,
                      DQPSK,
                      QAM_4_NR)
         -p s, --pilot s
                 DVB-S2 pilot tone: on/off/auto
                 s = (PILOT_ON,
                      PILOT_OFF,
                      PILOT_AUTO)
         -r s, --rolloff s
                 DVB-S2 rolloff: 0.35/0.20/0.25/auto
                 s = (ROLLOFF_35,
                      ROLLOFF_20,
                      ROLLOFF_25,
                      ROLLOFF_AUTO)
         -s N, --symbol_rate N
                 cable symbol rate in symbols per second
                 suggestion: 6900000 or 6875000 for DVB-C annex A
         -t s, --transmission_mode s
                 set transmission mode for DVB-T/T2, ISDB-T, DTMB
                 s = (TRANSMISSION_MODE_2K,
                      TRANSMISSION_MODE_8K,
                      TRANSMISSION_MODE_AUTO,
                      TRANSMISSION_MODE_4K,
                      TRANSMISSION_MODE_1K,
                      TRANSMISSION_MODE_16K,
                      TRANSMISSION_MODE_32K,
                      TRANSMISSION_MODE_C1,
                      TRANSMISSION_MODE_C3780)
         -u    <slot:user_frequency:sat_pos(:user_pin)>
         --scr <slot:user_frequency:sat_pos(:user_pin)>
                 Satellite Channel Routing
                    a) use EN50494:
                       slot          :  slot number for user frequency, 0..7
                       user_frequency:  receiver user frequency for slot in MHz, i.e. 1400
                       sat_pos       :  satellite position (upper case), 'A' or 'B'
                       user_pin      :  optional user pin, normally not used (0..255)
                    i.e. -u 0:1400:A for EN50494, slot 0 at 1400 MHz, Satellite Pos 'A'
                    
                    b) use advanced SCR EN50607/JESS:
                       slot          :  slot number for user frequency, 0..31
                       user_frequency:  receiver user frequency for slot in MHz, i.e. 1400
                       sat_pos       :  satellite position (lower case), 'a' .. 'p'
                       user_pin      :  optional user pin, normally not used (0..255)
                    i.e. -u 0:1400:a for EN50607 slot 0 at 1400 MHz, Satellite Pos 'a'
                            sat| committed switch  | uncommitted switch
                            pos| option | position | option | position
                             'a'    0   |   0      |   0    |   0
                             'b'    0   |   1      |   0    |   0
                             'c'    1   |   0      |   0    |   0
                             'd'    1   |   1      |   0    |   0
                             'e'    0   |   0      |   0    |   1
                             'f'    0   |   1      |   0    |   1
                             'g'    1   |   0      |   0    |   1
                             'h'    1   |   1      |   0    |   1
                             'i'    0   |   0      |   1    |   0
                             'j'    0   |   1      |   1    |   0
                             'k'    1   |   0      |   1    |   0
                             'l'    1   |   1      |   1    |   0
                             'm'    0   |   0      |   1    |   1
                             'n'    0   |   1      |   1    |   1
                             'o'    1   |   0      |   1    |   1
                             'p'    1   |   1      |   1    |   1
         -v, --verbosity
               increase verbosity by one.
         -v N, --verbosity N
               set verbosity to N
         -C s, --code_rate_lp s
                 set code rate low priority stream for DVB-T,
                 ignored if hierarchy is not set.
                 s = see '-c'
         -D Nc, --diseqc-switch Nc
                 use DiSEqC committed switch position N
         -D Nu, --diseqc-switch Nu
                 use DiSEqC uncommitted switch position N
         -L N:N:N, --lnb N:N:N
                 set SAT LNB in MHz
                 lowfreq:highfreq:switchfreq
                 default: 9750:10600:11700
         -P s, --polarization s
                 satellite polarization
                 s = (HORIZONTAL,
                      VERTICAL,
                      CIRCULAR_LEFT,
                      CIRCULAR_RIGHT)
         -S N, --stream_id N (default: OFF)
                 set stream_id (PLP_ID, ISI)
                 DVB-S2: 0..255
                 DVB-T2: 0..255
                 ISDB:   0..65535
                 values from 65536..4294967295 set stream_id = OFF
         --isdbt_partial_reception N
                 N = (0, 1, AUTO)
         --isdbt_sound_broadcasting N
                 N = (0, 1, AUTO)
         --isdbt_sb_subchannel_id N
                 N = (0 .. 41, AUTO)
         --isdbt_sb_segment_count N
                 N = (1 .. 13)
         --isdbt_sb_segment_idx N
                 N = (0 .. 12, AUTO)
         --isdbt_layerL_enabled N
                 L = (a, b, c)
                 N = (0, 1)
         --isdbt_layerL_fec s
                 L = (a, b, c)
                 s = see '-c'
         --isdbt_layerL_modulation s
                 L = (a, b, c)
                 s = see '-m'
         --isdbt_layerL_segment_count N
                 L = (a, b, c)
                 N = (1 .. 13, AUTO)
         --isdbt_layerL_time_interleaving N
                 L = (a, b, c)
                 N = (0, 1, 2, 4, AUTO)
         -H --help
                 show this help text

compiling dtvtune

make clean all

dtvtune doesnt have a make install target.

usage examples

tune digital cable TV Europe (DVB-C annex A)

./dtvtune -d SYS_DVBC_ANNEX_A -f402000000 -m QAM_256 -s 69000000

tune digital terrestrial TV Europe (DVB-T)

./dtvtune -d SYS_DVBT -f 618000000 -b 8000000 -c FEC_2_3 -C FEC_NONE -h HIERARCHY_NONE -m QAM_64 -t TRANSMISSION_MODE_8K -g GUARD_INTERVAL_1_8

tune digital terrestrial TV Europe, 2nd gen delsys (DVB-T2)

./dtvtune -d SYS_DVBT2 -f 642000000 -b 8000000 -m QAM_AUTO -t TRANSMISSION_MODE_32K -g GUARD_INTERVAL_1_16 -S0

tune satellite, 2nd gen delsys (DVB-S2)

NOTE: diseqc switch pos 1.

./dtvtune -d SYS_DVBS2 -f 11053000 -i INVERSION_AUTO -P HORIZONTAL -s 22000000 -m PSK_8 -c FEC_2_3 -p PILOT_AUTO -r ROLLOFF_AUTO -D1c

NOTE: SCR tuning EN50494, userfreq 1210MHz@slot3 (Inverto Unicable Black LNB), satellite position A

./dtvtune -d SYS_DVBS2 -f 11053000 -i INVERSION_AUTO -P HORIZONTAL -s 22000000 -m PSK_8 -c FEC_2_3 -p PILOT_AUTO -r ROLLOFF_AUTO -u 3:1210:A

delivery systems

Delivery System Implemented (y/n) Status
SYS_DVBC_ANNEX_A y works.
SYS_DVBC_ANNEX_C y implemented, UNTESTED.
expected to work.
SYS_DVBC_ANNEX_B y implemented, UNTESTED.
expected to work.
SYS_DVBT y works.
SYS_DVBT2 y works.
SYS_DVBS y implemented, UNTESTED. expected to work.
diseqc switch (committed/uncommitted), EN50494, EN50607/JESS support implemented.
waiting for bug reports.
SYS_DVBS2 y implemented, UNTESTED. expected to work.
diseqc switch(committed/uncommitted), EN50494, EN50607/JESS support implemented.
waiting for bug reports.
SYS_DSS y implemented, UNTESTED.
not expected to work, waiting for bug reports.
SYS_TURBO y implemented, UNTESTED.
not expected to work, waiting for bug reports.
SYS_DVBH n not implemented.
SYS_DAB n not implemented.
SYS_DTMB n not implemented.
SYS_CMMB n not implemented.
SYS_ISDBT n not implemented.
SYS_ISDBS n not implemented.
SYS_ISDBC n not implemented.
SYS_ATSC y implemented, UNTESTED. expected to work.
SYS_ATSCMH n not implemented.

Status

WORK IN PROGRESS - 2015/01/04