Friday, March 10, 2006

Friday, 8th Week: 1.27AM - Nova-T Linux Howto

As posted on the Hauppauge UK forums - but I thought I'd post it here, if only so that I can reference it in future. Nova-T Linux users, ever wanted to get your remote control working just like (in fact, better than) it does in Windows? Here's how.

OK, Linux-babble ahead.

The kernel recognises some of the buttons and generates keyboard events for them. However, the keymap in the kernel is incomplete for the Nova-T remote. Fortunately, the remote's events are also sent to /dev/input/eventx for some x.

Right, so how to go about getting the remote working?

The key is: lirc. This wonderful (if confusingly-documented and fiddly to set up) piece of software can listen to the /dev/input/eventx device, and turn them into keypresses.

I compiled from source, which in this case is probably easier (if you're comfortable with it). Download from the website at http://www.lirc.org/ and follow the included instructions to compile - the important bit is to select "Linux input layer" as the driver when you run setup.sh. Find it in Driver Configuration -> Other. Then sudo make install.

Lucky for you, I'm able to save you the whole irrecord/getting a config file working trouble. I've attached my lircd.conf file - copy this to /etc, without the .txt extension. Once this file is in place, you can start lircd: but, there's a trick here.

$ cd /dev/event
$ cat input3
(you may need to use sudo)
Then press a button on your remote control. With any luck, you will get something like
8D"
HD&
Dz
HD
8Dx
HD}
D
HD
DRD0DxRD}D
Yup, rubbish, but it means that you've found the right device. If you just get a number, then Ctrl+C out and try a different number. REMEMBER THIS NUMBER.

You can now start lircd (again, you may need to be root).

$ lircd -H dev/input -d /dev/input/eventx

where x is that important number I said to remember.

Next, install IRKick - this is the interface between KDE and lircd. With lircd running (eg after you've run the above command), start IRKick, and it should (after perhaps a few seconds delay) give you a message that it's found the lircd server.

Now, the fun begins! You can right-click the IRKick icon in the system tray, and choose Configure. Then you can configure all sorts of fancy functions for your remote - have a play. Kaffeine is one of the apps it recognises and will let you configure especially.

Sorry for the slightly bizarre tone of this howto - it's the second night in a row I've been working until gone 1am, and it's starting to affect my sanity.


Footnotes:

It's probably possible to automate the starting of lircd. However, I use Kubuntu, which has the habit of assigning everything in /dev/input different event numbers each time the computer loads. And so, occasionally, I put the wrong number in and lose control of the keyboard. I guess that playing with udev(?) may help, but I haven't fiddled yet.

I've got this working under Kubuntu 5.10, with kernel 2.6.12-9 and -10. I think the DVB support (or at least, Nova-T support) was broken in 2.6.10 and 2.6.11.

IRKick is a KDE program. I don't know if it'll run under Gnome, or if there's an equivalent available.

No comments: