Irtrans remote not recognized on LibreELEC-RR 10

  • Hello,

    I've recently switched from Lubuntu to LibreELEC-RR 10 Generic.x86_64 and everything besides the remote control works.

    My system:

    Case: Originae S16V with integrated VF210 VFD and IR sensor from Irtrans

    CPU: i5-4440

    MB: ASUS B85M-G [C2]

    RAM: 4GB DDR3

    GPU: GTX 1050

    TV card: Digital Devices cineS2 V7A


    The system has been running with multiple OSs (Win 7, Linux) and the remote worked every time (Linux took a while to set up, but it worked fine for years).

    I've tried this thread but the setup doesn't work (some aspects don't make sense with the current LE version, as some files/code lines aren't there) and the irtrans server doesn't seem to load the driver (logs).

    I've tried the built-in solution, but every single keytable has the error "No devices found", as has the ir-keytable by itself. lsusb finds the module.

    /usr/lib/udev/rc_keymaps/protocols # lsusb

    Bus 002 Device 008: ID 046d:c714 Logitech, Inc. diNovo Edge Keyboard

    Bus 002 Device 007: ID 046d:c713 Logitech, Inc. Logitech BT Mini-Receiver

    Bus 002 Device 006: ID 046d:0b04 Logitech, Inc. Logitech BT Mini-Receiver

    Bus 002 Device 005: ID 046d:c525 Logitech, Inc. MX Revolution Cordless Mouse

    Bus 002 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub

    Bus 002 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub

    Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub

    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Bus 001 Device 004: ID 05e3:070e Genesys Logic, Inc. USB 2.0 Card Reader

    Bus 001 Device 005: ID 0403:fc60 Future Technology Devices International, Ltd IRTrans USB

    Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub

    Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    but no approach has worked so far. What am I doing wrong? My Linux experience is limited and I've run out of ideas /shrug . It would be a shame to abandon the build after everything else is working as expected :cry: .

    Thank you for your help.

  • Is there any way I could help to give more info? Can I use the drivers from the previous Linux install to fix this (I have backups of both LE and Lubuntu)?

  • Code
    Apr 04 20:20:32.259050 HTPC kernel: usbcore: registered new interface driver ftdi_sio
    Apr 04 20:20:32.259086 HTPC kernel: usbserial: USB Serial support registered for FTDI USB Serial Device
    Apr 04 20:20:32.259099 HTPC kernel: ftdi_sio 1-1.5.1:1.0: FTDI USB Serial Device converter detected
    Apr 04 20:20:32.259255 HTPC kernel: usb 1-1.5.1: Detected FT232RL
    Apr 04 20:20:32.262619 HTPC kernel: usb 1-1.5.1: FTDI USB Serial Device converter now attached to ttyUSB0

    Looking at the logs this is what I can see. Is the RT232RL your ir receiver?

    What does lsusb -t and lsusb -v show? Where / have you configured the ttyUSB0?

  • Looking at the logs this is what I can see. Is the RT232RL your ir receiver?

    After researching it: Yes, the RT232RL is the ir receiver built into my case.

    Since -v led to too many lines for putty, I've printed only the IrTrans device.

    Where / have you configured the ttyUSB0?

    I'm sorry, I don't know where and how to do that. I'm a Linux noob, especially with Libreelec.

    Try to run the irserver manually:

    irserver -loglevel 4 -debug_code /dev/ttyUSB0

    Code
    HTPC:~ # irserver -loglevel 4 -debug_code /dev/ttyUSB0
    -sh: irserver: not found

    Thank you for your help.

  • You need to follow the instructions from thread you mentioned above.

    Start here: RE: irserver add-on

    You need to obtain the necessary files from this package or an alternative files from OpenELEC as apa explained.

    For the original irserver installation to /storage/.config/irtrans/ folder, try copy & paste these commands to SSH console:

    Code
    cd /tmp
    wget -c http://www.irtrans.de/download/Server/Linux/irserver.tar.gz
    tar -xf irserver.tar.gz
    sed -i 's+/usr/local/+/storage/.config/+g' install.sh
    ./install.sh

    Then try to run it manually to see if it's doing something:

    /storage/.config/irtrans/irserver -loglevel 4 -debug_code /dev/ttyUSB0

    If it works, you may try to put the startup line to /storage/.config/autostart.sh file, which could perhaps be something like:

    /storage/.config/irtrans/irserver -logfile /var/log/irserver.log -pidfile /var/run/irserver.pid -daemon /dev/ttyUSB0

    If you get the irserver running, then you need to finish the remaining instructions from this and next posts, starting from this point:

    • Instruct Kodi to listen on the alternate LIRC socket (/run/lirc/lircd.itrans) by changing the Kodi command-line parameter with which it is launched.

    I don't have this hardware so you have to give it a try.

    Edited 2 times, last by ghtester (April 10, 2021 at 4:44 PM).

  • Code
    HTPC:~/.config # cd /tmp
    HTPC:/tmp # tar -xf irserver.tar.gz
    HTPC:/tmp # sed -i 's+/usr/local/+/storage/.config/+g' install.sh
    HTPC:/tmp # ./install.sh
    IRTrans Software installed in /storage/.config/irtrans

    After a reboot

    Code
    HTPC:~ # /storage/.config/irtrans/irserver -loglevel 4 -debug_code /dev/ttyUSB0
    -sh: /storage/.config/irtrans/irserver: not found

    I can see the folder and the file, it just doesn't work

    Code
    HTPC:~/.config/irtrans # ls
    ip_assign    irclient     irserver     remotes
    ip_assign64  irclient64   irserver64
    HTPC:~/.config/irtrans # chmod +x irserver
    HTPC:~/.config/irtrans # irserver -loglevel 4 -debug_code /dev/ttyUSB0
    -sh: irserver: not found
    HTPC:~/.config/irtrans #

    The folder  /run/lirc/lircd.itrans doesn't exist, but I guess it's because the irserver doesn't get of the ground.

    If I follow the post past this I encounter other issues:

    -The file the post points to (irserver-src.tar.gz), doesn't contain the server executable and install script, so I used the package you suggested.

    -"Instruct Kodi to listen on the alternate LIRC socket (/run/lirc/lircd.itrans) by changing the Kodi command-line parameter with which it is launched.

    To do this, copy /usr/lib/kodi/kodi-config to /storage/.config/. Edit /storage/.config/kodi-config and replace the line reading KODI_ARGS="--lircdev /run/lirc/lircd" with the following"

    This line "KODI_ARGS="--lircdev /run/lirc/lircd" doesn't exist in the file kodi-config

    Display Spoiler

    #!/bin/sh

    # SPDX-License-Identifier: GPL-2.0-or-later

    # Copyright (C) 2009-2014 Stephan Raue ([email protected])

    # Copyright (C) 2018-present Team LibreELEC (LibreELEC – Just enough OS for KODI)

    KODI_ROOT=$HOME/.kodi

    BOOT_STATE="$(cat $HOME/.config/boot.status 2>/dev/null)"

    # May not exist if testing a clean /storage/.kodi without rebooting

    mkdir -p $KODI_ROOT/userdata

    # hack: make addon-bins executable

    # done in kodi on addon install. but just in case..

    chmod +x $KODI_ROOT/addons/*/bin/* 2>/dev/null

    # setup Kodi sources

    if [ ! -f $KODI_ROOT/userdata/sources.xml ]; then

    if [ -f /usr/share/kodi/config/sources.xml ]; then

    cp /usr/share/kodi/config/sources.xml $KODI_ROOT/userdata

    fi

    fi

    # common setup guisettings

    if [ ! -f $KODI_ROOT/userdata/guisettings.xml ] ; then

    if [ -f /usr/share/kodi/config/guisettings.xml ]; then

    cp /usr/share/kodi/config/guisettings.xml $KODI_ROOT/userdata

    fi

    if [ "$BOOT_STATE" = "SAFE" ]; then

    [ ! -f $KODI_ROOT/userdata/guisettings.xml ] && echo '<settings version="2"></settings>' > $KODI_ROOT/userdata/guisettings.xml

    xmlstarlet ed --omit-decl --inplace -s settings -t elem -n setting -v "maroon" -i settings/setting -t attr -n id -v lookandfeel.skin>

    fi

    fi

    KODI_ARGS=""

    echo "KODI_ARGS=\"$KODI_ARGS\"" > /run/libreelec/kodi.conf

    if [ "$(uname -m)" = "x86_64" ]; then

    echo "MALLOC_MMAP_THRESHOLD_=524288" >> /run/libreelec/kodi.conf

    else #arm

    echo "MALLOC_MMAP_THRESHOLD_=8192" >> /run/libreelec/kodi.conf

    fi

    if [ -f /storage/.config/kodi.conf ] ; then

    cat /storage/.config/kodi.conf >>/run/libreelec/kodi.conf

    fi

    Current logs don't even show the server.


    Thank you for your help.

    Edited once, last by Bobsofa (April 10, 2021 at 6:17 PM).

  • HTPC:~/.config/irtrans # irserver -loglevel 4 -debug_code /dev/ttyUSB0

    This is wrong. If you try to run it inside the folder, you have to enter ./irserver

    That's why I put the example with absolute path which must work ( /storage/.config/irtrans/irserver )

    Otherwise you have an issue with SSH client or a filesystem issue.

    The source codes needs to be compiled. The better option should be to get the necessary files from OpenELEC package.

  • This is wrong. If you try to run it inside the folder, you have to enter ./irserver

    That's why I put the example with absolute path which must work ( /storage/.config/irtrans/irserver )

    Otherwise you have an issue with SSH client or a filesystem issue.

    The source codes needs to be compiled. The better option should be to get the necessary files from OpenELEC package.

    Afair, when I use the full command, the result is the same (The machine is currently in use with an older Linux image. When I have the time to put the LE image back on, I will confirm this).

    I tried to obtain the OE files. The newest image from the website seems to be faulty (It installs, but upon reboot I get a "OS missing" message. I tried it multiple times with the same result) and I can't find an older version. Is there some server where these files are downloadable?

    Thank you for your help.

  • Most likely you have to use irserver64 on a 64 bit system.

    Thank you so much, now the server starts. I missed the forest for the trees. And I even see button presses.

    However, I don't have a lircd.itrans file.

    Code
    HTPC:/run/lirc # ls
    lircd         lircd.socket

    Is this one of the files I would need from Openeelec?

    Thank you for your help.

  • This is not a file but a socket. Read this post again and more carefully until you understand, I can't explain it better. Also keep in mind the post is 4 years old so some things may be different in LE 10.

    As described, the original irserver daemon uses the same LIRC socket (/run/lirc/lircd) , the custom irserver daemon from old LibreELEC & OpenELEC uses a different socket (/run/lirc/lircd.irtrans). The difference is explained, I don't know if Kodi can work with original irserver daemon without any changes as apa was using the custom one and therefore described the changes necessary for alternate socket.

    You need to test yourself.

  • Okay, I've successfully copied the OE irserver file from an older working OE image I've found. I've copied it as irserver64 (irserver through the same error as the official IRtrans version) into ~/.config/irtrans/. The ir server seems to be working fine:

    Display Spoiler

    /storage/.config/irtrans/irserver64 -loglevel 4 -debug_code /dev/ttyUSB

    0

    Init Server Socket done

    IRServer64 Version 6.03.08

    Init Events done

    Opening Device: /dev/ttyUSB0

    IRTRans Send Done: 1

    Name :

    Version: D5.08.09

    FW SNo : 14485

    Capab : Power On;

    FW Cap : 0x3c8019

    USB SNo:

    Node : /dev/ttyUSB0

    Init communication ...

    [ 0]: D5.08.09 SN: 14485

    Chdir to DB OK

    Read routing OK

    Read Switches OK

    Open DIR: 12

    Get Dirent: 512

    **** CCF Error: ac1 [See below for Remote name]

    Remote ccf compiled: 20 Timings - 20 Commands

    Remote mce-keyboard compiled: 1 Timings - 77 Commands

    Remote mce-mouse compiled: 1 Timings - 1 Commands

    Remote irtrans compiled: 1 Timings - 33 Commands

    Remote sky-hd compiled: 1 Timings - 34 Commands

    Remote sky-digital compiled: 1 Timings - 31 Commands

    Remote mediacenter compiled: 1 Timings - 49 Commands

    Remote pace compiled: 2 Timings - 38 Commands

    Remote dbox2 compiled: 1 Timings - 26 Commands

    Remote kathrein-ufs compiled: 2 Timings - 36 Commands

    Remote dream compiled: 0 Timings - 36 Commands

    Get Dirent: 0

    Duplicate Commands for ccf.1: ccf.2 ccf.3 ccf.4

    Duplicate Commands for ccf.2: ccf.3 ccf.4

    Duplicate Commands for ccf.3: ccf.4

    Duplicate Commands for pace.0: pace.0-

    Total: 11 Remotes - 31 Timings - 381 Commands - 0 Calib. Commands

    0 Togglec. - 19 CCF Data - 0 CCF RAW - 1 CCF Error

    IRTRans Send Done: 1

    IRTRans Send Done: 1

    [0.0] left mediacenter

    [0.0] left mediacenter

    [0.0] right mediacenter

    [0.0] right mediacenter

    [0.0] right mediacenter

    [0.0] left mediacenter

    [0.0] left mediacenter

    [0.0] right mediacenter

    [0.0] up mediacenter

    [0.0] down mediacenter

    [0.0] ok mediacenter

    ^CIRTRans Send Done: 1

    IRTRans Send Done: 1

    /storage/.config/autostart.sh looks like this:

    Code
    echo 1 > /sys/module/bluetooth/parameters/disable_ertm
    ) &
    nohup script.sh &
    
    
    /storage/.config/irtrans/irserver64 -logfile /var/log/irserver.log -pidfile /var/run/irserver.pid -daemon /dev/ttyUSB0

    Is this correct? Now I have the socket described in the post upon reboot.

    Code
    HTPC:/run/lirc # ls
    lircd          lircd.irtrans  lircd.socket

    Now to the next problem with the old manual.

    Display Spoiler

    Instruct Kodi to listen on the alternate LIRC socket (/run/lirc/lircd.itrans) by changing the Kodi command-line parameter with which it is launched.

    To do this, copy /usr/lib/kodi/kodi-config to /storage/.config/. Edit /storage/.config/kodi-config and replace the line reading KODI_ARGS="--lircdev /run/lirc/lircd" with the following

    Code

    Code
    if [ -e /run/lirc/lircd.irtrans ]; then
    KODI_ARGS="--lircdev /run/lirc/lircd.irtrans"
    else
    KODI_ARGS="--lircdev /run/lirc/lircd"
    fi

    This way, Kodi will only listen to /run/lirc/lircd.irtrans if it exists (and fallback to /run/lirc/lircd otherwise). Make sure to make /storage/.config/kodi-config executable (chmod +x kodi-config).

    Now copy /usr/lib/systemd/system/kodi.service to /storage/.config/system.d/kodi.service. Modify /storage/.config/system.d/kodi.service and change the line ExecStartPre=-/usr/lib/kodi/kodi-config to ExecStartPre=-/storage/.config/kodi-config. This will instruct LibreElec to launch your custom kodi-config instead of the default one.

    or

    Display Spoiler

    Instead, of the "kodi-config" step from my previous post above, you now need to modify /storage/.config/system.d/kodi.service and add the following line:

    Environment="LIRC_SOCKET_PATH=/var/run/lirc/lircd.irtrans"

    Add this as the first line in the [Service] domain of kodi.service.

    Neither /storage/.config/kodi-config nor /storage/.config/system.d/kodi.service exist in the build of RR. I have a

    Code
    /.config/system.d/kodi.service.wants # ls
    service.rr-config-tool.service
    Display Spoiler

    [Unit]

    Description=RR Config Tool

    After=pulseaudio.service

    Before=kodi.service

    Wants=kodi.service pulseaudio.service

    [Service]

    ExecStart=/bin/sh /usr/share/kodi/addons/service.rr-config-tool/bin/rr-config-tool.start

    Type=oneshot

    RemainAfterExit=yes

    [Install]

    WantedBy=kodi.service pulseaudio.service

    In which location is the config file located, where the change of lirc socket needs to made?

    Current logs.

    Thank you for your help.