Create remote.conf from scratch

  • My DVD remote generates double factory code - digits section for tv and playback section for dvd.
    Is there a way to make it work with two codes in one config?

  • Great guide, but I need more hand holding...

    I've been trying to add actions to the unused buttons on my remote. The keymap add-on created keymaps and any that I create manually have absolutely no effect. was hoping modifying the remote.conf might offer me salvation.

    However..
    dmesg -c doesn't return anything when I press one of the keys that produce no actions. I guess this means that LE is already happy seeing that keypress?

    I'm unable to find /storage/.config through the file manager in LE.
    If I try to access /storage/.config via SSH, I get a Permisson Denied.

  • Missing Buttons fix
    [hr]
    Hello my Kodi friends :) I bought a new Amlogic S905X devie, with this remote (because i thought its more usable in Kodi):

    But when the box arrived, i was frustrated that the 4 red marked Buttons on the remote not working in LibreElec :cry: When pressed, nothing happens. So i fixed the remote.conf on the root of the SD/USB where i installed LibreElec.
    This fix is only for you, when the red marked buttons not working!

    [hr]
    HOW TO:

    1. Open remote.conf on the root of your SD/USB with LibreElec.

    2. Change the following parts in the file:

    old...


    new...

    3. If you will change the function of the keys, you can now edit it with the Koddi Addon "Keymap Editor" :D

    Edited once, last by dimitrij2k (February 14, 2017 at 9:53 AM).


  • ...
    Save the remote.conf and reboot your box. Factory code is set.
    ...

    You do not have to reboot your box after made any changes for remote.conf.
    You can use this command to make the changes work immediately (presumably you are in the /storage/.config folder):

    Code
    remotecfg remote.conf


    [hr]


    My DVD remote generates double factory code - digits section for tv and playback section for dvd.
    Is there a way to make it work with two codes in one config?

    If your box is amlogic, then I have a HowTo to set two remotes (in terms of the factory_code) to work simultaneously.

    thread-5154.html

    I do not have boxes beside amlogic chips so I can't test it for other boxes, but you can give it a try, no harm.

    Edited once, last by mickr (February 23, 2017 at 7:46 PM).

  • Thanks for this guide. Everything works for me except one thing:
    I changed the Power button and I can turn the box off with it but I can't turn it on with the same button.
    For that I still have to use the original remote. Is there a workaround?


  • Thanks for this guide. Everything works for me except one thing:
    I changed the Power button and I can turn the box off with it but I can't turn it on with the same button.
    For that I still have to use the original remote. Is there a workaround?

    I think all boxes use their old (Android) mechanism for the remote if they a swiched of. The remote.conf is used when libreelec is running. So I dont see any workaround on the libreelec level.

  • It's weird, if I press OK on my TV remote the box boots up just like it does pressing the power button on its original remote.
    If I SSH into Libreelec and see what happens when I press that button and type in dmesg -c after that, I get following answer:

    Code
    remote: Wrong custom code is 0xbb44fb04

    Could that maybee help configuring a POWER_ON button or is this just a concidence because of a shared ir code? But the other way around it doesn't work. If I press the power button of that S905X remote the "OK" command isn't sent to my TV because nothing happens.
    TV is LG 55EG910V.

    Edited once, last by honolulu1 (April 12, 2017 at 3:16 PM).

  • The bootloader is responsible for waking up / powering on the box. To my knowledge, the remote codes for power on are hard-coded in the bootloader and are not configured.


  • It's weird, if I press OK on my TV remote the box boots up just like it does pressing the power button on its original remote.
    If I SSH into Libreelec and see what happens when I press that button and type in dmesg -c after that, I get following answer:

    Code
    remote: Wrong custom code is 0xbb44fb04

    Could that maybee help configuring a POWER_ON button or is this just a concidence because of a shared ir code? But the other way around it doesn't work. If I press the power button of that S905X remote the "OK" command isn't sent to my TV because nothing happens.
    TV is LG 55EG910V.

    Could the CEC settings wake up the box if the TV wakes up? Try turning off CEC just as a check for whether this is the real cause of the wakeup and not the button press triggering the box.

    Andrew
    [hr]
    Anyone have a QBox with a working remote.conf using the remote in post #22?

    I'd like to avoid creating one from scratch (I'm too error prone) if possible.


    Andrew

    Edited once, last by AndyInNYC (April 25, 2017 at 4:13 PM).

  • When I type in 'dmesg -c' in SSH I don't get the option to view the remote codes when I press key on my remote. I have attached what I get on SSH

  • ippon...you are the man! Great tutorial! That did it on my OTT MXQ S805 box! This way I also learned how to reprogram a remote with linux on this boxes...great! It can even power on/off the box...the led remains blu, but I did see somewhere how to fix this..just have to find it again...

    Thank you!

  • My remote is this: .
    After connecting to LibreELEC through ssh, I opened nano, copied ippon's remote.conf code and then saved the file to /storage/.config/remote.conf. I even gave it full permissions, using chmod 777 remote.conf.
    So, in one terminal I opened the file, in another I connected through ssh session and run "dmesg -c", pressed the power on button and ran again "dmesg -c", but, I didn't get "

    Code
    wrong custom code is 0....xwhatever". I get this:


    LibreELEC:~ # dmesg -c

    Code
    LibreELEC:~ # dmesg -c
    [ 2366.238324@0] remote: scancode is 0x0051,invalid key is 0x0000.
    [ 2366.384428@1] remote: scancode is 0x0051,invalid key is 0x0000.
    LibreELEC:~ #
    Code

    Edited once, last by alemaratv (May 8, 2017 at 2:32 PM).

  • \
    My remote is this: .
    After connecting to LibreELEC through ssh, I opened nano, copied ippon's remote.conf code and then saved the file to /storage/.config/remote.conf. I even gave it full permissions, using chmod 777 remote.conf.
    So, in one terminal I opened the file, in another I connected through ssh session and run "dmesg -c", pressed the power on button and ran again "dmesg -c", but, I didn't get "

    Code
    wrong custom code is 0....xwhatever". I get this:


    LibreELEC:~ # dmesg -c

    Code
    LibreELEC:~ # dmesg -c
    [ 2366.238324@0] remote: scancode is 0x0051,invalid key is 0x0000.
    [ 2366.384428@1] remote: scancode is 0x0051,invalid key is 0x0000.
    LibreELEC:~ #
    Code

    You didn't state if, after saving the remote.conf file you typed:
    remotecfg remote.conf

    to restart the remote. If so, i'm not sure what else is wrong. The directions worked well for me.


    Andrew

  • Okay I am doing all this again, I must have something wrong somewhere.
    I connect to LibreELEC via ssh:

    I edit remote.conf file using nano, pasting the exact same code as ippon's first message on thie thread. I check that all lines between key_begin and key_end start with #. debug_enable = 1

    Code
    LibreELEC:~ # nano /storage/.config/remote.conf

    I open the second terminal window and type "dmesg -c" to clear the cache, I get this:

    I press the Ok/Center key on my remote and type dmesg -c again:

    Code
    LibreELEC:~ # dmesg -c
    [  837.047441@0] remote: Wrong custom code is 0xf20d7f80
    LibreELEC:~ #


    So, my factory code would be 0x7f800001, I write it in the remote.conf still opened in the first terminal windows in nano and save it.
    I get this strange error:

    Code
    LibreELEC:~ # remotecfg remote.conf
    Open file remote.conf is failed!!!
    LibreELEC:~ #

    What should I do??

    Edited once, last by alemaratv (May 8, 2017 at 3:51 PM).

  • I loved this tutorial. Thank you!

    I 'rebuilt' my QBox S905 remote. I have the remote in post #22.

    I have a few questions on the button items.

    The sample remote.conf file has this set of lines:

    Code
    # left_key_scancode     = 0x25 #LEFT
    # right_key_scancode    = 0x27 #RIGHT
    # up_key_scancode       = 0x26 #UP
    # down_key_scancode     = 0x28 #DOWN
    # ok_key_scancode       = 0x0d #OK

    This helps define left, right, up, down and OK

    further below, there is the code segment

    Code
    #    0x25 105 #LEFT
    #    0x27 106 #RIGHT
    #    0x26 103 #UP
    #    0x28 108 #DOWN
    #    0x0d 28  #ENTER (OK)

    which appears redundant - codes are the same. Is it redundant, and why is it shown twice if it is?

    I'm not sure, and perhaps someone can offer an explanation of what the following buttons do?
    #CONFIG
    #FAVORITES

    Thrird, what is the difference between (for example):
    #VOLUMEDOWN and
    #PAGEUP (VOL-)

    Finally, are there any other mappable functions via the remote (for LibreElec) which may not be shown in the sample but are mappable with my remote?

    Thanks

    Andrew