Years ago with one of my DVB TV tuner cards cards I unexpectedly also received a little USB IR receiver and remote. In common with almost all peripheral hardware, it was designed for Windows but can with a little effort be made to work with a linux machine, such as my MythTV machine.
I made it work by hand years ago, but then had no use for it for a while, and a few months ago wanted to make it work again. It turns out that
Adam Pierce has a good set of instructions. But, like all other commenters on that blog post, my setup broke when upgrading to Ubuntu 10.04.
Grrrr.
I have finally found a working combination that hopefully will help others - the suggestions in the blog post were good enough to set me on the right track, but not good enough to make it actually work.
Here's the items that I had to modify by hand over and above my (upgraded) Ubuntu 10.04 setup:
- It turns out that nothing makes the directory /var/run/lirc/, which is where lirc needs to put its socket. So, I have modified /etc/init.d/lirc to add this code block at line 109:
if [ ! -d /var/run/lirc ];then
log_success_msg "/var/run/lirc/ is missing, creating"
mkdir /var/run/lirc
fi
lircd should then be able to start and create a socket called lircd within that directory.
- Nothing creates /dev/lirc. This may not be needed but certainly some of the lirc testing tools expect to find it, so:
cd /dev
ln -s input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00 lirc
- Nothing creates /dev/lircd. This may not be needed, as it is the legacy equivalent of /var/run/lirc/lircd, but I suggest linking it:
cd /dev
ln -s /var/run/lirc/lircd
- You need to modify /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi as per Adam's blog entry.
- As other commenters have noted, the USB ID has changed and lirc needs to be aware of this, so modify /etc/init.d/hardware.conf to contain:
REMOTE="Custom"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00"
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
START_LIRCD="true"
LOAD_MODULES="true"
LIRCMD_CONF=""
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
REMOTE_SOCKET=""
TRANSMITTER_SOCKET=""
- Lastly, and this is the bit that had me stumped, I needed to take the header block from the released lircd.conf.devinput, remove unnecessary sections, and modify it with the keycodes published by Adam's commenters, installed as /etc/lirc/lircd.conf:
# generated by devinput.sh (obsolete 32 bit version)
begin remote
name devinput
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0x8001
gap 132799
toggle_bit_mask 0x0
begin codes
FULLSCREEN 0x0177
POWER 0x0164
1 0x0201
2 0x0202
3 0x0203
4 0x0204
5 0x0205
6 0x0206
7 0x0207
8 0x0208
9 0x0209
RECORD 0x00A7
0 0x0200
FAVORITE 0x016C
REWIND 0x00A8
CH+ 0x0192
FORWARD 0x009F
VOL- 0x0072
PLAY 0x00CF
VOL+ 0x0073
RECALL 0x0198
CH- 0x0193
STOP 0x0080
PAUSE 0x0077
MUTE 0x0071
CANCEL 0x00DF
CAPTURE 0x00D2
PREVIEW 0x016A
EPG 0x016D
RECORDLIST 0x018B
TAB 0x000F
TELETEXT 0x0184
end codes
end remote
The key names in the above file line up nicely with the ones in my mythtv lirc config, and are all-caps versions of what is actually printed on my remote.
All that, and just in time for my Logitech Harmony remote to arrive and have to start again.