Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: 18.04 with infrared how-to ir-keytable-ditching lirc completely

  1. #1
    Join Date
    Jan 2011
    Location
    Retired in Bournemouth UK
    Beans
    427
    Distro
    Kubuntu

    18.04 with infrared how-to ir-keytable-ditching lirc completely

    Since 18.04 was introduced, there have been multiple posts regarding broken infrared lirc and evdev systems.

    There is no definitive tutorial so I thought I'd do one after spending days trying to get my system sorted.

    First of all ensure your ir receiver is recognised; install ir-keytable, which is in the repos, and enter just the command as root on it's own:
    Code:
    ir-keytable
    You should get something similar to this:
    Code:
    root@linuxmint:/home/tony# ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event5) with:
            Name: Media Center Ed. eHome Infrared Remote Transceiver (1784:0008)
            Driver: mceusb, table: rc-rc6-mce
            lirc device: /dev/lirc0
            Supported protocols: other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp 
            Enabled protocols: lirc rc-6 
            bus: 3, vendor/product: 1784:0008, version: 0x0100
            Repeat delay = 500 ms, repeat period = 125 ms
    Once you have established that the receiver is recognised, make a note of:

    1) the event number -- mine is event5 -more on this later.**
    2) the Driver: parameter -- mine is mceusb table: rc-rc6-mce
    3) enabled protocols: mine is lirc rc-6
    4) repeat delay and period -- mine is set to 500ms and 125ms respectively

    At this point completely purge lirc and lircd.
    Code:
    apt-get purge lirc lircd
    There are many places where lirc is lurking (ha) check them all, remove even the slightest traces from /etc, /lib, /usr and /home do not forget /root and /mythtv if you have it installed.

    **Here is a good explanation of how to ensure a persistent event number:https://bbs.archlinux.org/viewtopic.php?id=159020


    Once lirc is no longer lurking we can proceed to the next part, testing your button presses:
    Code:
    ir-keytable -t
    root@linuxmint:/home/tony# ir-keytable -t
    Testing events. Please, press CTRL-C to abort.
    2870.160992: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1
    2870.161011: event type EV_MSC(0x04): scancode = 0x800f0423
    2870.161011: event type EV_KEY(0x01) key_down: KEY_ESC(0x0001)
    2870.161011: event type EV_SYN(0x00).
    ^[2870.264970: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1
    2870.264983: event type EV_MSC(0x04): scancode = 0x800f0423
    2870.264983: event type EV_SYN(0x00).
    2870.376989: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1                                                                                                         
    2870.377005: event type EV_MSC(0x04): scancode = 0x800f0423                                                                                                                 
    2870.377005: event type EV_SYN(0x00).                                                                                                                                       
    2870.508062: event type EV_KEY(0x01) key_up: KEY_ESC(0x0001)                                                                                                                
    2870.508062: event type EV_SYN(0x00).                                                                                                                                       
    2876.976840: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1                                                                                                         
    2876.976863: event type EV_MSC(0x04): scancode = 0x800f0426                                                                                                                 
    2876.976863: event type EV_KEY(0x01) key_down: KEY_S(0x001f)                                                                                                                
    2876.976863: event type EV_SYN(0x00).                                                                                                                                       
    s2877.080862: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1                                                                                                        
    2877.080879: event type EV_MSC(0x04): scancode = 0x800f0426                                                                                                                 
    2877.080879: event type EV_SYN(0x00).                                                                                                                                       
    2877.184866: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1                                                                                                         
    2877.184882: event type EV_MSC(0x04): scancode = 0x800f0426                                                                                                                 
    2877.184882: event type EV_SYN(0x00).                                                                                                                                       
    2877.316061: event type EV_KEY(0x01) key_up: KEY_S(0x001f)                                                                                                                  
    2877.316061: event type EV_SYN(0x00).
    Make a note of the names of the various buttons you want to remap to mythtv, I remapped my stop key to escape for instance.

    I use Double Commander or Thunar to run a root gui file manager, KDE in their infinite stupidity crippled Dolphin.
    (You could always just-)
    Code:
    cp /lib/udev/rc_keymaps/your-remote-here /etc/rc_keymaps/your-remote-here
    Navigate to /lib/udev/rc_keymaps and find the keymapping for your remote. Copy this file to /etc/rc_keymaps and edit the file to remap the keys you require changed.

    Don't forget to reload the evdev events:-
    Code:
    ir-keytable -c -w /etc/rc_keymaps/rc6_mce



    That's it, you can play with mythtv's key mappings and the /etc/rc_keymaps/whatever-your-remote-is
    file to suit your system.

    EDIT: 25 Sep 2019:......Several people have had issues with Mythtv mappings. I forgot to mention that after you do your changes to Mythtv button mappings you need to shutdown the Mythfrontend programme and restart Mythfrontend programme for the changes to be recognised, it is not necessary to reboot-restart your desktop-just logout/in again.

    EDIT 24 Jan 2021.....Updated how-to for Focal and Groovy here: https://ubuntuforums.org/showthread.php?t=2446164

    Have fun, Tony.
    Last edited by vidtek; January 24th, 2021 at 11:50 AM. Reason: additional info
    Asus Z270i7 16gb rm 8tb GT1660 Haupp Quad tunr Kubuntu Jammy/Win 11 Be/FE mythtv 0.34Homerun dual netwk tunr 55¨ Smsng QN95B55" Lap Smsng NP R580 i5 nvidia linux Ultimate/Win 10

  2. #2
    Join Date
    Jul 2012
    Beans
    62

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Quote Originally Posted by vidtek View Post
    At this point completely purge lirc and lircd.
    There are many places where lirc is lurking (ha) check them all, remove even the slightest traces from /etc, /lib, /usr and /home do not forget /root and /mythtv if you have it installed.
    ...
    That's it, you can play with mythtv's key mappings and the /etc/rc_keymaps/whatever-your-remote-is file to suit your system.
    Even though you totally get rid of lirc/lircd I presume you still have to have a lircrc file to map button presses to MythTV functions, is that correct?

  3. #3
    Join Date
    Jan 2011
    Location
    Retired in Bournemouth UK
    Beans
    427
    Distro
    Kubuntu

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Quote Originally Posted by philled View Post
    Even though you totally get rid of lirc/lircd I presume you still have to have a lircrc file to map button presses to MythTV functions, is that correct?
    No phil-just edit the /etc/rc_keymaps/***** file with the button mappings you want in place of the existing file (in my case rc6_mce).

    Together with the mythtv key button mappings you can get any desired button to work on any remote.

    Delete any and all .lircrc files. That is no longer needed because evdev simulates a standard keyboard, hence you don't need it for mythtv.

    It really is that easy.

    Tony.
    Last edited by vidtek; October 12th, 2018 at 09:08 AM.
    Asus Z270i7 16gb rm 8tb GT1660 Haupp Quad tunr Kubuntu Jammy/Win 11 Be/FE mythtv 0.34Homerun dual netwk tunr 55¨ Smsng QN95B55" Lap Smsng NP R580 i5 nvidia linux Ultimate/Win 10

  4. #4
    Join Date
    Jul 2012
    Beans
    62

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Quote Originally Posted by vidtek View Post
    No phil-just edit the /etc/rc_keymaps/***** file with the button mappings you want in place of the existing file (in my case rc6_mce).
    Together with the mythtv key button mappings you can get any desired button to work on any remote.
    Delete any and all .lircrc files. That is no longer needed because evdev simulates a standard keyboard, hence you don't need it for mythtv.
    Thanks Tony, I think I'm being a bit dim here and I'm afraid I don't understand what you mean by "together with the mythtv key button mappings you can get any desired button to work on any remote".

    I'm getting this sort of output from ir-keytable -t
    Code:
    $ sudo ir-keytable -t
    [sudo] password for phill: 
    Testing events. Please, press CTRL-C to abort.
    269.608973: event type EV_MSC(0x04): scancode = 0x800f0422
    269.608973: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
    269.608973: event type EV_SYN(0x00).
    269.714968: event type EV_MSC(0x04): scancode = 0x800f0422
    269.714968: event type EV_SYN(0x00).
    269.980008: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
    269.980008: event type EV_SYN(0x00).
    285.410593: event type EV_MSC(0x04): scancode = 0x800f0414
    285.410593: event type EV_KEY(0x01) key_down: KEY_FASTFORWARD(0x00d0)
    285.410593: event type EV_SYN(0x00).
    285.692011: event type EV_KEY(0x01) key_up: KEY_FASTFORWARD(0x00d0)
    But how do I get KEY_OK to do something when I'm in MythTV? Do I have to go and configure something in MythTV so it knows what to do with KEY_OK, and if so where do I configure that in MythTV? Or do I need to edit my keymaps file /etc/rc_keymaps/rc6_mce so that it returns something other than KEY_OK so that MythTV can respond to it?

    Sorry, I'm sure it's something basic but it's this very last piece of the jigsaw that I just don't understand.

  5. #5
    Join Date
    Jan 2011
    Location
    Retired in Bournemouth UK
    Beans
    427
    Distro
    Kubuntu

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Quote Originally Posted by philled View Post
    Thanks Tony, I think I'm being a bit dim here and I'm afraid I don't understand what you mean by "together with the mythtv key button mappings you can get any desired button to work on any remote".

    I'm getting this sort of output from ir-keytable -t
    Code:
    $ sudo ir-keytable -t
    [sudo] password for phill: 
    Testing events. Please, press CTRL-C to abort.
    269.608973: event type EV_MSC(0x04): scancode = 0x800f0422
    269.608973: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
    269.608973: event type EV_SYN(0x00).
    269.714968: event type EV_MSC(0x04): scancode = 0x800f0422
    269.714968: event type EV_SYN(0x00).
    269.980008: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
    269.980008: event type EV_SYN(0x00).
    285.410593: event type EV_MSC(0x04): scancode = 0x800f0414
    285.410593: event type EV_KEY(0x01) key_down: KEY_FASTFORWARD(0x00d0)
    285.410593: event type EV_SYN(0x00).
    285.692011: event type EV_KEY(0x01) key_up: KEY_FASTFORWARD(0x00d0)
    But how do I get KEY_OK to do something when I'm in MythTV? Do I have to go and configure something in MythTV so it knows what to do with KEY_OK, and if so where do I configure that in MythTV? Or do I need to edit my keymaps file /etc/rc_keymaps/rc6_mce so that it returns something other than KEY_OK so that MythTV can respond to it?

    Sorry, I'm sure it's something basic but it's this very last piece of the jigsaw that I just don't understand.
    OK Phil- What I did was to run my mythtv in a window and the /etc/rc_keymap/rc6_mce file in another window on the same screen. I then ran the mythtv edit key interface and worked out what keys mythtv is mapped to for the different functions. On the other window (I use leafpad as my gui text editor) I have the /etc/rc_keymap/rc6_mce file open for editing.

    I then just edited the file to match what mythtv expected to see. :
    Code:
    # table rc6_mce, type: RC6
    0x800f0400 KEY_0
    0x800f0401 KEY_1
    0x800f0402 KEY_2
    0x800f0403 KEY_3
    0x800f0404 KEY_4
    0x800f0405 KEY_5
    0x800f0406 KEY_6
    0x800f0407 KEY_7
    0x800f0408 KEY_8
    0x800f0409 KEY_9
    0x800f040a KEY_DELETE
    0x800f040b KEY_ENTER
    0x800f040c KEY_SLEEP
    0x800f040d KEY_MEDIA
    0x800f040e KEY_MUTE
    0x800f040f KEY_I
    0x800f0410 KEY_VOLUMEUP
    0x800f0411 KEY_VOLUMEDOWN
    0x800f0412 KEY_PAGEUP
    0x800f0413 KEY_PAGEDOWN
    0x800f0414 KEY_FASTFORWARD
    0x800f0415 KEY_REWIND
    0x800f0416 KEY_PLAY
    0x800f0417 KEY_RECORD
    0x800f0418 KEY_SPACE
    0x800f0419 KEY_STOP
    0x800f041a KEY_NEXTSONG #NEXT
    0x800f041b KEY_PREVIOUSSONG #PREVIOUS
    0x800f041c KEY_NUMERIC_POUND
    0x800f041d KEY_NUMERIC_STAR
    0x800f041e KEY_UP
    0x800f041f KEY_DOWN
    0x800f0420 KEY_LEFT
    0x800f0421 KEY_RIGHT
    0x800f0422 KEY_ENTER
    0x800f0423 KEY_ESC
    0x800f0424 KEY_M #orig dvd-menu mapped to menu
    0x800f0425 KEY_L
    0x800f0426 KEY_S
    0x800f0427 KEY_ZOOM
    0x800f0432 KEY_MODE
    0x800f0433 KEY_PRESENTATION
    0x800f0434 KEY_EJECTCD
    0x800f043a KEY_BRIGHTNESSUP
    0x800f0446 KEY_TV
    0x800f0447 KEY_K  #mapped to music
    0x800f0448 KEY_H
    0x800f0449 KEY_CAMERA #mapped to live tv
    0x800f044a KEY_J
    0x800f044c KEY_LANGUAGE
    0x800f044d KEY_TITLE
    0x800f044e KEY_PRINT
    0x800f0450 KEY_RADIO
    0x800f045a KEY_T
    0x800f045b KEY_F2
    0x800f045c KEY_F3
    0x800f045d KEY_F4
    0x800f045e KEY_F5
    0x800f0465 KEY_POWER2
    0x800f046e KEY_PLAYPAUSE
    0x800f046f KEY_PLAYER
    0x800f0480 KEY_BRIGHTNESSDOWN
    0x800f0481 KEY_PLAYPAUSE
    Attached Files Attached Files
    Asus Z270i7 16gb rm 8tb GT1660 Haupp Quad tunr Kubuntu Jammy/Win 11 Be/FE mythtv 0.34Homerun dual netwk tunr 55¨ Smsng QN95B55" Lap Smsng NP R580 i5 nvidia linux Ultimate/Win 10

  6. #6
    Join Date
    Jul 2012
    Beans
    62

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Thanks Tony. That's solved it. I now have a working remote control with no lirc installed.

  7. #7
    Join Date
    Jul 2017
    Beans
    1

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    I was wondering if you use ir-kytable,what are people using for blasting? I have been trying to understand how this would work under Mythtv..

  8. #8
    Join Date
    Jan 2011
    Location
    Retired in Bournemouth UK
    Beans
    427
    Distro
    Kubuntu

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Quote Originally Posted by greg128662 View Post
    I was wondering if you use ir-kytable,what are people using for blasting? I have been trying to understand how this would work under Mythtv..
    Greg-

    I don't see how it would make any difference, there are many blasters out there, from smartphone apps to dedicated ones like the one included in my Samsung ES8000 television, all a blaster does is to relay the same signals, if it worked with previous iterations of linux and Mythtv, it should just work the same.

    If I understand your question correctly, you are inferring there could be some sort of method within Mythtv for handling a blaster. That is not the way Mythtv's handling of controls works. Mythtv's control system is based purely on keyboard keypresses, Mythtv does not interpret infra-red commands natively. You use the edit keys on the setup page of Mythtv to assign individual keypresses to actions.

    Tony.
    Asus Z270i7 16gb rm 8tb GT1660 Haupp Quad tunr Kubuntu Jammy/Win 11 Be/FE mythtv 0.34Homerun dual netwk tunr 55¨ Smsng QN95B55" Lap Smsng NP R580 i5 nvidia linux Ultimate/Win 10

  9. #9
    Join Date
    Nov 2005
    Beans
    7

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Quote Originally Posted by vidtek View Post
    Greg-

    I don't see how it would make any difference, there are many blasters out there, from smartphone apps to dedicated ones like the one included in my Samsung ES8000 television, all a blaster does is to relay the same signals, if it worked with previous iterations of linux and Mythtv, it should just work the same.

    If I understand your question correctly, you are inferring there could be some sort of method within Mythtv for handling a blaster. That is not the way Mythtv's handling of controls works. Mythtv's control system is based purely on keyboard keypresses, Mythtv does not interpret infra-red commands natively. You use the edit keys on the setup page of Mythtv to assign individual keypresses to actions.

    Tony.
    I too am trying to figure out how to use a blaster with ir-keytable. With lirc I had a blaster section in the lircd.conf file that was used with a channel change script that mythtv would run when it would start a recording on my satellite box. The channel number would be passed to the script which would use irsend to "blast" each number. How would this work with ir-keytable only?

    Thanks

  10. #10
    Join Date
    Mar 2019
    Beans
    2

    Re: 18.04 with infrared how-to ir-keytable-ditching lirc completely

    Good afternoon. I've been struggling for two days with ir-keytable with no luck but I'm afraid that my problem is a bit weird.


    1. I had a working IR in Linux Mint 17, so my mapping script should be fine.
    2. I upgrade to Mint 19 and to my surprise the script didn't work. The mapping was fine, I could see the proper key events when pressing the IR buttons ("using ir-keytable -t" or "xev") but none of those keys could be recognised by any softare (text editor, kodi, console...). Nothing happened as if I wasn't pressing any key. To make things more weird, some mappings worked fine (volume_up, volume_down, arrow keys) but none of the keys that produce a printable character seems to do anything.
    3. I thought it could be a problem related with Mint/XFCE so I tried different desktops, same result. Then I move to Ubuntu/Lubuntu (and again different desktops), same result... (at the moment I'm at Ubuntu 18.04.2 LTS)


    So here I am, pulling my hair out trying to understand what is going on. I have no lirc (clean install of the OS, and it doesn't come installed). Any idea or suggestion?

    EDIT: If I search "find / -name "*lirc*" in my computer this is what I have.

    /sys/class/lirc
    /sys/class/lirc/lirc0
    /sys/devices/pnp0/00:05/rc/rc0/lirc0
    /usr/share/man/man4/lirc.4.gz
    /usr/share/app-install/desktop/gnome-lirc-properties:gnome-lirc-properties.desktop
    /usr/share/app-install/icons/gnome-lirc-properties.svg
    /usr/share/doc/liblirc-client0
    /usr/lib/x86_64-linux-gnu/liblirc_client.so.0
    /usr/lib/x86_64-linux-gnu/liblirc_client.so.0.6.0
    /usr/lib/x86_64-linux-gnu/vlc/plugins/control/liblirc_plugin.so
    /usr/src/linux-headers-4.18.0-16/tools/testing/selftests/bpf/test_lirc_mode2.sh
    /usr/src/linux-headers-4.18.0-16/include/uapi/linux/lirc.h
    /usr/src/linux-headers-4.18.0-16/include/linux/bpf_lirc.h
    /usr/src/linux-headers-4.18.0-16-generic/include/config/lirc.h
    /usr/src/linux-headers-4.18.0-15/tools/testing/selftests/bpf/test_lirc_mode2.sh
    /usr/src/linux-headers-4.18.0-15/include/uapi/linux/lirc.h
    /usr/src/linux-headers-4.18.0-15/include/linux/bpf_lirc.h
    /usr/src/linux-headers-4.18.0-15-generic/include/config/lirc.h
    /dev/lirc0
    /var/lib/dpkg/info/liblirc-client0:amd64.triggers
    /var/lib/dpkg/info/liblirc-client0:amd64.list
    /var/lib/dpkg/info/liblirc-client0:amd64.md5sums
    /var/lib/dpkg/info/liblirc-client0:amd64.shlibs


    Last edited by macarro2; March 22nd, 2019 at 10:09 PM.

Page 1 of 3 123 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
  •