I have recently set up a mythbuntu installation, using a PVR150. As I was getting a bit fed up with having to use a
keyboard to control the front end, I decided to buy a remote. I ended up ordering the Cyberlink IR remote from eBuyer
(http://www.ebuyer.com/product/129977), and it arrived this morning. There are many reports on the internet of some
buttons on this remote working, but not all of them. This is due to the fact that the remote is actually registered as 2
USB devices. The first seems to deal with the Up / Down / Left /Right / Enter / 0-9 buttons, the second deals with the
"special" keys. The first device works straight away after plugging the IR receiver in, but the second causes more of a
problem.
I noticed that the device eventid kept on changing between boots on the machine, so I changed a few bits. It is possible to define which event device to use in /etc/lirc/hardware.conf. The relevant line in this file is shown
below:
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf" REMOTE_LIRCD_ARGS="--device=`grep -l 'TopSeed' /sys/class/input/input*/name | tail -n1 | sed -e s'|/name||' | sed -e s'|sys/class/input/input|dev/input/event|'` --driver=dev/input"These two options should already exist in the file, but whatever value they are set to needs tobe changed. Next, lircd needs to be configured to detect the correct keypresses. To do this, create an empty file /etc/lirc/lircd.conf. Then, paste the following into the file:
begin remote name CYBERLINK bits 32 eps 30 aeps 100 one 0 0 zero 0 0 gap 135995
toggle_bit_mask 0x0 begin codes
end codes
end remoteThe next step is to work out the Hex code for each button. In a new terminal, run
$ sudo hexdump /dev/input/event3NOTE:You may have to use a different event number;
grep -l 'TopSeed' /sys/class/input/input*/name | tail -n1should tell you what to do.***
Sorry, this is missing right now; I will try to get something here soon. Hopefully the example below will helpYou need to extract the highlighted part, and add a button definition to the /etc/lirc/lircd.conf file, between "begin codes" and "end codes" as follows:
begin codes
<key name> 0x8<extracted part>
end codesFor example:
begin codes
back 0x8001009E
end codesDo this for every special button on the remote you require. My /etc/lirc/lircd.conf looks like this:
begin remote
name CYBERLINK
bits 32
eps 30
aeps 100
one 0 0
zero 0 0
gap 135995
toggle_bit_mask 0x0
begin codes
back 0x8001009E
Pause 0x80010077
volumeDown 0x80010072
volumeUp 0x80010073
Record 0x800100a7
Guide 0x80010082
Mute 0x80010071
ChannelUp 0x80010192
ChannelDown 0x80010193
Play 0x800100CF
SkipFoward 0x800100A3
SkipBack 0x800100A5
Menu 0x8001019A
Fwdwind 0x800100D0
Rewind 0x800100A8
end codes
end remoteThe last step is to set up the mapping between these keys and mythtv. The mapping is stored in
/home/mainuser/.mythtv/lircrc
. The format of this file is:
begin remote = CYBERLINK prog = mythtv button = Button name from /etc/lirc/lircd.conf config = Key to send to mythtv repeat = 0 delay = 0 endMy lircrc file is shown below:
begin remote = CYBERLINK prog = mythtv button = Mute config = | repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = SkipBack config = Z repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = SkipForward config = Q repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Pause config = P repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Menu config = M repeat = 0 delay = 0 end begin prog = mythtv button = back config = Escape end begin remote = CYBERLINK prog = mythtv button = ChannelUp config = Up repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = ChannelDown config = Down repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Rewind config = < repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Fwdwind config = > repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Play config = P repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = VolumeDown config = [ repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Stop config = Escape repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = VolumeUp config = ] repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Record config = R repeat = 0 delay = 0 end begin remote = CYBERLINK prog = mythtv button = Guide config = S repeat = 0 delay = 0 endAfter restarting lirc (sudo /etc/init.d/lirc restart), mythtv should recognise the remote control!