Mailing List archive

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

[linux-dvb] Re: Problems with DiSEq





On Thu, 29 Mar 2001, Rico Tunk wrote:

> Hi..
> 
> Iam using a Techno Trend DVB with SuSe 6.4 and a older Version (0.0.5) of
> siemens dvb driver.
> 
> there is also an spaun 9x8 Multi Switch between the pc and the dish.
> 
> at the time i first used the driver i had the problem i was not able to
> change the channels. i got the hint that there might be a problem with
> diseq and the switch. and that was right. 
> everytime i initialized the swich with an diseq command, he wound't accept
> any other commands (14/18V) anymore.
> 
> So i patched the driver und initialized the switch using DiseqNumber = -1
> instead of (1,2,3,4).
> 
> Now i could change the channels without a problem.
> 
> But now here comes my real problem:
> 
> i upgraded to the newest version. and my attempt to patch the driver like
> before failed. so does anyone have the same problem or does anyone know
> how to fix it ??
> 
> 
> thx in advance
> 
> Ric.   
> 
I have a similar problem with my LNB.\I think it is defective.
But it would never switch to low band on Hotbird.
I finally did the same thing, set diseqc to -1, (so it sends no signals
at all as that seems to confuse the LNB into thinking it is upper band),
and then do a power down power up immediatly after the channel is locked
in VDR
So I left the driver for what it was...
I thought this was just a patch to fix my LNB, but your problem reminds
me of this.
i took the oscilloscope and had it on the coax to the LNB, to see
what different funcions in the driver in diseqc do.
In the new ost interface, in the example tha twas published here you can
do:
 scmds.numCommands = 0; /* WAS 1 for bursts */
To switch diseqc of completely.
This will do a power down in the new interface:

set_ost_power_off()
{
scmds.voltage = SEC_VOLTAGE_OFF;
set_front();
}

This wil lselect the correct polarity:
set_pol(int polarity)
{
if (polarity) scmds.voltage = SEC_VOLTAGE_18;
else scmds.voltage = SEC_VOLTAGE_13;
set_front();
}


You must of cause have done get_front() somewhere first.
Hope this helps.

This is how I modified the SetChannel I took from VDR for my own
tuning program:
int SetChannel(int videoDev,\
	int FrequencyMHz, char Polarization, int Diseqc, int Srate,\
	int Vpid, int Apid, int Tpid, int Ca, int Pnr, int power)
{
unsigned int freq;
int a;
int high_band_flag;
struct frontend front;

//if(debug_flag)
	{
	fprintf(stdout,\
	"SetChannel(): arg\n\
	FrequencyMHz=%d Polarization=%c Diseqc=%d Srate=%d\n\
	Vpid=%d Apid=%d Tpid=%d Ca=%d Pnr=%d power=%d\n",\
	FrequencyMHz, Polarization, Diseqc, Srate,\
	Vpid, Apid, Tpid, Ca, Pnr, power);
	}

/* argument check */
if (videoDev < 0) return 0;

ioctl(videoDev, VIDIOCGFRONTEND, &front);

freq = FrequencyMHz;

/* select band */
if(freq < 11700UL) high_band_flag = 0;
else high_band_flag = 1;

/* universal LNB 22kHz for high band, set frequency */
if(high_band_flag)
	{
	front.ttk = 1; /* 22 kHz */
	freq -=  10600UL;
	}
else
	{
	front.ttk = 0;
	freq -= 9750UL;
	}	

/* conditional access */
if(Ca)
	{
	front.channel_flags = DVB_CHANNEL_CA;
	}
else
	{
	front.channel_flags = DVB_CHANNEL_FTA;
	}

/* for scanning only */
if(force_ca_mode_flag) front.channel_flags = DVB_CHANNEL_CA;

/* polarization */
if(Polarization == 'v')
	{
	front.volt = 0;
	}
else
	{
	front.volt = 1;
	}

front.pnr       = Pnr;
front.freq      = freq * 1000000UL;
front.diseqc    = Diseqc;
front.srate     = Srate * 1000;
front.video_pid = Vpid;
front.audio_pid = Apid;
front.tt_pid	= Tpid;
front.fec       = 8; /* forward error correction */
//	front.AFC       = 1;
//	front.power		= power;

//	front.channel_flags = DVB_CHANNEL_FTA;
//	front.channel_flags = DVB_CHANNEL_CA; 

/* LNB lower band kludge */
front.diseqc = -1; /* diseqc input select */
/* end LNB lower band kludge, but see below */

/* report status  */
printf("frequency actually used curfreq=%lu\n", front.curfreq);
printf("frequency sync from tuner fsync=%d\n", front.fsync);

ioctl(videoDev, VIDIOCSFRONTEND, &front);

if (front.sync & 0x1F == 0x1F)
	{
	/* Start LNB lower band kludge: */
	if(! high_band_flag)
		{
		/*
		this to cause my LNB to switch to lower band 
		The drives to the LNB  seem OK (22kHz in top band, nothing
		in lower band.
		Does any RF residu on the (very short in this case) coax keep the
		LNB in upper band?
		>>For this kludge to work the diseqc must be turned OFF.
		This I do by writing -1 to front.diseqc.
		HOWEVER it does not seem to be possible to turn it back on now :-)
		MAYBE a cold start? reloading driver does not help.
		*/			
		set_power(videoDev, 0);
		set_power(videoDev, 1);
		} /* end LNB lower band kludge */

       return 1;
	} /* end if high_band_flag */

return 0;
}/* end function SetChannel */



int set_power(int videoDev, int state)
{
struct frontend front;

if(debug_flag)
	{
	fprintf(stdout, "set_power(): arg videodev=%d state=%d\n",\
	videoDev, state); 
	}

/* argument check */
if(videoDev <= 0) return 0;
if( (state != 0) && (state != 1) ) return 0;

ioctl(videoDev, VIDIOCGFRONTEND, &front);

front.power	= state;

ioctl(videoDev, VIDIOCSFRONTEND, &front);

return 1;
}/* end function set_power */


Regards
Jan



--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index