Blindscan on linux with tbs cards

Llew

cerca trova...
Staff member
Joined
Jan 1, 2000
Messages
16,259
Reaction score
4,217
Points
113
Age
82
My Satellite Setup
Triple Dragon, Dreambox 8000, Echostar AD3000ip, TBS6522,6925,6983 PCie cards.
Gibertini 1.25m motorised dish driven by the AD3000, with either Inverto BU Quad or Norsat / XMW Ka LNBs . SMW 1.05m + 3 other dishes. Speccy: Promax HD Ranger+
My Location
The Flatlands of East Anglia
It seems OK now, I can't replicate the condition.
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
image1.png

Spectrum scan now also works on tas2101 devices. The spectrum has poor resolution compared to stid135. To avoid misunderstandings: the
graph does NOT show results of blindscan, just an estimate of possible mux frequencies and their bandwidth. These values will be used
as initial guesses when pressing the tune button. If "blindscan" is on, the tuner will then find the correct values. Providing initial guesses helps
the tuner to find a lock, although in theory it is not needed.

In this example, a peak was found at 11423V with an initiial estimate of symbolrate of around 23500. After tuning,
the correct info is found in two ways:
  • "info from tuner" shows the frequency actuallt locked into: 11 426.586MHz, and the symbol rate locked onto: 29500, which is rather different from the initial guess, because the initial guess is poor because of teh poor tuner resolution. The initial guess can also be poor due to other reasons, such as low SNR (weak satellites).
  • "NiT-actual" (on the left): shows what is reported by the broadcaster in the SI info of the stream: frequency is 11 426.5 Mhz, which is slightly off compared to what the tuner reports, but symbolrate typically agrees (very) well.
The difference between correct frequency (11 426.5) and tuned frequency is due to two causes: inaccurate local oscillator of LNB (main cause: can amount to 1 or 2 Mhz with some LNBs) and inaccuracies in the tuner (higher for tas2101 than for stid 135, but small in both cases). NeumoDVB, which was used to create the screenshots, remembers these differences and learns to compensate for them. So after a while of use,
the frequency reported by the tuner will get closer to the true one. In the screen-shot, neumoDVB estimates that the LNB error in frequency is about 1.053 Mhz. The difference between 11 426.586MHz and 1 426.5 Mhz is only 86kHz because neumoDVB has compensated most of the error away.

The new driver code also correctly detects the "MATYPE" property of the stream, which means rolloff, multistream, ... are correctly detected
now. The reported RF dB values are also closer to the truth for the av201x tuner (existing code was wrong).

What is not implemented:
  • blind searching the complete frequency band in the driver itself, which could be more accurate than "picking peaks from a coarse spectrum and asking the driver to tune them." The latter works perfectly on stid135 (high res spectrum), reasonably well on stv091x (decent resolution spectrum) and less well on tas2101.
  • PLS/mulitstream
 

Llew

cerca trova...
Staff member
Joined
Jan 1, 2000
Messages
16,259
Reaction score
4,217
Points
113
Age
82
My Satellite Setup
Triple Dragon, Dreambox 8000, Echostar AD3000ip, TBS6522,6925,6983 PCie cards.
Gibertini 1.25m motorised dish driven by the AD3000, with either Inverto BU Quad or Norsat / XMW Ka LNBs . SMW 1.05m + 3 other dishes. Speccy: Promax HD Ranger+
My Location
The Flatlands of East Anglia
I'm now using an Inverto Premium PLL Universal LNB, which should give truer tuned frequencies with changes in temperature at the LNB.
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Yes, PLL-lnbs should be better, but the proof is in the eating of the pudding.

In any case, large frequency offsets are bad (unless compensated) because they make it very difficult
to tune low symbol rate transponders. I even had problems with some larger symbol rates in the past.

The compensation can only be done in end user programs, so using my drivers will not help tuning
low symbolrate transponders in tvheadend, for example. It only helps in neumoDVB
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
This is work in progress, but I succeeded to obtain spectra with 100kHz resolution also from si2183 based devices, such as the
tbs 6504. Constellation plot also works, and blindscan is partially working (find muxes but does not end). More work is needed
to put it all together and to fix many details, such as displaying the correct frequency and symbolrate and of course a correct
RF level: 66dB would be the power of a nuclear explosion...

