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

Simon Baxter linuxtv at nzbaxters.com
Sat Apr 29 07:06:22 CEST 2006


>I demand that Simon Baxter may or may not have written...
>
>>> (Don't worry if you see 37fd or 37bd. That's normal; bit 11 is toggled 
>>> by
>>> the remote control on each new key press. Bits 12 to 15 are fixed; bits 
>>> 0
>>> to 5 are the key code.)
>
>>> Plugging the numbers into ((value >> 6) & 0x1F), we get 0x1F and 0x1E.
>
>> Sorry, I'm confused.  How do we arrive at 0x1F and 0x1E ?
>
>  $ printf %#x\\n $(((0x37fd >> 6) & 0x1F))
>  0x1f
>  $ printf %#x\\n $(((0x37bd >> 6) & 0x1F))
>  0x1e
>  $
>
> The numbers are pulled from the "biphase decoded" lines in the kernel 
> message
> buffer.
>
>> Here's where I'm up to now:
>
>> [root at media ~]# echo 1 >/sys/module/cx88xx/parameters/ir_debug
>> [root at media ~]# input-events -t 240 2
>> /dev/input/event2
>>    bustype : BUS_PCI
>>    vendor  : 0x70
>>    product : 0x9002
>>    version : 1
>>    name    : "cx88 IR (Hauppauge Nova-T DVB-T"
>>    phys    : "pci-0000:00:0a.2/ir0"
>>    bits ev : EV_SYN EV_KEY EV_REP
> [snip]
>> ------------>>>  above:  Hit the 'menu' key on the R808, and then the
>> 'mute' key on my Phillips TV remote
>
>> and the 'dmesg' for that action:
>
>> cx88[0] IR: biphase decoded: 3fcd
> [snip repeat then 2×0x37fd]
>
> => 0x1F.
>
>> cx88[0] IR: biphase decoded: 300d
> [snip repeat then 2×0x380d]
>
> => 0x00.
>
> [snip]
>> 3fcd/37cd = Hauppauge menu button
>> 300d/380d = Phillips mute button
>
> That looks about right.
>
>> ------------>>>  above:  As you can see, the cx88xx is seeing different
>> codes, but the IR decode is seeing it as the same keystroke...
>
> Yes; your module isn't checking bit 11. The attached patch (apply on top 
> of
> my other cx88-input patch) should fix this.


OK - all done.  My R808 remote now works and does not conflict with my 
Phillips TV remote.

Attached is the combination of all patches, provided by Darren Salt..

Thanks again Darren!! 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cx88-input_R808.patch
Type: application/octet-stream
Size: 1938 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20060428/b51b9c5d/cx88-input_R808.obj


More information about the linux-dvb mailing list