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
    1. Registered IR keymap rc-dvbsky
    2. [    9.837046] input: cx88 IR (Bestunar PS8312 DVB-S/ as /devices/pci0000:00/0000:00:10.0/0000:04:05.2/rc/rc0/input10
    3. [    9.837334] rc0: cx88 IR (Bestunar PS8312 DVB-S/ as /devices/pci0000:00/0000:00:10.0/0000:04:05.2/rc/rc0
    4. [    9.850341] input: MCE IR Keyboard/Mouse (cx88xx) as /devices/virtual/input/input11
    5. [    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 ().

  • 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.


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)



  • 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
    1. # Kill lirc remote services
    2. systemctl stop eventlircd.service
    3. #start ir-keytable
    4. 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
    1. Read Myremote table
    2. Old keytable cleared
    3. Wrote 32 keycode(s) to driver
    4. 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
    1. Found /sys/class/rc/rc0/ (/dev/input/event6) with:
    2.     Driver cx88xx, table rc-dvbsky
    3.     Supported protocols: lirc rc-5 jvc sony nec mce-kbd rc-6
    4.     Enabled protocols: rc-5 rc-6
    5.     Name: cx88 IR (Bestunar PS8312 DVB-S/
    6.     bus: 1, vendor/product: 14f1:8312, version: 0x0001
    7.     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 ().

  • Quote


    Next I tried the following autostart.sh file:

    Code
    1. # Kill lirc remote services
    2. systemctl stop eventlircd.service
    3. #start ir-keytable
    4. 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
    1. systemctl stop kodi
    2. systemctl stop eventlircd
    3. 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