Tuning a transponder for Signal Info Level and Quality...

Module API help / support section for programmers.

Moderators: Dreamer, FredB, X05

yeyotheiron
Not too shy to talk
Posts: 13
Joined: Thu Aug 16, 2007 10:03 am

Tuning a transponder for Signal Info Level and Quality...

Postby yeyotheiron » Fri Jan 11, 2008 7:47 am

With this code can not get the transponder is tune properly. Even when the program
started without selecting a channel previously.

Attempt a module that speak the values of quality and level of the signal.

var
ASatList: TSatList;
ASglInfo: TSignalInfo;
Quality,
Level: String;

procedure TFormMain.FormCreate(Sender: TObject);
...
ASglInfo.dwSize:= SizeOf(TSignalInfo);
...
end;

procedure TFormMain.cb_SatListChange(Sender: TObject);
...
ATpList.wSatPos:= ASatList.Sats[cb_SatList.ItemIndex].wPos;
SendMessage(DDHwnd, WM_MODULE_MSG, DDMODAPI_GET_TP_LIST, Integer(@ATpList));
...
end;

procedure TFormMain.pbbtn_TunerClick(Sender: TObject);
var
_SetTunerParams: TSetTunerParams;
begin
_SetTunerParams.wSatPos:= ASatList.Sats[cb_SatList.ItemIndex].wPos;
_SetTunerParams.tpi.dwSize:= SizeOf(TSetTunerParams);
_SetTunerParams.tpi.dwModulation:= ATpList.TPs[lv_Tps.Selected.Index].dwModulation;
_SetTunerParams.tpi.dwFreq:= ATpList.TPs[lv_Tps.Selected.Index].dwFreq;
_SetTunerParams.tpi.Pol:= ATpList.TPs[lv_Tps.Selected.Index].Pol;
_SetTunerParams.tpi.dwSr:= ATpList.TPs[lv_Tps.Selected.Index].dwSr;
_SetTunerParams.tpi.dwLOF:= ATpList.TPs[lv_Tps.Selected.Index].dwLOF;
_SetTunerParams.tpi.dwLnbKHz:= ATpList.TPs[lv_Tps.Selected.Index].dwLnbKHz;
_SetTunerParams.tpi.dwInversion:= ATpList.TPs[lv_Tps.Selected.Index].dwInversion;
_SetTunerParams.tpi.dwFec:= ATpList.TPs[lv_Tps.Selected.Index].dwFec;

SendMessage(DDHwnd, WM_MODULE_MSG, DDMODAPI_SET_TUNER, Integer(@_SetTunerParams));
end;

procedure TFormMain.t_SignalsTimer(Sender: TObject);
var
_TransponderInfo: TTransponderInfo;
begin
t_Signals.Enabled:= False;

_TransponderInfo.dwSize:= SizeOf(TTransponderInfo);
SendMessage(DDHwnd, WM_MODULE_MSG, DDMODAPI_GET_TRANSPONDER_INFO, Integer(@_TransponderInfo));
with _TransponderInfo do
begin
l_Info1.Caption:= Format('%d, %d, %d', [dwFreq, Pol, dwLnbKHz]);
l_Info2.Caption:= Format('M:%d, Sr:%d, LOF:%d, I:%d, F:%d', [dwModulation, dwSr, dwLOF, dwInversion, dwFec]);
end;

SendMessage(DDHwnd, WM_MODULE_MSG, DDMODAPI_GET_SIGNALINFO, Integer(@ASglInfo));
Quality:= IntToStr(ASglInfo.Quality);
l_Quality.Caption:= Quality + '%';
pb_Quality.Position:= ASglInfo.Quality;
Level:= IntToStr(ASglInfo.Level);
l_Level.Caption:= Level + '%';
pb_Level.Position:= ASglInfo.Level;
l_Info3.Caption:= IntToStr(ASglInfo.Locked);

t_Signals.Enabled:= True;
end;


Reviewing the LOG file the application note that does the following:

...
[09/01/2008 1:47:57 p.m. : 24093] Tuning 12516, V, 20000...
[09/01/2008 1:47:57 p.m. : 24343] Result of Tune() = 0 (LOCKED) in 250 ms
[09/01/2008 1:47:57 p.m. : 24343] Locked in 250 ms
[09/01/2008 1:48:00 p.m. : 27359] Signal Level: 0% Continuity Errors: 0 Received TS: 54758
[09/01/2008 1:48:11 p.m. : 38187] Signal Level: 0% Continuity Errors: 0 Received TS: 253794
...

But when you select a channel by tuning the transponder adds some of the Diseqc:

...
[09/01/2008 1:48:27 p.m. : 54156] >>>>: ---SetCh(chid:191)--------------------------------
...
[09/01/2008 1:48:27 p.m. : 54187] SetCh: Setting Diseqc...
[09/01/2008 1:48:27 p.m. : 54187] LOF1/LOFSW/LOF2:11250000/0/10750000 b22Khz:00
[09/01/2008 1:48:27 p.m. : 54187] SetDiseqc() Sw-Port:1 SwUncommitted:-1 DiseqcType:0
[09/01/2008 1:48:27 p.m. : 54187] [TimeProfiler] SetDiseqc: 0 ms
...
[09/01/2008 1:48:27 p.m. : 54187] SetCh: Setting tuner...
...
[09/01/2008 1:48:27 p.m. : 54187] Tuning 12414, H, 20000...
[09/01/2008 1:48:27 p.m. : 54203] SelectLastCh:2
[09/01/2008 1:48:27 p.m. : 54453] Result of Tune() = 0 (LOCKED) in 250 ms
[09/01/2008 1:48:27 p.m. : 54453] [TimeProfiler] AfterChChange: 0 ms
[09/01/2008 1:48:27 p.m. : 54453] Locked in 266 ms
[09/01/2008 1:48:27 p.m. : 54453] SetCh(): Tune Ok
...

Is it necessary to tune transponder with DDMODAPI_SET_TUNER some other API?

Thanks, excuse my English.

User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Fri Jan 11, 2008 2:18 pm

there was something wrong in SET_TUNER api command. I have tried to fix it . please test with the following patch.

http://www.dvbdream.org/patches/dd_patch_080111.rar
DVB Dream - because I have to dream about having time to code it
yeyotheiron
Not too shy to talk
Posts: 13
Joined: Thu Aug 16, 2007 10:03 am

Postby yeyotheiron » Tue Jan 15, 2008 7:02 am

Right now this patch allows tune.

The signal information, Quality and Level, also reflect tuning.

But, later:

SendMessage(DDHwnd, WM_MODULE_MSG, DDMODAPI_GET_TRANSPONDER_INFO, Integer(@_TransponderInfo));

It does not reflect the new Transponder tuned.

Thanks, excuse my English.
yeyotheiron
Not too shy to talk
Posts: 13
Joined: Thu Aug 16, 2007 10:03 am

Postby yeyotheiron » Tue Jan 15, 2008 7:08 am

