Demystify behaviour of IR-Remote Control - Hardware

This is a discussion on Demystify behaviour of IR-Remote Control - Hardware ; Hi. I have a Hauppauge AVR TV-Card. It came with a IR-Remote Control, that I'd like to use. But when I want to scan Keycodes, so that I can assign them to a symbol, I get quite different readings. When ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Demystify behaviour of IR-Remote Control

  1. Demystify behaviour of IR-Remote Control

    Hi.

    I have a Hauppauge AVR TV-Card.
    It came with a IR-Remote Control, that I'd like to use.

    But when I want to scan Keycodes, so that I can assign them to a symbol,
    I get quite different readings.

    When I use xev, some keys appear non-functional.

    When I use showkey on a text-terminal, I get readings from all keys,
    when I use showkey in --keycodes mode.

    When I use showkey in --scancodes mode, I get readings only from those
    keys, that I get readings from with xev under X.

    The keycodes that I get with showkey -k and xev are all different, i
    guess, because X reads the hardware key and assigns his own keycodes.

    Now, from running showkey -k I do know, that all keys on my remote
    control are functional.

    But how do I make them usable?

    please help

    --polemon

    --
    -EOF-

  2. Re: Demystify behaviour of IR-Remote Control

    polemon staggered into the Black Sun and said:
    > I have a Hauppauge AVR TV-Card. It came with an IR-Remote Control
    > that I'd like to use. But when I want to scan Keycodes, so that I can
    > assign them to a symbol, I get [very] different readings.


    Which LIRC module are you using to drive this remote? Or are you using
    a kernel module instead? Which version of the kernel are you using?
    What's the model# of this remote? (The old LIRC approach was, IMHO, a
    bit easier to configure if your apps were built with LIRC support.)

    > When I use xev, some keys appear non-functional. When I use showkey
    > on a text-terminal, I get readings from all keys. When I use showkey
    > in --scancodes mode, I get readings only from those keys that I get
    > readings from with xev under X.


    showkey dumps keycodes (not scancodes) by default. It's possible that
    your keymap doesn't define mappings for some of the keycodes that are
    being used. Which keymap are you using?

    > The keycodes that I get with showkey -k and xev are all different


    Yep. X and virtual consoles handle keycodes differently, big surprise.

    > From running showkey -k I know that all keys on my remote control are
    > functional. But how do I make them usable?


    "Use xmodmap to map keycodes to appropriate KeySyms" is one thing that
    might work. FWIW, with the ati_remote2 module, all keys on my ATI
    Remote Wonder 2 remote produce keycodes and scancodes within X, and the
    mouse works better than it did with LIRC. However, configuring mplayer
    and xine to do appropriate things with the remote's buttons is now more
    annoying. Win some lose some. HTH anyway,

    >
    > please help
    >
    > --polemon
    >



    --
    "Which you then convert to gold, non-perishable food, firearms, good
    liquor & a secluded hideaway in the last of the internet official
    protocol standards" -- MegaHAL (trained on ASR), 1998-11-05
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see

  3. Re: Demystify behaviour of IR-Remote Control

    On 05/10/2007 11:38 PM, Dances With Crows wrote:
    > polemon staggered into the Black Sun and said:
    >> I have a Hauppauge AVR TV-Card. It came with an IR-Remote Control
    >> that I'd like to use. But when I want to scan Keycodes, so that I can
    >> assign them to a symbol, I get [very] different readings.

    >
    > Which LIRC module are you using to drive this remote? Or are you using
    > a kernel module instead? Which version of the kernel are you using?
    > What's the model# of this remote? (The old LIRC approach was, IMHO, a
    > bit easier to configure if your apps were built with LIRC support.)


    I don't use LIRC, I use the cx88... modules for my Hauppauge TV-Tuner card.
    Model# of the Remote? Good question... There's a tiny sticker in the
    battery compartement, it says "A415-HPG". No idea if that's the model
    number, though. My Kernel version is 2.6.20-1.

    >> When I use xev, some keys appear non-functional. When I use showkey
    >> on a text-terminal, I get readings from all keys. When I use showkey
    >> in --scancodes mode, I get readings only from those keys that I get
    >> readings from with xev under X.

    >
    > showkey dumps keycodes (not scancodes) by default. It's possible that
    > your keymap doesn't define mappings for some of the keycodes that are
    > being used. Which keymap are you using?


    I know about showkey dumping keycodes by default, that's why I
    emphasized on the command line option...

    I use DE with Sun-Deadkeys as keymap


    >> The keycodes that I get with showkey -k and xev are all different

    >
    > Yep. X and virtual consoles handle keycodes differently, big surprise.

    Hmm, yeah, that was my guess.

    >> From running showkey -k I know that all keys on my remote control are
    >> functional. But how do I make them usable?

    >
    > "Use xmodmap to map keycodes to appropriate KeySyms" is one thing that

    This does not work, since not every key, sends a keycode.
    And having 16 non-functional Keys on my remote, is not acceptable...

    > might work. FWIW, with the ati_remote2 module, all keys on my ATI
    > Remote Wonder 2 remote produce keycodes and scancodes within X, and the

    Well, mine doesn't...

    > mouse works better than it did with LIRC. However, configuring mplayer
    > and xine to do appropriate things with the remote's buttons is now more
    > annoying. Win some lose some. HTH anyway,

    I plan to use the XF86xx keymappings, this shouldn't be much of a
    proble, then.

    I've assigned functions to the keys that do work allready with xmodmap,
    works fine.
    But I still have 16 numb keys on my remote!

    Thanks for the help so far, though.


    --
    -EOF-

  4. Re: Demystify behaviour of IR-Remote Control

    I discovered something else:

    In: /proc/bus/input/devices:

    I: Bus=0001 Vendor=0070 Product=9402 Version=0001
    N: Name="cx88 IR (Hauppauge WinTV-HVR110"
    P: Phys=pci-0000:05:06.2/ir0
    S: Sysfs=/class/input/input3
    H: Handlers=kbd event3
    B: EV=100003
    B: KEY=100fc312 214a80200000000 0 18000 41a800004801 9e168000000000 10000ffc

    line 'H' shows the event handler, so I catted /dev/input/event3, and
    when I press any button on my remote, data comes out, even the
    (seemingly) non-functional keys.

    If I could just make X 'grab' those keys...

    --
    -EOF-

  5. Re: Demystify behaviour of IR-Remote Control

    I demand that polemon may or may not have written...

    > On 05/10/2007 11:38 PM, Dances With Crows wrote:


    (October already? How time flies...)

    >> polemon staggered into the Black Sun and said:
    >>> I have a Hauppauge AVR TV-Card. It came with an IR-Remote Control
    >>> that I'd like to use. But when I want to scan Keycodes, so that I can
    >>> assign them to a symbol, I get [very] different readings.

    >> Which LIRC module are you using to drive this remote? Or are you using
    >> a kernel module instead? Which version of the kernel are you using?
    >> What's the model# of this remote? (The old LIRC approach was, IMHO, a
    >> bit easier to configure if your apps were built with LIRC support.)


    > I don't use LIRC, I use the cx88... modules for my Hauppauge TV-Tuner card.


    The two are not mutually exclusive. I have two Nova-T cards. cx88xx provides
    the input devices corresponding to the cards' IR sensors, and LIRC has a
    dev/input method; I use it with one of the cards (the other's IR sensor is
    not connected).

    > Model# of the Remote? Good question... There's a tiny sticker in the
    > battery compartement, it says "A415-HPG". No idea if that's the model
    > number, though.


    A415 - that's the model no., AFAIK. I wouldn't expect there to be a model
    hash. ;-)

    > My Kernel version is 2.6.20-1.


    Which means little without knowing which distribution, although it's probably
    plain 2.6.20.

    >>> When I use xev, some keys appear non-functional. When I use showkey
    >>> on a text-terminal, I get readings from all keys. When I use showkey
    >>> in --scancodes mode, I get readings only from those keys that I get
    >>> readings from with xev under X.

    >> showkey dumps keycodes (not scancodes) by default. It's possible that
    >> your keymap doesn't define mappings for some of the keycodes that are
    >> being used. Which keymap are you using?


    > I know about showkey dumping keycodes by default, that's why I
    > emphasized on the command line option...


    > I use DE with Sun-Deadkeys as keymap


    That's not relevant. Each input device has its own keymap, and that keymap
    only applies to the keyboard.

    [snip]
    >>> From running showkey -k I know that all keys on my remote control are
    >>> functional. But how do I make them usable?

    >> "Use xmodmap to map keycodes to appropriate KeySyms" is one thing that
    >> might work.


    > This does not work, since not every key, sends a keycode.
    > And having 16 non-functional Keys on my remote, is not acceptable...


    Some of the default key codes won't be passed on by X to applications; so
    either you use input-kbd (input-utils again) to redefine the mappings or you
    use LIRC.

    [snip]
    --
    | Darren Salt | linux or ds at | nr. Ashington, | Toon
    | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
    | + Travel less. Share transport more. PRODUCE LESS CARBON DIOXIDE.

    What do you get if you multiply six by nine?

  6. Re: Demystify behaviour of IR-Remote Control

    On 05/11/2007 02:27 AM, Darren Salt wrote:
    >> On 05/10/2007 11:38 PM, Dances With Crows wrote:

    >
    > (October already? How time flies...)


    en_US

    [...]
    >>>> From running showkey -k I know that all keys on my remote control are
    >>>> functional. But how do I make them usable?
    >>> "Use xmodmap to map keycodes to appropriate KeySyms" is one thing that
    >>> might work.

    >
    >> This does not work, since not every key, sends a keycode.
    >> And having 16 non-functional Keys on my remote, is not acceptable...

    >
    > Some of the default key codes won't be passed on by X to applications; so
    > either you use input-kbd (input-utils again) to redefine the mappings or you
    > use LIRC.


    I tried using LIRC (recorded my own keycodes and all but it is not
    satisfactory, since I can't actually emulate XF86... Keycodes.

    When I run IRKick (KDE) the previously available Keycodes become
    unavailable.

    What I'd like, is some sort of duality, like sending keycodes for some
    of the buttons on the remote (like the numpad or the media-keys, play,
    stop, etc) and some of the LIRC functionality at the same time
    (accessing application functions, changing remote-modes, etc).

    But if that's not possible, I'd prefer to redefine my key-mappings.
    I how can I do this? Input-kbd is not in the repos of Fedora, so isn't
    input-utils...

    Thanks in advance,

    --polemon

    --
    -EOF-

  7. Re: Demystify behaviour of IR-Remote Control

    I demand that polemon may or may not have written...

    [snip]
    > What I'd like, is some sort of duality, like sending keycodes for some of
    > the buttons on the remote (like the numpad or the media-keys, play, stop,
    > etc) and some of the LIRC functionality at the same time (accessing
    > application functions, changing remote-modes, etc).


    Not really practical - at least, not directly. OTOH, whether that's a more
    useful way of handling it depends on what exactly you want to do with it. (I
    use plain LIRC.)

    > But if that's not possible, I'd prefer to redefine my key-mappings. I how
    > can I do this? Input-kbd is not in the repos of Fedora, so isn't
    > input-utils...


    http://ftp.debian.org/debian/pool/ma...28.orig.tar.gz

    (Upstream doesn't seem to have anything called "input-utils".)

    --
    | Darren Salt | linux or ds at | nr. Ashington, | Toon
    | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
    | Let's keep the pound sterling

    Prune yoghurt. For that "get up and go" feeling.

+ Reply to Thread