How do I configure LIRC with changing lirc_option file?

  • Hello,

    I have a Intel NUC PC with a Nuvoton w836x7hg Infrared Remote Transceiver

    How do I configure "/etc/lirc/lirc_options.conf" becuase it is not allowed to write "/etc/lirc/lirc_options.conf" directly?

    And how is the setting for the "Nuvoton w836x7hg Infrared Remote Transceiver" ?

    Thanks

  • Something doesn't add up here.

    Your on-board Nuvoton w836x7hg is supported by linux kernel RC subsystem and should work with ir-keytable / rc_maps.cfg configuration, as described in the wiki.

    However the uirt2 driver you mentioned is an external USB device and has nothing to do with the on-board nuvoton.

    so long,

    Hias

  • Something doesn't add up here.

    Your on-board Nuvoton w836x7hg is supported by linux kernel RC subsystem and should work with ir-keytable / rc_maps.cfg configuration, as described in the wiki.

    However the uirt2 driver you mentioned is an external USB device and has nothing to do with the on-board nuvoton.

    so long,

    Hias

    YOu a correct I was wrong. I have an atric usb wake up and want to use this one for the IR functionality now....Sorry I mixed it up

  • If you really want you can still use lirc on LibreELEC, this is described at the end of the wiki page. Copy lirc_options.conf to /storage/.config and change only the driver/device settings and create an empty rc_maps.cfg file in that directory, too. lircd.conf goes into /storage/.config as well.

    However it might be easier if you configured your Atric dongle only for wakeup and use the on-board nuvoton as main IR receiver in LE (configured via ir-keytable).

    so long,

    Hias

  • If you really want you can still use lirc on LibreELEC, this is described at the end of the wiki page. Copy lirc_options.conf to /storage/.config and change only the driver/device settings and create an empty rc_maps.cfg file in that directory, too. lircd.conf goes into /storage/.config as well.

    However it might be easier if you configured your Atric dongle only for wakeup and use the on-board nuvoton as main IR receiver in LE (configured via ir-keytable).

    so long,

    Hias

    Ok so far I got it

    Code
    irw /run/lirc/lircd.socket
    0000a758fe000000 00 KEY_UP sundtek
    0000ed12fe000000 00 KEY_DOWN sundtek
    0000ed12fe000000 00 KEY_DOWN sundtek
    0000ed12fe000000 00 KEY_DOWN sundtek
    0000ed12fe000000 00 KEY_DOWN sundtek
    0000ed12fe000000 00 KEY_DOWN sundtek

    and how can I now map KEY_UP to an action in kodi? for example it should be the same like cursor up on a keyboard.


    my rc_maps.cfg is currently empty

    Edited once, last by milo (November 8, 2020 at 7:10 PM).

  • Make sure lircd-uinput is running - if you restarted lircd you'll also need to restart lircd-uinput, or just reboot your system.

    Then you should also see button presses on /run/lirc/lircd (via irw) where kodi picks them up from.

    so long,

    Hias

  • Make sure lircd-uinput is running - if you restarted lircd you'll also need to restart lircd-uinput, or just reboot your system.

    Then you should also see button presses on /run/lirc/lircd (via irw) where kodi picks them up from.

    so long,

    Hias

    I see the following processes

    Code
     315 root      0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd                                                       359 root      0:00 /usr/sbin/lircd -O /storage/.config/lirc_options.conf --nodaemon /storage/.config/lircd.conf

    But if I press key down nothing happens in Kodi itself.

    And it looks like the socket is different to

    irw /run/lirc/lircd.socket

    Is this normal?

  • No, that's not normal, lircd-uinput is missing in the process list. It should look like this:

    Code
    LibreELEC:~ # ps | grep lirc
      316 root      0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
      448 root      0:00 /usr/sbin/lircd -O /storage/.config/lirc_options.conf --nodaemon /storage/.config/lircd.conf
      450 root      0:00 /usr/sbin/lircd-uinput -O /storage/.config/lirc_options.conf --add-release-events
      846 root      0:00 grep lirc

    Post the output of systemctl status lircd-uinput and make sure you didn't mess around with lircd after reboot (i.e. no killall lircd or systemctl stop lircd, this will break lirc operations).

    so long,

    Hias

  • No, that's not normal, lircd-uinput is missing in the process list. It should look like this:

    Code
    LibreELEC:~ # ps | grep lirc
      316 root      0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
      448 root      0:00 /usr/sbin/lircd -O /storage/.config/lirc_options.conf --nodaemon /storage/.config/lircd.conf
      450 root      0:00 /usr/sbin/lircd-uinput -O /storage/.config/lirc_options.conf --add-release-events
      846 root      0:00 grep lirc

    Post the output of systemctl status lircd-uinput and make sure you didn't mess around with lircd after reboot (i.e. no killall lircd or systemctl stop lircd, this will break lirc operations).

    so long,

    Hias

    Code
    ● lircd-uinput.service                                                       Loaded: masked (Reason: Unit lircd-uinput.service is masked.)             Active: inactive (dead)
    
     systemctl start lircd-uinput
    Failed to start lircd-uinput.service: Unit lircd-uinput.service is masked.