Location of lirc dvbsky.c setup file

  • Hi all,
    I have just migrated from a PC based Lubuntu based Kodi box. I am using a dvb-s card from dvbsky and when I had it running on the Lubuntu build I had it setup to use the IR-remote with IR_keytable. I found this very satisfactory and it worked fine after the hassle of setting it up.
    When I migrated and got the card working with the dvb-special build of Libreelec I simply transfered over my autostart.sh file and my remote.config file for the remote from my Lubuntu build. However I found that only a few of the buttons worked out of the box. What seems to be happening is that it is ignoring my ir-keytable setup and automatically setting up a lirc service with the driver;

    Code
    Registered IR keymap rc-dvbsky
    [    9.837046] input: cx88 IR (Bestunar PS8312 DVB-S/ as /devices/pci0000:00/0000:00:10.0/0000:04:05.2/rc/rc0/input10
    [    9.837334] rc0: cx88 IR (Bestunar PS8312 DVB-S/ as /devices/pci0000:00/0000:00:10.0/0000:04:05.2/rc/rc0
    [    9.850341] input: MCE IR Keyboard/Mouse (cx88xx) as /devices/virtual/input/input11
    [    9.851791] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 0

    So I found out that this is a preconfigured keytable with the following contents;

    So it seems that all I should need to do is modify this file to for my required Kodi keymaps as defined in my Ir-keytable file and the remote should just work as before. Simple.

    However the issue is I do not have a clue as to where this "rc-dvbsky.c - Keytable for DVBSky Remote Controllers" is to be found on the Libreelec file system. Anyone got any understanding of how Lirc is setup within Libreelec ??

    Stephen

    Edited once, last by Shoog (December 14, 2016 at 8:05 PM).

  • I did a full system search of my install using find. and it produced no results.

    I have a suspicion that this code is somehow embedded into the Kernel and so is inaccessible to the user. If this is the case the question becomes how do you disable or override this kernel based functionality since my attempts to disable the lircd deamon and introduce a direct ir-keytable pathway has failed so far.
    Could I map the lircd output to a final keyboard minic of my choice ?

    Stephen

  • Since I am running an already modified version of the source code, and I am not certain that I will be able to find the source code for this specific version, it seems a big step to try to resolve my problem by building a modified version of Libreelec over the top of a modified version. Is there another simpler method to achieve what I need ?

    Stephen


  • File is in linux kernel like build.LibreELEC-Generic.x86_64-8.0-devel/linux-4.8.12/drivers/media/rc/keymaps/rc-dvbsky.c.

    Thanks for that, but it still leaves me in a situation where I need to find the source code of Libreelec_dvb and recompile it.
    Let me also point out that though I am a competent user of Linux I have never compiled a KERNEL in my life.

    Stephen
    [hr]
    So I tried blacklisting the dvbsky driver but could not identify which one it was so no success.

    Next I tried the following autostart.sh file:

    Code
    # Kill lirc remote services
    
    
    systemctl stop eventlircd.service
    
    
    #start ir-keytable
    
    
    ir-keytable -c -p RC-5,RC-6 -w/storage/.config/rc_keymaps/myremote

    Unfortunately it seems to kill the ir-keytable functionality as well.
    However ir-keytable -t does in fact detect the raw codes been issued by my remote but doesn't seem to translate them into keypresses corresponding to my myremote file.

    Executing sh autostart.sh produces:

    Code
    Read Myremote table
    Old keytable cleared
    Wrote 32 keycode(s) to driver
    Protocols changed to rc-5 rc-6


    Which seems to indicate that ir-keytable is reading myremote, but when I then ask ir-keytable what it is interpreting it still says that it is working with :

    Code
    Found /sys/class/rc/rc0/ (/dev/input/event6) with:
        Driver cx88xx, table rc-dvbsky
        Supported protocols: lirc rc-5 jvc sony nec mce-kbd rc-6
        Enabled protocols: rc-5 rc-6
        Name: cx88 IR (Bestunar PS8312 DVB-S/
        bus: 1, vendor/product: 14f1:8312, version: 0x0001
        Repeat delay = 1000 ms, repeat period = 125 ms


    This is obviously not how ir-keytable should work and it seems that despite killing lirc the KERNEL is still loading its prefered driver, however LIRC has to be involved along the chain somewhere since killing LIRC disables the little bit of remote functionality I had.

    Stephen

    Edited once, last by Shoog (December 15, 2016 at 5:31 PM).

  • Quote


    Next I tried the following autostart.sh file:

    Code
    # Kill lirc remote services
    
    
    systemctl stop eventlircd.service
    
    
    #start ir-keytable
    
    
    ir-keytable -c -p RC-5,RC-6 -w/storage/.config/rc_keymaps/myremote

    eventlircd must not be stopped in autostart.sh when changing key tables.

    The remote can be tested with evtest from the system-tools addon:

    Code
    systemctl stop kodi
    systemctl stop eventlircd
    evtest


    Select the remote's /dev/input/eventX and start pressing keys.

  • Hi all,
    I decided to go back to first principles and abandon my attempt to use IR_KEYTABLES. I tried to set up the layers of Lirc from the kernel driver layer to the kodi instructions layer, but I kept on having minor issues with getting specific intermediary LIRC codes recognised.

    So in case anyone wanders down this path like me and can't find a solution this is what I did in the end. I accepted that the remote was working at the hardware and basic LIRC level. I cleared out all LIRC and IR_KEYTABLE setup files and my autostart.sh file. I loaded up and fired up the Kodi IRKEYMAP plugin and programmed all of the keys I needed manually. I got everything I needed working apart from the POWER button and the FAV button which do not seem to be correctly mapped to LIRC keypress events at the KERNEL level and so were not recognised by the plugin.
    Its quite a tedious process to program the remote in this way since each subsystem of KODI has to have its own individual unique set of codes programmed. Still this is a hell of a lot more straightforward than debugging a set of LIRC files.

    I am satisfied with the outcome, but would have been even happier if I could have got IR_KEYTABLES working as it allows mapping to the limited set of keyboard controls which I need and is very straightforward to setup if LIRC isn't messing up the mix.

    Stephen