<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD><TITLE>SKY rflink lirc mini howto</TITLE>
<link rel="stylesheet" href="/cornelius.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<body>
<H1>Lircd, SKY and Pace RF Mini HowTo</H1>
<p> This howto is a quick description of how i got a pace rflink device (designed of a TIVO) working on a standard RS232 serial port with lircd</p>
<h2>Pace rf2link</h2>
<p> The rf2link is a remote control extender for SKY and SKY+ systems that sends the control commands via the coax cable that is also used to send the
picture to other televisions. These can be bought from <a href="http://www.pacelink.co.uk/rf2link.htm">http://www.pacelink.co.uk/rf2link.htm</a>. These devices run of 9v power
from the SKY/SKY+ box that can be switched on from the RF2 socket. Two varieties exist one of which allows the power to continue to the NEXT device along the coax and one that stops
the power at the rf2link device, ONLY use the through power device IF you require the power at the next device, i.e. another remote extender. DO NOT ALLOW the 9v to reach your TV or your capture card! You have been warned!.<br><br>
These are designed for a TIVO so two possibilities exist :-<br><br>
1 - Cut of the jack plug<br>
2 - Make a nice socket for the jack plug to plug in to<br><br>I chose number one. Next you will need some 1N4148 diodes or similar small signal diodes, a female DB9 socket
and a plastic cover to mount the DB9 socket and hide away the 1N4148 diodes. These parts can be obtained from maplins <a href="http://www.maplin.co.uk">http://www.maplin.co.uk</a>
or you local electronics shop.<br>
<br>
Serial ports can signal from -9v to +9v (nominal) and can have voltages much
lower than this. I assumed my serial port was 9v and used 4 diodes (0.6-0.7v
drop per diode) and to stop the serial port putting any -ve voltages on the
pacelink device.<br>
<br>
DTR. -------->|---->|---->|----->|------- PACELINK Centre of cable<br>
GND ---------------------------------------- PACELINK Ground of cable
<br><br>
The pace link device input drives into a 3.5k ish resistor so i suspect a few extra volts won't hurt but their are a load of transistors next so i would not recommend any negative volts reaching them so a minimum of one diode always!.-
<br><br> Some pictures to come later!</p>
<h2>Lircd configuration</h2>
I have based my work on my Mandrake 10.1 (cooker actually) setup so *exact* configuration may vary, I can't remember where exactly I got this file i think it might be a standard LIRC
config file but here it is anyway-<br><br>
<pre>
#Copyright (C) 1999 Christoph Bartelmus
#You may only use this file if you make it available to others,
#i.e. if you send it to lirc@bartelmus.de
#
# this config file was automatically generated
# using lirc-0.6.4-CVS(serial) on Mon Jul 9 08:14:04 2001
#
# contributed by Steve Davies steve@daviesfam.org
# modified by Steve Hill steve@nexusuk.org 2003/06/29
#
# brand: sky
# model no. of remote control:
# supported devices: 34000 20
#
#
begin remote
name SKY
flags CONST_LENGTH|RAW_CODES
eps 30
aeps 100
ptrail 0
repeat 0 0
gap 149692
frequency 36000
duty_cycle 50
begin raw_codes
name 0
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444
name 1
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
888
name 2
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 888 888
444
name 3
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 888 444
444
name 4
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 888 888 444 444
444
name 5
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 888 888 888
name 6
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 888 444 444 888
444
name 7
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 888 444 444 444
444
name 8
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 888 888 444 444 444 444
444
name 9
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 888 888 444 444 888
name RED
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 444 444 888 888 444 444 888 888
name GREEN
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 444 444 888 888 444 444 444 444 888 444
name YELLOW
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 444 444 888 888 444 444 444 444 444 444
name BLUE
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 444 444 444 444 888 444 444 444 444 444 444
444
name TEXT
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 888 444 444 444 444 444 444 888 444 444
444
name BACKUP
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 888 888 444 444 444 444 444 444 444 444 888 444 444
name HELP
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 888 888 444 444 444 444 444 444 444 444 444 444 888
name CURSOR-LEFT
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 888 888 444 444 888 888 888 444
name CURSOR-DOWN
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 888 888 444 444 888 444 444 888
name CURSOR-RIGHT
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 888 888 444 444 888 888 444 444
name CURSOR-UP
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 888 888 444 444 888 444 444 444 444 444
name SELECT
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 888 888 444 444 444 444 888 444 444 444
name CHANNEL-DOWN
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 888 888 444 444 444 444 444 444 888
name CHANNEL-UP
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 888 888 444 444 444 444 444 444 444 444
444
name I
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 888 444 444 888 444 444 888 888 888 444 444
name ONOFF
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 888 444 444 888 444 444
444
name TV
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 888 888 444 444 444 444 444 444 888 888 444 444 444
name SKY
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 888 888 444 444 444 444 444 444 444 444 444 444 444 444
444
name TVGUIDE
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 888 444 444 888 444 444 888 444 444 888 444 444 444
name BOXOFFICE
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 444 444 444 444 444 444 444 444 888 888
name SERVICES
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 888 444 444 444 444 444 444 444 444 444 444 888
444
name INTERACTIVE
2664 888 444 444 444 444 444 888 444 888 888 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 888 444 444 444 444 444 444 888 888 888 888
end raw_codes
end remote
</pre>
<h2>Channel changer</h2>
Ok this is the script i used for changing channels. The original author of this script is Steve (2nd name unknown) and the script can be found at his page <a href="http://nexusuk.org/projects/mythtv/lirc/">http://nexusuk.org/projects/mythtv/lirc/</a> I have made some mods
as the script would not work for me out of the box for me at least.<br><br>
<h3>skychannel.sh</h3>
<p><pre>
#!/bin/sh
# For channels from 100 - 999 just request a channel number, for channels
# > 1000, select a channel from the "other channels" list.
# Channels < 100 get a 1 (and maybe a 0) glued on the front
export PATH=$PATH:/usr/local/bin
declare -i channel
channel=$1
if [ "$channel" -lt "100" ]; then
$channel=`printf '1%02i' $channel`
fi
RV=$?
if [ "$channel" -lt "1000" ]; then
declare -i digit1
declare -i digit2
declare -i digit3
digit1=$channel/100
digit2=$channel/10
digit2=$digit2%10
digit3=$channel%10
rc SEND_ONCE sky sky backup $digit1 $digit2 $digit3
else
channel=$channel-1000
rc SEND_ONCE sky_tx sky
rc SEND_ONCE sky_tx services
rc SEND_ONCE sky_tx 6
while [ "$channel" -gt "0" ]; do
rc SEND_ONCE sky_tx down
channel=$channel-1
done
rc SEND_ONCE sky_tx select
fi
</<pre></p>
<h2>Starting lircd</h2>
<p>
In my /etc/sysconfig/lircd file i have the following variables set<br><br>
<pre>
DRIVER=default<br>
HWMOD=lirc_serial<br>
DEVICE=/dev/lirc/0<br>
COM_PORT=/dev/ttyS0<br>
DRIVER_OPTS="irq=4 io=0x3f8 type=0"<br>
</pre>
<br>
This is used in the mandrake setup when the /etc/init.d/lircd start is called what this achieves is that a <br>
<pre>setserial ${COM_PORT} uart none</pre><br> is called to set up the serial port then a
<br><pre> modprobe ${HWMOD} ${DRIVER_OPTS} > /dev/null</pre></br> is done. Followed by <br><pre>daemon lircd --driver=default --device=/dev/lirc/0</pre><br>
The modprobe lirc_serial loads the lirc serial driver and this patches itself into /dev/lirc/0 (or the next available) the lirc daemon has to be told which device driver to connect to.
<br> Lircd is now up!</p>
<h2>Turing on the RF2 output</h2>
<p>To enable the engineers menu press services on the sky control, select system set up then press "0","1","SELECT" and you will be in the engineers menu. The options you want
are RF Outlets where you can turn the power on to RF2 and set the output channel. </p>
<center>[<a href="index.html">Front page</a>] </center>
</body>
</HTML>