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

Simon Kilvington s.kilvington at eris.qinetiq.com
Thu Apr 27 12:55:20 CEST 2006

Hash: SHA1

Simon Baxter wrote:
> Hi
> I'm trying to get some more granluarity on the IR codes produced by my
> remote and WinTV Nova-T card.
> 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.
> Darren's patch
> http://www.youmustbejoking.demon.co.uk/progs/linux/dvb-ir-20060401.patch.tar.gz
> I think was written for an A415 remote, but this patch stops any codes
> appearing while monitoring 'input-events 2'.  My remote is a Grey
> R808-HPG-S 0604 002568.
> My c programming is very poor.  What does the command 'ir->sampling =
> (0x1E<<6) | 1'   do??  Is 'ir->sampling' a variable? (can you have '-' &
> '>' in a variable????)
> If so, and his A415 remote generates 0x16 to 0x1E (if this is what this
> means), how do I find out what my remote sends?
> Also, what does 'ir->release = jiffies + msecs_to_jiffies(120)'  do?
> Finally, is there any app that will decode ALL IR codes received, or do
> the expected codes need to be compiled into the modules - from
> manufacturer datasheets or something??
> Can anyone help?
> _______________________________________________
> linux-dvb mailing list
> linux-dvb at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


	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

- --
Simon Kilvington

Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the linux-dvb mailing list