[14/01/2008 9:07:45 p.m. : 2359] Signal Level: 0% Continuity Errors: 0 Received TS: 271137
[14/01/2008 9:07:46 p.m. : 3453] [MDAPI] (DD->Plugin) On_Menu_Select proc-ofs:1004C860 pipno:0 pluginno:0 msg.ItemId:0000014F
[14/01/2008 9:07:53 p.m. : 10234] LOF1/LOFSW/LOF2:11250000/0/10750000 b22Khz:00
[14/01/2008 9:07:53 p.m. : 10234] SetDiseqc() Sw-Port:1 SwUncommitted:-1 DiseqcType:0
[14/01/2008 9:07:53 p.m. : 10234] [TimeProfiler] SetDiseqc: 0 ms
[14/01/2008 9:07:53 p.m. : 10234] Tuning 12224, V, 20000...
[14/01/2008 9:07:53 p.m. : 10500] Result of Tune() = 0 (LOCKED) in 266 ms
[14/01/2008 9:07:54 p.m. : 11219] WARNING: No TS pid filters set!
[14/01/2008 9:07:55 p.m. : 12312] WARNING: No TS pid filters set!
[14/01/2008 9:07:56 p.m. : 13297] Signal Level: 0% Continuity Errors: 0 Received TS: 57147
[14/01/2008 9:07:56 p.m. : 13406] WARNING: No TS pid filters set!
...
[14/01/2008 9:08:26 p.m. : 43375] [MDAPI] (DD->Plugin) On_Menu_Select proc-ofs:1004C860 pipno:0 pluginno:0 msg.ItemId:0000014F
[14/01/2008 9:08:27 p.m. : 44031] WARNING: No TS pid filters set!
[14/01/2008 9:08:28 p.m. : 45125] WARNING: No TS pid filters set!
[14/01/2008 9:08:28 p.m. : 45781] Signal Level: 0% Continuity Errors: 0 Received TS: 720593
[14/01/2008 9:08:28 p.m. : 45812] LOF1/LOFSW/LOF2:11250000/0/10750000 b22Khz:00
[14/01/2008 9:08:28 p.m. : 45812] SetDiseqc() Sw-Port:1 SwUncommitted:-1 DiseqcType:0
[14/01/2008 9:08:28 p.m. : 45812] [TimeProfiler] SetDiseqc: 0 ms
[14/01/2008 9:08:28 p.m. : 45812] Tuning 12239, H, 20000...
[14/01/2008 9:08:29 p.m. : 46062] Result of Tune() = 0 (LOCKED) in 250 ms
[14/01/2008 9:08:29 p.m. : 46328] WARNING: No TS pid filters set!
[14/01/2008 9:08:30 p.m. : 47422] WARNING: No TS pid filters set!
[14/01/2008 9:08:31 p.m. : 48515] WARNING: No TS pid filters set!
[14/01/2008 9:08:32 p.m. : 49609] WARNING: No TS pid filters set!
[14/01/2008 9:08:33 p.m. : 50703] WARNING: No TS pid filters set!
[14/01/2008 9:08:34 p.m. : 51797] WARNING: No TS pid filters set!
[14/01/2008 9:08:35 p.m. : 52890] WARNING: No TS pid filters set!
[14/01/2008 9:08:37 p.m. : 53984] WARNING: No TS pid filters set!
[14/01/2008 9:08:38 p.m. : 55078] WARNING: No TS pid filters set!
[14/01/2008 9:08:39 p.m. : 56172] WARNING: No TS pid filters set!
[14/01/2008 9:08:39 p.m. : 56719] Signal Level: 0% Continuity Errors: 0 Received TS: 217410
...
yeyotheiron
Not too shy to talk
Posts: 13
Joined: Thu Aug 16, 2007 10:03 am

Postby yeyotheiron » Wed Jan 16, 2008 9:23 am

Here is the idea, but as you can see is not yet finished.

yTpSpeak_v1.0.2.101_Alpha.rar file deleted.

The source code is no big deal. I also add it.

Thanks, excuse my English.
Last edited by yeyotheiron on Fri Jan 25, 2008 6:51 am, edited 2 times in total.
User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Wed Jan 16, 2008 2:21 pm

looking nice.

here is another patch, which should work better:

www.dvbdream.org/patches/dd_patch_080116.rar

the problem is that some TV cards dont support getting the current tp state. (current frequency) , so this API will return the latest values sent.
DVB Dream - because I have to dream about having time to code it
Snuffer
love DVB Dream!
Posts: 121
Joined: Fri Jun 16, 2006 9:44 pm

Postby Snuffer » Thu Jan 17, 2008 1:30 am

The snapshot function are not working in this nice MOD.

Thanks for share the the MOD with DD users

i change the ini list with feedfreq and he scan them for my excelent tool for feedhunt when you use it as scanner great.
yeyotheiron
Not too shy to talk
Posts: 13
Joined: Thu Aug 16, 2007 10:03 am

Postby yeyotheiron » Thu Jan 17, 2008 7:08 am

>Snuffer:
>The snapshot function are not working in this nice MOD.

The snapshot option is not developed, yet. Depends "Levels" works as I hope. Soon...

>rel
>here is another patch, which should work better:

I will try this patch dd_patch_080116.rar today.

>rel
>the problem is that some TV cards dont support getting the current tp state. (current frequency) , so this API will return the latest values sent.

