Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have two HP remotes, one is a huge remote for the TV tuner and media centre, and the other is a tiny remote for just controlling a media centre.

Is it possible to get them to work with Ubuntu (11.04) using LIRC? I know at least one of them is recognized, as I can use one of the buttons to turn the screen off.

What would I need for full support? (The laptop is a HP DV7 1020us, but the remotes are found in just about all the HP laptops from this period).

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

There are two main ways LIRC supports remotes.

One is just via a generic IR receiver. It's possible to "train" these to get a config file, or download one. These just list the pulse timings for each button.

The other means is via an event device - which is the likely mechanism of the remote you've got, since it already has an effect on your machine. This is where the kernel has a driver for this remote, and translates it's pulses into events.

The device is effectively plumbed in as an extra keyboard with some odd keys, some of which have bindings in X. You can use LIRC to add extra bindings to such a device via it's evdev (event device) module.

do

lsmod | grep evdev

And see if the evdev module is loaded - this is often in response to one of these remote receivers. The kernel drivers for these modules usually map the events to the standard set of key codes. Some of the keys might even be in the usual keymap - the remotes I have produce the correct keycodes for numerics, enter, etc - and you can see them inputting keys into applications like any other HID keyboard.

try working out which /dev/input/eventN device your remote is - try looking through your dmesg output ; e/g/

dmesg | grep event

Then run one of the LIRC debug tools, irw

irw /dev/input/eventN # should produce a list of button identifiers when you point and shoot. Once you have this working ...

From here you can configure LIRC to receive certain button presses and send other keys to applications. I have a mixed setup for MythTV - some of the buttons are the values I'd want anyway (OK == ENTER, 0-9, etc) some of them I remap in LIRC (STOP == d for delete).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.