Getting this type of spectrum for one and and polarisation takes about 50 seconds. This is slower than on stid135.

I have tried using this card with crazyscan under windows without success. Spectrum scan shows a flat spectrum. Constellation only shows noise.


image1.png


image.png
 

pk008

Member
Joined
Nov 2, 2021
Messages
28
Reaction score
0
Points
1
Age
31
My Satellite Setup
TBS6908, TBS6903-X
My Location
Asia
I am trying to run blindscan using TBS6903-X for C band signal, but im getting locked freq above 6198.990!
and if i see syslogs, i see freq being set to negative values.
I suspect some driver/kernel related issue but not sure and after installing i got some issue with xorg/xrandr (screenshot attached) and stopped working GUI!
So did anyone had this issue before, if so how can i solve it?

I have installed from here: GitHub - deeptho/linux_media: TBS linux open source drivers and followed given steps

OS: Ubuntu 20.04.2 LTS
Kernel: 5.11.0-38-generic
 

Attachments

  • adapter1_syslogs.txt
    46.4 KB · Views: 8
  • blindscan_adapter1_command_and_output.txt
    1.4 KB · Views: 13
  • xrandr error.jpg
    xrandr error.jpg
    1.1 MB · Views: 18
Last edited:

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe

pk008

Member
Joined
Nov 2, 2021
Messages
28
Reaction score
0
Points
1
Age
31
My Satellite Setup
TBS6908, TBS6903-X
My Location
Asia
Hi Deeptho,
this code has never been tested in C-band. I have just made some changes which might fix the problem, but they
are also untested.
Understood.
And now neumo-blindscan stuck and last line in dmesg is
Bash:
stid135_scan_sat:1567 Could not start spectral scan

command and output:
Code:
./neumo-blindscan -a 1 -c 0 --blindscan-method 2 --lnb-type 2

adapter=1
frontend=0
start-freq=-1
end-freq=-1
step-freq=6000
pol=3
pls_codes[5]={ 4202496, 2048, 98139136, 134216704, 80015360, }
diseqc=UC: U=-1 C=-1
Name of card:
Name of adapter:  #0
Name of frontend: TurboSight TBS 6903x (Dual DVB-S/S2/S2X)
==========================
SEARCH: 3400.000-4200.000 pol=H

Spectrum scan's command_output and its log attached.
 

Attachments

  • spectrum_scan_cmd_and_output.txt
    771 bytes · Views: 17
  • spectrum_scan_logs.txt
    1.9 KB · Views: 10
Last edited:

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Pk00,
there was a big. I fixed it now. It should work also on C-band. One peculiarity still is that high frequencies
are listed first in the output. This could confuse plotting programs

./neumo-blindscan -c spectrum -U 3 -p 3 --spectrum-method fft --spectral-resolution 100 --lnb-type C -a 1
should work and leave the spectrum in /tmp/spectrum_a1_H.dat
It is normal that the last column contains mostly zeros

I am pretty hopeful to receive my long-awaited polariser for C-band in the coming days (Friday).
I will then soon test c-band myself (weekend), including the neumodvb program. I would recommend neumodvb for the spectrum,
because it has plotting functions, allows comparing to older spectra etc. I am pretty sure I will need some minor C-band bugs there first.

tbs6504 support is also mostly ready, but I have been looking for days now for a bug in driver unloading with that card.
 

Llew

cerca trova...
Staff member
Joined
Jan 1, 2000
Messages
16,259
Reaction score
4,217
Points
113
Age
82
My Satellite Setup
Triple Dragon, Dreambox 8000, Echostar AD3000ip, TBS6522,6925,6983 PCie cards.
Gibertini 1.25m motorised dish driven by the AD3000, with either Inverto BU Quad or Norsat / XMW Ka LNBs . SMW 1.05m + 3 other dishes. Speccy: Promax HD Ranger+
My Location
The Flatlands of East Anglia
One peculiarity still is that high frequencies
are listed first in the output. This could confuse plotting programs
That's because the C-Band LNB outputs a reversed spectrum compared to Ku/Ka LNBs. (except for the Ka Band B LNB for the Irish Saorsat service, which also has a reversed output).
 
Last edited:

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
I have just uploaded a new version of the drivers. This supports si2183 based cards, such as the tbs6504. It turned
out that the original drivers also had a bug which complicates tuning to some frequencies. This has been fixed now.
The spectrum is 100kHz in resolution, slightly slower than on stid135 ased cards like tbs6909x and tbs6909x, but
of high quality.
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Dear pk008,

I do not see any messages for me on that forum.
 

pk008

Member
Joined
Nov 2, 2021
Messages
28
Reaction score
0
Points
1
Age
31
My Satellite Setup
TBS6908, TBS6903-X
My Location
Asia
I sent email twice from that forum but anyway how can I contact you? may be you can mail me on p*********@gmail.com?


Best not to advertise your contact detail on an open forum
 
Last edited by a moderator:

pk008

Member
Joined
Nov 2, 2021
Messages
28
Reaction score
0
Points
1
Age
31
My Satellite Setup
TBS6908, TBS6903-X
My Location
Asia
understand! But i cant even send direct message in here!
Best not to advertise your contact detail on an open forum
 

derkonsamarie

New Member
Joined
Nov 24, 2021
Messages
1
Reaction score
0
Points
1
Age
35
My Satellite Setup
Satellite dish Satellite receiver Satellite tuner
My Location
USA
The peak finding algorithm of the stid135 method, in my opinion is more reliable, in comparison to stv091x, the actual blind scan is significatively slower and bad when it comes low symbol rates. With it scanning false peaks is very sluggish, making the scanning process slower than it might be. I am not acknowledged on this topic as others, but from what I had read, I understood that this theme about spectrum and blind scanning is quite interesting. The only thing for what I am using linux is for web developing and nothing more.
 
Last edited by a moderator:

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Well, the stid135 acquires a high resolution spectrum and the stv091x does not. So that means less space between peaks,
which is especially a problem for blindscna for slow symbolrates. Of cours,e for normal use, such a card is perfectly fine.

Also, for the stv091x, you can try both algorithms: neumodvb uses the same peak finder for both types of cards.
neumo-blindscan (the command line tool) uses a less advanced algorithm for stv091x, which is implemented in the drivers.
So it may produce different results.

I jave not spent much effort on optimizing either code for stv091x. With some different parameters, it might work better, but that requires
lots of experimentation. The parameters are hardcoded ....
 

pk008

Member
Joined
Nov 2, 2021
Messages
28
Reaction score
0
Points
1
Age
31
My Satellite Setup
TBS6908, TBS6903-X
My Location
Asia
Bash:
./neumo-blindscan -a 1 --lnb-type 2 --blindscan-method 2 -s 4000000 -e 4200000 -p 1 -c 0

adapter=1
frontend=0
start-freq=4000000
end-freq=4200000
step-freq=6000
pol=1
pls_codes[5]={ 4202496, 2048, 98139136, 134216704, 80015360, }
diseqc=UC: U=-1 C=-1
Name of card:
Name of adapter:  #0
Name of frontend: TurboSight TBS 6903x (Dual DVB-S/S2/S2X)
==========================
SEARCH: 4000.000-4200.000 pol=H
        FE_GET_EVENT: stat=31, signal=1 carrier=1 viterbi=1 sync=1 timedout=0 locked=1
RESULT: freq=4180.689H Symrate=34285 Stream=-1    MATYPE: 0xf2          //=> this is DVB-S2X TP with FEC 25/36
SIG=-31.80dB SIG= 69% CNR=13.20dB CNR= 66% DVB-S2 MOD(10) FEC_AUTO INV_OFF PIL_OFF ROLL(6)
retuning
        FE_GET_EVENT: stat=31, signal=1 carrier=1 viterbi=1 sync=1 timedout=0 locked=1
RESULT: freq=4140.690H Symrate=34285 Stream=-1    MATYPE: 0xf3          //=> this is DVB-S2X TP with FEC 25/36   
SIG=-29.65dB SIG= 71% CNR=12.50dB CNR= 62% DVB-S2 MOD(10) FEC_AUTO INV_OFF PIL_OFF ROLL(6)
retuning
        FE_GET_EVENT: stat=31, signal=1 carrier=1 viterbi=1 sync=1 timedout=0 locked=1
RESULT: freq=4060.692H Symrate=29269 Stream=-1    MATYPE: 0x0
SIG=-28.47dB SIG= 72% CNR=12.70dB CNR= 63% DVB-S  QPSK FEC_3_4  INV_OFF PILAUTO ROLL_35
retuning
        FE_GET_EVENT: stat=31, signal=1 carrier=1 viterbi=1 sync=1 timedout=0 locked=1
RESULT: freq=4020.694H Symrate=29999 Stream=-1    MATYPE: 0xf2
SIG=-28.15dB SIG= 72% CNR=10.20dB CNR= 51% DVB-S2 8PSK FEC_5_6  INV_OFF PIL_ON  ROLL_20
retuning
        FE_GET_EVENT: stat=32, signal=0 carrier=0 viterbi=0 sync=0 timedout=1 locked=0


im not able to detect delivery system and FEC correctly
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
769
Reaction score
465
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
pk008,
first of all are you sure that the " DVB-S2X TP with FEC 25/36 info is correct.
Websotes are not always uptodate, so it is dangerous to rely on them for this
type of detailed information.

In any case, the matype field provides info on streamtype (11= transport stream),
multistream (1=single stream), ccm/acm (1=CCM),
syncrhonisation (0=not active)
null packet deletion (=0 none) rolffooff (10 = 0.20).
So this is unrelated to FEC and type fof modulation

FEC and such are gotten form the modcode, which I cannot see in this report.
The driver has no knowledge of FEC_25/36. All of this is based on some giant lookup tables, which
may contain incorrect entries. I can fix if I know what is wrong.
So if you can provide me with the correct modcode, I can proceed. I cannot receive this satellite myself.

With some effort, you can get the modcode either from
the neumo-blindscan program (by adpating it to add a DTV_MODCODE call in getinfo)
or from the the driver debugging information.

Accessing the debug log requires a few steps
1. configure your system (e.g., rsyslog) so that it actually logs kernel debug messages
For example, in rsylsogd, you need to add the following line to /etc/rsyslog.conf
kern.debug /var/log/debug

you need to restart by
systemctl restart rsyslog

2. activate extra debug messages: as root:
echo 1 > /sys/module/stid135/parameters/stid135_verbose

/var/log/debug will then start to log lines with
GOT MODCODE followed by the number.

Or you could get the modcode from some other program (maybe on windows)


Note that I did not write these drivers. I just fixed them where needed and then adapted what was missing.
It is a huge piece of software with many weird pieces of code (and bugs).
 

pk008

Member
Joined
Nov 2, 2021
Messages
28
Reaction score
0
Points
1
Age
31
My Satellite Setup
TBS6908, TBS6903-X
My Location
Asia
Bash:
[84406.596928] FE_STiD135_Algo:4418 [1] calling FE_STiD135_BlindSearchAlgo: demodTimeout=12000
[84406.596931] FE_STiD135_BlindSearchAlgo:4846 Starting blindsearch satellite_scan=0 jump=0 freq=-585000000+10000000
[84406.596934] FE_STiD135_BlindSearchAlgo:4849 XXX set to 0x5c
[84406.597107] FE_STiD135_StartSearch:4743 [1] XXX set to 0x1f
[84406.597281] FE_STiD135_StartSearch:4777 [1] BLIND_SEARCH
[84406.597283] FE_STiD135_StartSearch:4790 [1] XXX set to 0x0
[84406.597457] FE_STiD135_BlindSearchAlgo:4867 trying to find lock status
[84406.597459] FE_STiD135_GetDemodLock:2400 [1] Timeout=500
[84406.597461] FE_STiD135_GetDemodLock:2406 [1] using srate dependent timeout
[84406.678262] FE_STiD135_GetDemodLock:2461 [1] DVBS2 detected lock=1
[84406.678270] FE_STiD135_GetDemodLock:2483 [1] LOCK_DEFINITIF achieved timout=50/500
[84406.680152] FE_STiD135_BlindSearchAlgo:4871 called FE_STiD135_GetDemodLock: lock=1 Timeout=500
[84406.680156] FE_STiD135_Algo:4421 [1] end call FE_STiD135_BlindSearchAlgo: lock=1
[84406.680158] FE_STiD135_Algo:4425 [1] BLIND SEARCH: timeout=12000 lock=1
[84406.740394] FE_STiD135_Algo:4443 [1] here standard=1
[84406.740643] FE_STiD135_Algo:4456 [1] here first_lock=1
[84406.740646] FE_STiD135_Algo:4475 [1] here2 first_lock=1 fec_locked=1 pdel_status_timeout=0
[84406.782354] FE_STiD135_WaitForLock:1889 [1] entering  FecTimeOut=12000
[84406.782358] FE_STiD135_GetDemodLock:2400 [1] Timeout=12000
[84406.782360] FE_STiD135_GetDemodLock:2406 [1] using srate dependent timeout
[84406.782630] FE_STiD135_GetDemodLock:2443 [1] timeout changed to 5500
[84406.783125] FE_STiD135_GetDemodLock:2461 [1] DVBS2 detected lock=1
[84406.783131] FE_STiD135_GetDemodLock:2483 [1] LOCK_DEFINITIF achieved timout=10/5500
[84406.785071] FE_STiD135_WaitForLock:1897 Demod locked, trying to check FEC Lock status! FecTimeOut: 12000, lock: -1046469376
[84406.785315] FE_STiD135_GetFECLock:2553 checkig for FEC Lock! Timeout period: 12000
[84406.785591] FE_STiD135_WaitForLock:1904 FEC Lock status: 1, Lock: 1
[84406.785596] FE_STiD135_WaitForLock:1911 NOT A SATELLITE SCAN!
[84406.809752] FE_STiD135_WaitForLock:1933 [1] SYNC NOW 1 line_ok=1
[84406.809757] FE_STiD135_Algo:4529 LOCKED!
[84406.810643] FE_STiD135_Algo:4630 [1] ALGO t exit: lock=1
[84406.816154] set_pls_mode_code:10634 [1] SETTING PLS_MODE_CODE = 0 1
[84406.818216] set_stream_index:10657 [1] error=0 locked=1
[84406.818221] stid135_set_parameters:627 [1] setting timedout=0
[84406.818223] stid135_set_parameters:635 [1] set_parameters: error=0 locked=1 vit=1 sync=1 timeout=0
[84406.818226] stid135_set_parameters:644 [1] set_parameters: error=0 locked=1
[84406.819921] get_current_llr:12432 [1] Bit rate = 88 Mbits/s
[84406.819926] get_current_llr:12455 [1] Current LLR  = 127 MLLR/s
[84406.819929] fe_stid135_set_maxllr_rate rate 180
[84406.820605] get_current_llr:12481 [1] Max LLR allowed = 180 MLLR/s
[84406.820610] stid135_set_parameters:663 [1] set_parameters: error=0 locked=1
[84406.821024] stid135_tune_:997 [1] RETUNE: GET SIGNAL
[84406.822110] fe_stid135_get_signal_info:3770 [1] Called fe_stid135_get_lock_status: carrier=1 sync=1
[84406.822115] fe_stid135_get_signal_info:3777 [1] freq=1550000

[84406.824267] fe_stid135_get_signal_info:3832 [1] GOT MODCODE 83

[84407.257530] fe_stid135_get_signal_info:3849 [1] here 3
[84407.257538] fe_stid135_get_signal_info:3851 [1] here 4
[84407.258128] fe_stid135_get_signal_info:3921 [1] MIS: mis_mode=0
[84407.685512] stid135_tune_:1004 [1] setting timedout=0
[84407.685522] stid135_get_frontend:852 SET stream_id=0xfffffff isi=0xff
[84408.129656] stid135_get_frontend:852 SET stream_id=0xfffffff isi=0xff
[84409.137525] stid135_tune_:1004 [1] setting timedout=0
[84410.089512] tbsecp3_set_voltage:458 Set voltage voltage=2

if ioctl read fails when i try to read DTV_MODCODE and DTV_MATYPE with error code: 524
C:
ret = ioctl(fefd, DTV_MODCODE, &modcode);
if(ret == -1){
    printf("failed to get MODCODE! Error: %s[%d]\n", strerror(errno), errno);
}

ret = ioctl(fefd, DTV_MATYPE, &matype);
if(ret == -1){
    printf("failed to get MATYPE! Error: %s[%d]\n", strerror(errno), errno);
}
 
Top