I do not know. Already understand.

Thanks, excuse my English.
Snuffer
love DVB Dream!
Posts: 121
Joined: Fri Jun 16, 2006 9:44 pm

Postby Snuffer » Thu Jan 17, 2008 9:44 am

Perhaps a idea to switch to a TP if you see that there is a signal.

And DD switch to that TP also.
yeyotheiron
Not too shy to talk
Posts: 13
Joined: Thu Aug 16, 2007 10:03 am

Postby yeyotheiron » Mon Jan 21, 2008 8:58 am

Here is a better idea. Of course it is necessary dd_patch_080116.rar, with this version work as expected everything.

yTpSpeak_v1.0.2.268_Beta.rar file deleted.

Thanks rel, DD is great, tremendous job.
Last edited by yeyotheiron on Fri Jan 25, 2008 6:53 am, edited 1 time in total.
Snuffer
love DVB Dream!
Posts: 121
Joined: Fri Jun 16, 2006 9:44 pm

Postby Snuffer » Mon Jan 21, 2008 11:38 pm

only 4 downloads for this great tool????
It must be standart in DD.

First impression great again today 21 Jan some (3)feedhunters are going to test it more here .


When Q = 100 left side of Q are out of window
When Q = 100 in list he shows as 1...

dvbdream give's window with "listindex out of bounds (8)" scanning stops
in line in INI file are 11914,H,27500 9A NBC-QPSK remove 9A etc and gone running no more out of bounds
User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Tue Jan 22, 2008 9:11 am

dvbdream give's window with "listindex out of bounds (8)" scanning stops
in line in INI file are 11914,H,27500 9A NBC-QPSK remove 9A etc and gone running no more out of bounds
I wonder if that error happened on one of DD v1.4i's dialogs ? (since you were testing it Snuffer, happened on channel properties etc ?)

there will be one more modulation contant (NBC) in upcoming v1.4i:

MOD_DVBS_QPSK = 0;
MOD_DVBS_8PSK = 1; // DVB-S2 8PSK
MOD_DVBS_16APSK = 2;
MOD_DVBS_32APSK = 3;
MOD_TURBO_QPSK = 4; // Dish Network QPSK (Turbo)
MOD_TURBO_8PSK = 5; // Dish Network 8PSK (Turbo)
MOD_DVBS_NBC_QPSK = 6; // DVB-S2 QPSK (NBC)
DVB Dream - because I have to dream about having time to code it
Snuffer
love DVB Dream!
Posts: 121
Joined: Fri Jun 16, 2006 9:44 pm

Postby Snuffer » Wed Jan 23, 2008 2:56 am

Rel
MOD_DVBS_NBC_QPSK = 6; // DVB-S2 QPSK (NBC)
line are out of bounce.
yeyotheiron
Not too shy to talk
Posts: 13
Joined: Thu Aug 16, 2007 10:03 am

Postby yeyotheiron » Fri Jan 25, 2008 7:05 am

>Snuffer
>When Q = 100 left side of Q are out of window
>When Q = 100 in list he shows as 1...
>dvbdream give's window with "listindex out of bounds (Cool" scanning stops
in line in INI file are 11914,H,27500 9A NBC-QPSK remove 9A etc and gone running no more out of bounds

Fix.
It was funny error of 100%, with my equipment and my conditions are impossible to obtain these levels.

>rel
>MOD_DVBS_NBC_QPSK = 6; // DVB-S2 QPSK (NBC)

Add.

Thank you both.

Here is other version, I think, better.

yTpSpeak_v1.0.2.342_Beta2.rar file deleted.

Excuse my English.
Last edited by yeyotheiron on Tue Jan 29, 2008 7:11 am, edited 1 time in total.
Snuffer
love DVB Dream!
Posts: 121
Joined: Fri Jun 16, 2006 9:44 pm

Postby Snuffer » Fri Jan 25, 2008 2:08 pm

Go test tomorro morning and let you know if there is somethink to tell or news.

Thanks for the great Job.

Return to “Module / Plugin Programming”

Who is online

Users browsing this forum: Google [Bot] and 1 guest