Satelco Highend PCI (DVB-S): Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 38: Line 38:
<BR>
<BR>
In this example the IR is on "/dev/input/event2". The script "getIRRReceiver.pl" automatically detects this and environment variable "IRDEV" is set accrodingly in the above example.<BR>
In this example the IR is on "/dev/input/event2". The script "getIRRReceiver.pl" automatically detects this and environment variable "IRDEV" is set accrodingly in the above example.<BR>
<BR>
==== getIRRReceiver.pl ====
==== Script "getIRRReceiver.pl" ====
<PRE>
<PRE>
#!/usr/bin/perl
#!/usr/bin/perl
Line 57: Line 58:
my ($name, $value) = split(/=/);
my ($name, $value) = split(/=/);
$device{$name} = $value;
$device{$name} = $value;
#print "name: $name\n";
} else {
} else {
if ($device{"N: Name"} eq "\"DVB on-card IR receiver\"") {
if ($device{"N: Name"} eq "\"DVB on-card IR receiver\"") {
#print "Found device!\n";
if ($device{"H: Handlers"} =~ /event([0-9]*)/) {
if ($device{"H: Handlers"} =~ /event([0-9]*)/) {
$deviceNr = $1;
$deviceNr = $1;

Revision as of 16:15, 26 August 2007

Installation


Card drivers will be automatically detected and loaded by most linux distributions (e.g. Kubuntu). You need just to ensure that the firmware file "dvb-ttpci-01.fw" is installed in "/lib/firmware".

Remote Control (revision 2.3)

You need to load the description file for the remote control used.

av7110_loadkeys /etc/dvb-rc/satelco-highend.rc5 >/proc/av7110_ir

A script should be added to /etc/init.d which executes the command above. Then it need to be added to the runlevel directory.

VDR

The easiest way to use vdr with the remote control is the vdr-remote plugin. You can add the following paramater to your runvdr script in the line where vdr is started:

IRDEV="`/usr/local/bin/getIRRReceiver.pl`"
vdr -P "remote -i $IRDEV"

The following command will return a list with input devices:

cat /proc/bus/input/devices

I: Bus=0001 Vendor=13c2 Product=000e Version=0002
N: Name="DVB on-card IR receiver"
P: Phys=pci-0000:00:07.0/ir0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2I: Bus=0001 Vendor=13c2 Product=000e Version=0002
N: Name="DVB on-card IR receiver"
P: Phys=pci-0000:00:07.0/ir0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=100013
B: KEY=1 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
B: MSC=18
B: EV=100013
B: KEY=1 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
B: MSC=18


In this example the IR is on "/dev/input/event2". The script "getIRRReceiver.pl" automatically detects this and environment variable "IRDEV" is set accrodingly in the above example.

Script "getIRRReceiver.pl"

#!/usr/bin/perl
#
# Find /dev/input/eventXX device used by DVB on-card IR receiver.
#
use strict;

my %device;
my $deviceNr = 0;

open(FIN, "<", "/proc/bus/input/devices") or die "Failed to open file";
while(<FIN>)
{
	s/\n//g;
	s/\r//g;
	if (/=/) {
		my ($name, $value) = split(/=/);
		$device{$name} = $value;
	} else {
		if ($device{"N: Name"} eq "\"DVB on-card IR receiver\"") {
			if ($device{"H: Handlers"} =~ /event([0-9]*)/) {
				$deviceNr = $1;
			}
		}
	}
}
close(FIN);

printf("/dev/input/event%d\n", $deviceNr);