[mythtv-users] Myth, IRBlaster, FC3 and a single instance of LIRC?
Simon Kenyon
simon at koala.ie
Fri Jun 10 08:52:30 UTC 2005
On Thursday 09 June 2005 23:09, Mike wrote:
> Personally, I prefer these instructions:
> http://losdos.dyndns.org:8080/public/mythtv-info/MythTV_DISH_IR_LED_TX_via_
>Modified_LIRC.html
>
> There are some notes in there about using lirc with the 2.6 kernel which
> you may want to check out.
[snip]
IMHO that is way over complicated
i have a serial transmitter and a PVR350 working with one instance of lirc
what i did (in gentoo) was:
emerge lirc twice with the following:
---------------------------------------------------------------------------------------
LIRC_OPTS="--with-x --with-driver=hauppauge --with-major=61 --with-port=none
--with-irq=none" emerge lirc
LIRC_OPTS="--with-x --with-driver=serial --with-transmitter --with-major=61
--with-port=0x2f8 --with-irq=3" emerge lirc
---------------------------------------------------------------------------------------
i belive that you could just specify to build all the drivers so only
installing once.
then i have this in /etc/conf.d/lircd:
---------------------------------------------------------------------------------------
LIRCD_OPTS_0="--driver=default --device=/dev/lirc/0 --output=/dev/lircd
--listen=8765 --pidfile=/var/run/lircd0.pid"
LIRCD_OPTS_1="--driver=default --device=/dev/lirc/1 --output=/dev/lircd1
--connect=localhost:8765 --pidfile=/var/run/lircd1.pid"
---------------------------------------------------------------------------------------
remember that if you use udev then the device names will be /dev/lirc0
and /dev/lirc1
in /etc/modules.d/lirc i have:
---------------------------------------------------------------------------------------
add above ivtv lirc_dev lirc_i2c
alias char-major-61-0 lirc_i2c
alias char-major-61-1 lirc_serial
# /dev/ttyS0
#options lirc_serial irq=4 io=0x3f8 type=0
#pre-install lirc_serial setserial /dev/ttyS1 uart none
#post-remove lirc_serial setserial /dev/ttyS1 uart 16550A
# /dev/ttyS1
options lirc_serial irq=3 io=0x2f8 type=0 debug=1
pre-install lirc_serial setserial /dev/ttyS1 uart none
post-remove lirc_serial setserial /dev/ttyS1 uart 16550A
---------------------------------------------------------------------------------------
to start the TWO deamons i have in /etc/init.d/lircd:
---------------------------------------------------------------------------------------
start() {
ebegin "Starting lircd"
start-stop-daemon --start --pidfile /var/run/lircd0.pid --quiet
--exec /usr/sbin/lircd -- ${LIRCD_OPTS_0}
start-stop-daemon --start --pidfile /var/run/lircd1.pid --quiet
--exec /usr/sbin/lircd -- ${LIRCD_OPTS_1}
eend $?
}
stop() {
ebegin "Stopping lircd"
start-stop-daemon --stop --pidfile /var/run/lircd3.pid --quiet
--exec /usr/sbin/lircd
start-stop-daemon --stop --pidfile /var/run/lircd2.pid --quiet
--exec /usr/sbin/lircd
eend $?
}
---------------------------------------------------------------------------------------
with that done, the first lircd daemon handles the pvr350 and the second
handles the irblaster. you need add the appropriate description
to /etc/lircd.conf
i'lll include it here for completeness, but mine is only appropriate for a Sky
Digibox. i have a radio shack JP1 remote, but the standard hauppauge stuff is
still in here. i know it works because i use it on another frontend.
---------------------------------------------------------------------------------------
#
# this config file was automatically generated
# using lirc-0.5.5pre8 on Sun Apr 18 11:43:45 1999
#
# contributed by Jens Leuschner <leuschner at gmx.net>
#
# brand: Hauppauge
# model:
# supported devices: WinTV primo; WinTV pci; WinTV radio
#
# This config file will work with both homebrew receivers and
# original Hauppauge TV cards !!!
#
begin remote
name Hauppauge
bits 13
flags SHIFT_ENC
eps 30
aeps 100
one 950 830
zero 950 830
plead 960
gap 89584
repeat_bit 2
begin codes
TV 0x000000000000100F
RADIO 0x000000000000100C
FULL_SCREEN 0x000000000000102E
CH+ 0x0000000000001020
CH- 0x0000000000001021
VOL- 0x0000000000001011
VOL+ 0x0000000000001010
MUTE 0x000000000000100D
SOURCE 0x0000000000001022
1 0x0000000000001001
2 0x0000000000001002
3 0x0000000000001003
4 0x0000000000001004
5 0x0000000000001005
6 0x0000000000001006
7 0x0000000000001007
8 0x0000000000001008
9 0x0000000000001009
0 0x0000000000001000
RESERVED 0x000000000000101E
MINIMIZE 0x0000000000001026
end codes
end remote
#
# this config file was automatically generated
# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003
#
# contributed by
#
# brand: Hauppauge
# model no. of remote control:
# devices being controlled by this remote: PVR 2/350
#
begin remote
name hauppauge_pvr
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 969 811
zero 969 811
plead 1097
gap 114605
toggle_bit 2
begin codes
Power 0x00000000000017FD
Go 0x00000000000017FB
1 0x00000000000017C1
2 0x00000000000017C2
3 0x00000000000017C3
4 0x00000000000017C4
5 0x00000000000017C5
6 0x00000000000017C6
7 0x00000000000017C7
8 0x00000000000017C8
9 0x00000000000017C9
Back/Exit 0x00000000000017DF
0 0x00000000000017C0
Menu 0x00000000000017CD
Red 0x00000000000017CB
Green 0x00000000000017EE
Yellow 0x00000000000017F8
Blue 0x00000000000017E9
Ch+ 0x00000000000017E0
Ch- 0x00000000000017E1
Vol- 0x00000000000017D1
Vol+ 0x00000000000017D0
Ok 0x00000000000017E5
Mute 0x00000000000017CF
Blank 0x00000000000017CC
Full 0x00000000000017FC
Rewind 0x00000000000017F2
Play 0x00000000000017F5
Forward 0x00000000000017F4
Record 0x00000000000017F7
Stop 0x00000000000017F6
Pause 0x00000000000017F0
Replay 0x00000000000017E4
Skip 0x00000000000017DE
end codes
end remote
begin remote
name PHILIPS_RC-5
bits 11
flags RC5|CONST_LENGTH
eps 20
aeps 0
header 0 0
one 889 889
zero 889 889
plead 889
ptrail 0
foot 0 0
repeat 0 0
pre_data_bits 2
pre_data 0x02
post_data_bits 0
post_data 0x0
pre 0 0
post 0 0
gap 113792
toggle_bit 2
frequency 36000
duty_cycle 50
begin codes
zero 0x0000000000000000
one 0x0000000000000001
two 0x0000000000000002
three 0x0000000000000003
four 0x0000000000000004
five 0x0000000000000005
six 0x0000000000000006
seven 0x0000000000000007
eight 0x0000000000000008
nine 0x0000000000000009
mute 0x000000000000000d
exit 0x000000000000000f
volup 0x0000000000000010
voldown 0x0000000000000011
up 0x000000000000001c
down 0x000000000000001d
chanup 0x0000000000000020
chandown 0x0000000000000021
last 0x0000000000000022
sleep 0x0000000000000026
right 0x000000000000002b
left 0x000000000000002c
select 0x000000000000002e
move 0x000000000000002f
freeze 0x0000000000000036
swap 0x0000000000000037
tvvideo 0x0000000000000038
pip 0x000000000000003a
guide 0x000000000000003e
enter 0x000000000000003f
menu 0x000000000000015d
pause 0x0000000000000169
plus100 0x000000000000016a
rewind 0x0000000000000172
ffrwd 0x0000000000000174
play 0x0000000000000175
stop 0x0000000000000176
info 0x000000000000017c
record 0x000000000000017f
end codes
end remote
#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 at 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 at daviesfam.org
# modified by Steve Hill steve at 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
---------------------------------------------------------------------------------------
finally, you need a program to call from myth to change external channels.
here is what i use:
---------------------------------------------------------------------------------------
#!/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
OPTS="-d /dev/lircd1"
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
irsend ${OPTS} SEND_ONCE SKY SKY BACKUP $digit1 $digit2 $digit3
else
channel=$channel-1000
irsend ${OPTS} SEND_ONCE SKY SKY
irsend ${OPTS} SEND_ONCE SKY SERVICES
irsend ${OPTS} SEND_ONCE SKY 6
while [ "$channel" -gt "0" ]; do
irsend ${OPTS} SEND_ONCE SKY DOWN
channel=$channel-1
done
irsend ${OPTS} SEND_ONCE SKY SELECT
fi
---------------------------------------------------------------------------------------
this all might be of no use to you, but it works for me and took me a long
time to figure out; so i thought i'd share it.
regards
--
Simon Kenyon
email: simon at koala.ie
tel: +353 1 805 9290
mobile: +353 86 240 0005
More information about the mythtv-users
mailing list