[linux-dvb] Hauppauge IR remote codes & basic C programming

Simon Baxter linuxtv at nzbaxters.com
Thu Apr 27 16:05:43 CEST 2006


>> Darren Salt has done some great work getting extra buttons working, but
>> I'd like to understand better how the IR codes are processed and end up
>> recognised by the modules.  Specifically I need more granular codes from
>> my remote, as it conflicts with my TV remote.
> I have a Nova-T card and this is what I did to get the right
> keys bound to the remote:
>
> 1. look in the file /usr/src/linux/driver/media/dvb/ttpci/budget-ci.c
> there is a key_map array defined, like this...
>
> /* from reading the following remotes:
>   Zenith Universal 7 / TV Mode 807 / VCR Mode 837
>   Hauppauge (from NOVA-CI-s box product)
>   i've taken a "middle of the road" approach and note the differences
> */
> static u16 key_map[64] = {
>        /* 0x0X */
>        KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8,
> ...
>
> 2. replace all the KEY_xxx constants with the number 0, ie
>
> static u16 key_map[64] = {
>        /* 0x0X */
>        0, 0, 0, 0, 0, 0, 0, 0, 0,
>
> and so on.
>
> 3. re-compile the kernel (!) and reboot
>
> 4. press each key on your remote in turn, each press should generate a
> line in /var/log/messages - like this:
> DVB: no key for 2a!
>
> where "2a" will be different for each key - this is the hex value of the
> key's position in the key_map array
>
> 5. replace the 0's you put in the key_map array with KEY_xxx constants
> appropriate to the key on your remote
> eg if pressing 1 on the remote generates the message "no key for 2a!",
> then set entry 42 in the key_map array to KEY_1
>
> 6. re-compile and reboot again

I think I'm going about this all the wrong way.

The problem I'm having is when I hit VOL-UP and VOL-DOWN on my Phillips TV 
remote, it also triggers FF and REW on VDR.  I'd been trying to get more 
granularity, so a key stroke from the Hauppauge remote would generate a 
different, perhaps longer string.

I ran a 'input-event' test, hit the various remote buttons and can confirm 
the IR receiver is differentiating between FF/REW and VOLUP/DOWN.

Maybe there's a problem with VDR?

I'll put a question to the VDR forum...





More information about the linux-dvb mailing list