Hauppauge remote control issue (HVR-4000)
Ubuntu 10.10 (Maverick)
OUTDATED: go to http://archive.pfb.no/2010/12/14/fully-working-remote-control/
I have been quite frustrated over the lack of being able to navigate in media center menus for a long time since the back/exit button has failed to do the desired response, namely navigate back / go up one level / go to parent dir / go to parent menu.
Since kernel 2.6.17 there has been some built-in support for the Hauppauge remote. It is handled by the module ir_common. Because of this, a few buttons works out of the box by simply connecting the ir-receiver on the back of the Happauge card. Now, the big problem relies when one would like to assign functions to other buttons in for instance a Media Center. Most media centers (xmbc, Enna, Elisa/Moovida) are handled through LIRC, hence, the ir_common module is blocking the wanted input (for now).
A simple solutions for this problem is to blacklist ir_common module in /etc/modprobe.d/blacklist.conf
Restart computer.
(Chances are you can still se it as loaded with the command lsmod, but I does not respond to remote control buttons anymore. At least in my case.)
To be able to use your remote control, simply install LIRC and follow simple procedures from the various media center distributions in order to manually configure button layout.
:~$ sudo aptitude install lirc
Select default on the questions that pop up. We need to reconfigure it anyway.
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE_MODEL="Hauppauge-HVR4000-Remote"
REMOTE_VENDOR="Hauppauge"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
TEMPIREVENT=`ls /dev/input/by-path/ |grep event-ir`
REMOTE_DEVICE="/dev/input/by-path/$TEMPIREVENT"
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""
The rest of the fields may be as they are.
Another option to set the REMOTE_DEVICE variable is to create a udev rule like this:
/etc/udev/rules.d/10-local.rules
KERNEL=="event*",SYSFS{vendor}=="0x14f1",SYMLINK="input/irremote"
and alter it accordingly in the hardware.conf file:
REMOTE_DEVICE="/dev/input/irremote"
To map the keys to understandable names paste this into the /etc/lirc/lircd.conf file ( or /usr/share/lirc/remotes/hauppauge/lircd.conf.hauppauge and incude it in /etc/lirc/lircd.conf ).
#/etc/lirc/lircd.conf
begin remote
name Hauppauge-HVR4000-Remote
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0x8001
gap 133325
toggle_bit_mask 0x8001001C
begin codes
Power 0x0074
Go 0x0161
TV 0x0179
Video 0x0189
Music 0x0188
Pictures 0x016F
Guide 0x016D
Radio 0x0181
Up 0x0067
Down 0x006C
Left 0x0069
Right 0x006A
OK 0x001C
Back/Exit 0x00AE
Menu 0x008B
PrevCh 0x019C
Mute 0x0071
Vol+ 0x0073
Vol- 0x0072
Ch+ 0x0192
Ch- 0x0193
Rec 0x00A7
Stop 0x0080
Play 0x00CF
Pause 0x0077
Rewind 0x00A8
Forward 0x00D0
Replay 0x00A5
Skip 0x00A3
1 0x0002
2 0x0003
3 0x0004
4 0x0005
5 0x0006
6 0x0007
7 0x0008
8 0x0009
9 0x000A
0 0x000B
Text 0x0184
Sub/CC 0x0172
Red 0x018E
Green 0x018F
Yellow 0x0190
Blue 0x0191
end codes
end remote
:~$ sudo /etc/init.d/lircd restart :~$ irw
And you should see some input..
References:
http://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-4000
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/67399
