Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-i2c

  1. #1
    Join Date
    Apr 2006
    Location
    Waterloo, ON, Canada
    Beans
    5
    Distro
    Ubuntu 11.04 Natty Narwhal

    Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-i2c

    Hi all,

    I am using a Hauppauge PVR-350 IR receiver and gray Hauppauge remote with MythTV. For Ubuntu 11.04, I could continue to use the lirc_i2c kernel module through building it using lirc-modules-source. However, for Ubuntu 11.10, lirc-modules-source has been removed.

    Here is the process I used to get the remote working again with Ubuntu 11.10 Oneiric using the kernel's input layer and the kernel module ir-kbd-i2c.

    Helpful pages:


    Code:
    # manually load the ir-kbd-i2c kernel module to detect what event device the remote will get (input4 in this case)
    modprobe -v ir-kbd-i2c
    
    tail -n 10 /proc/bus/input/devices
    
    N: Name="i2c IR (Hauppauge WinTV PVR-350"
    P: Phys=i2c-17/17-0018/ir0
    S: Sysfs=/devices/virtual/rc/rc0/input4
    U: Uniq=
    H: Handlers=kbd event4
    B: PROP=0
    B: EV=100013
    B: KEY=10afc312 214201700000000 0 118000 41a800004801 9e16c000000000 10000ffc
    B: MSC=10
    
    # this also works to display input devices
    for i in /sys/class/input/input* ; do echo -n "$(basename "$i"): "; cat "$i/name"; done
    
    # install lirc
    aptitude install lirc
    
    The following NEW packages will be installed:
      libftdi1{a} liblircclient0{a} libportaudio2{a} lirc setserial{a}
    
    Remote control configuration: Linux input layer (/dev/input/eventX)
    IR transmitter, if present: None
    Custom event interface for your dev/input device: (the correct option is not displayed; pick anything)
    
    # edit hardware.conf to add required kernel modules and to correct the input device to the /dev/input/eventX device name displayed by the tail of /proc/bus/input/devices
    
    vi /etc/lirc/hardware.conf
    
    ...
    REMOTE="Linux input layer (/dev/input/eventX)"
    REMOTE_MODULES="ir-kbd-i2c lirc_dev"
    REMOTE_DRIVER="devinput"
    REMOTE_DEVICE="/dev/input/event4"
    ...
    Now update the .lircrc file to use new button key names, e.g. KEY_OK, KEY_UP, KEY_DOWN -- see "/usr/share/lirc/remotes/devinput/lircd.conf.devinput" for a list of the new names.

    Helpful for debugging (ir-keytable is not needed for the remote to work)

    Code:
    # install ir-keytable
    aptitude install ir-keytable
    
    # display the current keytable
    ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event4) with:
            Driver ir-kbd-i2c, table rc-hauppauge
            Supported protocols: RC-5
            Enabled protocols:
            Repeat delay = 500 ms, repeat period = 125 ms
    
    # NOT NEEDED -- the remote works without the protocol being specifically enabled
    ir-keytable -s rc0 --protocol=RC-5
    
    # read keymappings
    ir-keytable -d /dev/input/event4 -r

  2. #2
    Join Date
    Mar 2008
    Location
    London
    Beans
    3
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    I have just finished setting up the same thing so I can use the remote control and IR receiver with my Hauppauge PVR-150 card. Under Ubuntu 10.04 I was using lirc_i2c to allow me to control MythTV with my Hauppauge remote. But since upgrading to 11.04, and then subsequently to 11.10 (dev), I wasn't able to get lirc_i2c working in either.

    I reconfigured lirc to use the "Linux input layer" with ir-kbd-i2c, and then set up my hardware.conf file similar to yours. After restarting lircd, I was then able to test the remote control by running "irw", pressing each key on the remote control and seeing the button name written to the screen, e.g. KEY_UP, KEY_PAUSE etc. I then edited my ~/.mythtv/lircrc file to use those new button names instead of the old button names.

    The problem I had was that after each reboot the input device name would be different, e.g. /dev/input/event5 one time and then /dev/input/event7 the next. It's not very pretty but I edited my hardware.conf file to allow the correct device name to be calculated when lircd starts:

    Code:
    # /etc/lirc/hardware.conf
    #
    #Chosen Remote Control
    REMOTE="Linux input layer (/dev/input/eventX)"
    REMOTE_MODULES="ir-kbd-i2c lirc_dev"
    REMOTE_DRIVER="devinput"
    REMOTE_DEVICE="/dev/input/event`grep -A3 Phys="i2c" /proc/bus/input/devices | grep "Handlers=" | sed 's/.*event\([0-9]\+\)/\1/'`"
    REMOTE_SOCKET=""
    REMOTE_LIRCD_CONF="/usr/share/lirc/remotes/devinput/lircd.conf.devinput"
    REMOTE_LIRCD_ARGS=""
    ...

  3. #3
    Join Date
    Jun 2008
    Beans
    4

    Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    that seems to work quite well, thanks for that.

    problem i'm having though is that while Vol+ and Vol- work fine, i can't seem to get a reaction from Ch+ and Ch-.

    and yes, i use these keynames. KEY_VOLUMEUP doens't work while Vol+ does. i actually have no idea how that's possible because i'm pointing the hardware.conf to the lircd.conf.devinput.

    evtest shows even another name: VolumeUp. where does it get that from? where are the translations from the scancodes to the keynames exactly defined.
    does anybody know a link where the right route is laid out of the config files the thing goes through before it gets to the .lircrc? that may be very helpful. i'm not sure where things go wrong atm.

  4. #4
    Join Date
    Apr 2006
    Location
    Waterloo, ON, Canada
    Beans
    5
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    Hi brugh,

    1. Does /etc/lirc/lircd.conf include the standard devinput file /usr/share/lirc/remotes/devinput/lircd.conf.devinput?

    2. Here is what I have in my .lircrc file for channel and volume key names:

    # Channel Up
    begin
    prog = mythtv
    button = KEY_CHANNELUP
    repeat = 3
    config = Up
    end

    # Channel Down
    begin
    prog = mythtv
    button = KEY_CHANNELDOWN
    repeat = 3
    config = Down
    end

    ...

    # Volume up
    begin
    prog = mythtv
    button = KEY_VOLUMEUP
    repeat = 1
    config = ]
    end

    # Volume down
    begin
    prog = mythtv
    button = KEY_VOLUMEDOWN
    repeat = 1
    config = [
    end
    Regards,
    Tim

  5. #5
    Join Date
    Jun 2008
    Beans
    4

    Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    my /etc/init.d/hardware.conf says this:

    REMOTE="Linux input layer (/dev/input/eventX)"
    REMOTE_MODULES="ir-kbd-i2c lirc_dev"
    REMOTE_DRIVER="devinput"
    REMOTE_DEVICE="/dev/input/event9"
    REMOTE_SOCKET=""
    REMOTE_LIRCD_CONF="/usr/share/lirc/remotes/devinput/lircd.conf.devinput"
    REMOTE_LIRCD_ARGS=""
    and my /etc/init.d/lircd.conf says this:

    include "/usr/share/lirc/extras/more_remotes/hauppauge/lircd.conf.hauppauge"
    and the lircd.conf.hauppauge has several remotes defined like "Hauppauge" and "hauppauge_pvr".
    the latter used to be the one detected in 11.04 and earlier.

    the lircd.conf.hauppauge says this:
    begin codes
    Power 0x00000000000017FD
    Go 0x00000000000017FB
    1 0x00000000000017C1
    2 0x00000000000017C2
    3 0x00000000000017C3
    4 0x00000000000017C4
    5 0x00000000000017C5
    6 0x00000000000017C6
    7 0x00000000000017C7
    8 0x00000000000017C8
    9 0x00000000000017C9
    Back/Exit 0x00000000000017DF
    0 0x00000000000017C0
    Menu 0x00000000000017CD
    Red 0x00000000000017CB
    Green 0x00000000000017EE
    Yellow 0x00000000000017F8
    Blue 0x00000000000017E9
    Ch+ 0x00000000000017E0
    Ch- 0x00000000000017E1
    Vol- 0x00000000000017D1
    Vol+ 0x00000000000017D0
    Ok 0x00000000000017E5
    Mute 0x00000000000017CF
    Blank 0x00000000000017CC
    Full 0x00000000000017FC
    Rewind 0x00000000000017F2
    Play 0x00000000000017F5
    Forward 0x00000000000017F4
    Record 0x00000000000017F7
    Stop 0x00000000000017F6
    Pause 0x00000000000017F0
    Replay 0x00000000000017E4
    Skip 0x00000000000017DE
    end codes
    which might explain why KEY_VOLUMEUP doesn't work for my while Vol+ does. However, Ch+ doesn't work while that's defined in exactly the same way. and it worked fine with 11.04 and earlier. with 'evtest' i checked that the signals are getting through, scancodes and all. it's calling them 'ChannelUp' though and i have no idea where the 1f21 scancode gets translated into the code from lircd.conf.hauppauge. that's where i could really use some pointers to get the remote to work properly again.

    any ideas?

  6. #6
    Join Date
    Apr 2006
    Location
    Waterloo, ON, Canada
    Beans
    5
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    Hi brugh,

    I don't have a /etc/init.d/hardware.conf file at all.

    For /etc/lirc/lircd.conf, you are using the hauppauge specific configuration file, but I believe you want to use the devinput event layer version.

    cat /etc/lirc/lircd.conf
    #This configuration has been automatically generated via
    #the Ubuntu LIRC package maintainer scripts.
    #
    #It includes the default configuration for the remote and/or
    #transmitter that you have selected during package installation.
    #
    #Feel free to add any custom remotes to the configuration
    #via additional include directives or below the existing
    #Ubuntu include directives from your selected remote and/or
    #transmitter.

    #Configuration for the Linux input layer (/dev/input/eventX) remote:
    include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"
    The event layer already appears to have a specific parsing table for hauppauge remotes as ir-keytable reports the ir-kbd-i2c driver is using a table called rc-hauppauge:

    aptitude install ir-keytable
    ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event4) with:
    Driver ir-kbd-i2c, table rc-hauppauge
    Supported protocols: RC-5
    Enabled protocols:
    Repeat delay = 500 ms, repeat period = 125 ms

  7. #7
    Join Date
    Apr 2006
    Location
    Waterloo, ON, Canada
    Beans
    5
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    Sorry, you were talking about /etc/lirc/hardware.conf.

    Here is what I have:

    ...
    REMOTE="Linux input layer (/dev/input/eventX)"
    REMOTE_MODULES="ir-kbd-i2c lirc_dev"
    REMOTE_DRIVER="devinput"
    REMOTE_DEVICE="/dev/input/event4"
    ...
    event4 is what my system uses but other systems may have different eventN device names.

  8. #8
    Join Date
    Jun 2008
    Beans
    4

    Cool Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    ah yes, i ment /etc/lirc, not /etc/init.d ofcourse

    i'm still somewhat confused though. you're right about it using its own keymap. the rc-hauppauge keymap gets loaded with the kernel module with the same name. i had a look at the source and the scancodes match what i see reported with evtest.

    but when i look at the keynames, they're all in uppercase, starting with KEY_ .. but when i use that in .lircrc i get no reaction. only when i use Vol+ style names can i get some kind of reaction, just not from all the buttons.

    so there must be something else happening between the kernel driver pushing out the KEY_ style names and the lircd matching that with the .lircrc button names. i can't think of anything that may interrupt this pretty straight forward button mapping but somehow it doesn't work for me..

    any ideas what is causing this? as i said, it's getting more confusing every time i look at it

  9. #9
    Join Date
    Jun 2008
    Beans
    4

    Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    also, if the rc-hauppage.ko has the scancodes and keynames already, why does lirc still need the /etc/lirc/lircd.conf file. i have no conf file in /usr/share/lirc that uses the same scancodes as rc-hauppauge.ko. the file that's included in /etc/lirc/lircd.conf uses codes 10xx and 17xx while the rc-hauppauge.ko uses 1fxx codes, the same that 'evtest' reports. still Vol+ somehow works and i'm getting less and less ideas on how that's actually happening.

  10. #10
    Join Date
    Nov 2011
    Beans
    1

    Smile Re: Get Hauppauge PVR-350 IR receiver to work with Ubuntu 11.10 Oneiric using ir-kbd-

    Hello brugh,

    I also wasted some hours on my way to get the remote working. After a lot of search I found this discussion here. With this help I managed it to get the remote perfectly working!
    (my thanks to thdyck and ravenp!)

    Curiously after a reboot my remote didn't work anymore.
    Again I used irw and pressed some number keys of the remote to see, what's going on:

    root@beetle:/# irw
    88531
    ^C
    dammed!
    I checked all files again, nothing has changed, everything seems to be okay.
    After a while I just tried to give lirc a restart ...

    root@beetle:/# /etc/init.d/lirc restart
    * Stopping remote control daemon(s): LIRC [ OK ]
    * Loading LIRC modules [ OK ]
    * Starting remote control daemon(s) : LIRC [ OK ]

    root@beetle:/# irw
    0000000080010009 00 KEY_8 devinput
    0000000080010008 00 KEY_7 devinput
    0000000080010003 00 KEY_2 devinput
    0000000080010192 00 KEY_CHANNELUP devinput
    000000008001001c 00 KEY_ENTER devinput
    ^C
    wtf!? irw shows the right names now!

    Finally I checked it again:
    - rebooting -> irw -> got wrong keynames.
    - just restarting lirc -> everything is fine!

    Im not shure what's going on. Perhabs I have messed up the security settings for one of the files. But the restart of lirc will help me out until I can find the misstake.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •