Lirc - support of any IR devices

  • Hello!

    I am using LE 7.0.3 in various installations of RPi2, with various remotes (from old VCR, old TV's etc.) via raw codes

    recorded simply via

    Code
    config.txt: dtoverlay=lirc-rpi
    
    systemctl stop eventlircd.service
    systemctl stop kodi.service
    killall lircd
    ir-keytable -p lirc
    rm /storage/.config/lircd.conf
    irrecord -f /storage/.config/lircd.conf
    reboot now

    Works out of the box, for all remotes (its just matter of choose correct freq. IR diode).

    Now, due to slowly switching to the x265, I plan to build first PoC based on Odroid C2. I am afraid I cant use 7.0.3 here, so I will must use some of recent versions (and hope there will be no problem with HDMI passthrough to the receiver, HDMI-CEC etc.).

    I am a bit frightened by the "IR changes". Is it possible to use some procedure, or there is need to set up something differently? I think I once tried (but it was quite long ago) gpio-ir with Rpi just for curiosity, but it doesnt work for me..

    Thank you in advance, I bet, that this must be interesting also for others..

    Edited 2 times, last by JimmySmith (December 31, 2018 at 9:51 AM).

  • You can still use lirc if you want or need to. Just make sure to disable in-kernel decoding as described in the wiki.

    In LE9 lirc will automatically start if your have a /storage/.config/lircd.conf file (in LE8 you had to enable it in LE settings).

    so long,

    Hias

  • Thats great news. Thank you!

    "make sure to disable in-kernel decoding" is this,

    Code
    : > /storage/.config/rc_maps.cfg

    or you mean create (even dummy) /storage/.config/lircd.conf, then reboot to be even able record something by commands above? Just to be sure, pardon me if its dumb question, I am trying to understand the wiki page.

    as

    Quote

    Although lircd disables all remote protocols on startup (and thus disables in-kernel decoding)

    I understand as disable in-kernel decoding means by running lircd

    and then

    Quote

    lircd will now be started automatically if the /storage/.config/lircd.conf file is present.

    would suggest that when I record lircd.conf and reboot, kernel decoding should be disabled..

    P.S.: Perhaps would be usefull add the record procedure to the wiki page also..

    Edited 3 times, last by JimmySmith (November 16, 2018 at 12:56 PM).

  • You can still use lirc if you want or need to. Just make sure to disable in-kernel decoding as described in the wiki.

    In LE9 lirc will automatically start if your have a /storage/.config/lircd.conf file (in LE8 you had to enable it in LE settings).

    so long,

    Hias

    I hit on the big issue. I copied lircd.conf, restart LE9 and it works.. BUT! only for Odroid C2 internal IR RX diode..

    I need to "cable" my IR RX using GPIO pins, as I did it on Rpi2.

    I follow official guide, and according this, the GPIO is set to live by

    Code
    [modinit]
    code = /sbin/modprobe gpio-ir-recv
    code1 = /sbin/modprobe gpioplug-ir-recv gpio_nr=249 active_low=1

    But lirc_options.conf isnt linked to /storage from /etc/lirc (so this file is permanent), and in file I can even see

    Code
    # modinit is not supported in LibreELEC

    Is there anything I can do for enable GPIO IR support on Odroid C2 ?

    What I am suppose to do? In Rpi its worked through

    dtoverlay=lirc-rpi

    But

  • You can override lirc_options.conf with your own setting via /storage/.config/lirc_options.conf - see the wiki Infrared Remotes [LibreELEC.wiki]

    To load additional modules you can use the standard .config/modules-load.d /xxx.conf .config/modprobe.d/xxx.conf method.

    gpio-ir-recv should be available but I never heard of gpioplug-ir-recv before. Usually gpio-ir-recv gets it's configuration (gpio, rc table) from devicetree and relies on proper pinmux/gpio setup via devicetree as well - this is what RPi and Rockchip are doing.

    I'm not familiar with the Odroid C2 so maybe someone else has an idea and can chime in. You'll probably need to modify the devicetree, disable the meson-ir node and enable a gpio-ir one (in which case the module should automatically be loaded), plus add the pinmux settings.

    so long,

    Hias

  • Thanks..

    I am capable to blacklist meson-ir (its not loadeded after blacklisting), but it seems to be impossible to load gpio-ir-recv :( From commandline, neither from modprobe.d directory, I cant get this gpio-ir-rcv driver loaded, its just not showing on ir-keytable..

    It seems that for Odroid C2 is gpioplug-ir-recv also mandatory, without it its not possible to map GPIN to IR signal, and also gpio-ir-recv doesnt load.. :(

    Edited once, last by JimmySmith (November 23, 2018 at 4:26 PM).

  • Seems to LE isnt capable to be IR controled through GPIO @Odroid C2, because missing modules (officially supported by HardKernel), which would allow to define GPIO pin for receive IR signal. I was able to use native IR with meson-ir without problems, which doesnt entirelly solve the problem - extend IR through cable connected to the GPIO pins.

    Edited 3 times, last by JimmySmith (December 31, 2018 at 9:51 AM).