Need help with RC Remote

  • Hi Everyone,

    A while ago i bought a MXQ Pro 4k (worst android player ever) :)

    Now i have a install sd card with

    Libreelec ver 20200427213119-b7186bc

    Arch: RK322x.arm

    i tried to config my remote following this tutorial

    https://discourse.coreelec.org/t/how-to-confi…mote-control/31

    i made my own remote.cfg file (cant upload it because i am new user)

    # table mecool, type: NEC

    0x14e KEY_1

    0x10d KEY_2

    0x10c KEY_3

    0x14a KEY_4

    0x109 KEY_5

    0x108 KEY_6

    0x146 KEY_7

    0x105 KEY_8

    0x104 KEY_9

    0x101 KEY_0

    0x14c KEY_MENU

    0x55 KEY_CHANNELUP

    0x15 KEY_CHANNELDOWN

    0x118 KEY_VOLUMEUP

    0x110 KEY_VOLUMEDOWN

    0x111 KEY_HOME

    0x150 KEY_RIGHT

    0x151 KEY_LEFT

    0x116 KEY_UP

    0x11a KEY_DOWN

    0x113 KEY_ENTER

    0x141 KEY_MUTE

    0x119 KEY_BACK

    0x KEY_INFO

    0x44 KEY_STOP

    0x08 KEY_PREVIOUSSONG

    0x0b KEY_NEXTSONG

    0x59 KEY_POWER

    0x4a KEY_REWIND

    0x48 KEY_FASTFORWARD

    0x46 KEY_PLAYPAUSE

    0x1f KEY_FAVORITES

    0x4d KEY_EPG

    0x04 KEY_RECORD

    0x51 KEY_ESC

    0x143 KEY_RED

    0x40 KEY_GREEN

    0x00 KEY_YELLOW

    0x03 KEY_BLUE

    0x01 KEY_LANGUAGE # audio

    0x09 KEY_SUBTITLE # subtitle

    0x100 KEY_CONTEXT_MENU # mouse

    0x11 KEY_COMPOSE # DTV

    0x10f KEY_CONFIG # APPS

    0x18 KEY_TEXT # BROWSER

    I placed this Cfg file into the map

    /storage/.config/rc_keymaps

    And now i am bit stuck, i need to do this

    "You must also create the following file /storage/.config/rc_maps.cfg with the following contents.

    meson-ir * YOURMAPNAME"

    But i have no idea what i really need to do :smiley:

    Can someone please help me out a bit?

  • You have to replace "meson-ir" in rc_maps.cfg with "gpio_ir_recv" or just "*". eg

    Code
    * * mecool

    meson-ir is the driver on Amlogic, Rockchip uses the gpio ir driver.

    Also see the info on our wiki: Infra-Red Remotes - LibreELEC.wiki

    so long,

    Hias

    Thank you for your reply, sorry for my late reply. Trying to get this running but its not woking.

    So this is what i have.

    In

    /storage/.config/rc_keymaps

    I have re_maps.cfg with the text

    gpio_ir_recv * Remote

    in

    /storage/.config/rc_keymaps

    i have a map with the name: Remote

    In

    /storage/.config/rc_keymaps/Remote

    I have a file: Remote.cgf

    With:

    # table mecool, type: NEC

    0x14e KEY_1

    0x10d KEY_2

    0x10c KEY_3

    0x14a KEY_4

    0x109 KEY_5

    0x108 KEY_6

    0x146 KEY_7

    0x105 KEY_8

    0x104 KEY_9

    0x101 KEY_0

    0x14c KEY_MENU

    0x55 KEY_CHANNELUP

    0x15 KEY_CHANNELDOWN

    0x118 KEY_VOLUMEUP

    0x110 KEY_VOLUMEDOWN

    0x111 KEY_HOME

    0x150 KEY_RIGHT

    0x151 KEY_LEFT

    0x116 KEY_UP

    0x11a KEY_DOWN

    0x113 KEY_ENTER

    0x141 KEY_MUTE

    0x119 KEY_BACK

    0x KEY_INFO

    0x44 KEY_STOP

    0x08 KEY_PREVIOUSSONG

    0x0b KEY_NEXTSONG

    0x59 KEY_POWER

    0x4a KEY_REWIND

    0x48 KEY_FASTFORWARD

    0x46 KEY_PLAYPAUSE

    0x1f KEY_FAVORITES

    0x4d KEY_EPG

    0x04 KEY_RECORD

    0x51 KEY_ESC

    0x143 KEY_RED

    0x40 KEY_GREEN

    0x00 KEY_YELLOW

    0x03 KEY_BLUE

    0x01 KEY_LANGUAGE # audio

    0x09 KEY_SUBTITLE # subtitle

    0x100 KEY_CONTEXT_MENU # mouse

    0x11 KEY_COMPOSE # DTV

    0x10f KEY_CONFIG # APPS

    0x18 KEY_TEXT # BROWSER

    Can you help me out a bit?

  • You should have a file /storage/.config/rc_maps.cfg with the following content

    Code
    * * Remote

    and a file /storage/.config/rc_keymaps/Remote with the keymap (scancode to key mapping as you posted above).

    Make sure the files are named correctly and are in unix file format (not DOS/Windows line endings) and you don't have any typos. Follow the steps described in the wiki and check if

    Code
    ir-keytable -c -w /storage/.config/rc_keymaps/Remote

    amd

    Code
    ir-keytable -a /storage/.config/rc_maps.cfg

    work without error messages.

    so long,

    Hias

  • Sorry i am really trying to get this to work but i just can't.

    Here my new setup.

    /storage/.config i have a file rc_maps.cfg with only the text

    * * Remote

    /storage/.config/rc_keymaps/remote i have

    Remote.cfg With all the keys

    that begins with

    # table mecool, type: NEC

    0x14e KEY_1

    0x10d KEY_2

    0x10c KEY_3

    ..

    ..

    continue

    Sorry to ask you again.

    0x14a KEY_4

    0x109 KEY_5

  • If you put "Remote" in rc_maps.cfg make sure the file in /storage/.config/rc_keymaps is also named "Remote" (with upper-case "R").

    If you can't get it to work run the two commands I mentioned above and post all the output you got from them.

    so long,

    Hias

  • Put the output of ir-keytable command here to check which IR driver is active in fact.

    Supposing the gpio_ir_recv is active.

    Try to replace the line:

    # table mecool, type: NEC

    in your /storage/.config/rc_keymaps/Remote file with:

    # table nec, type: NEC

    Also replace line:

    * * Remote

    in your /storage/.config/rc_maps.cfg file with:

    gpio_ir_recv * /storage/.config/rc_keymaps/Remote

    Then apply:

    systemctl stop kodi

    systemctl stop eventlircd

    ir-keytable -a /storage/.config/rc_maps.cfg

    systemctl start eventlircd

    systemctl start kodi

    Then test first with

    ir-keytable -t

    command while pushing keys on your IR remote to check if you receive scancodes.

    Then test with

    irw

    command to check if scancodes are properly transformed to commands.

  • Hey! Thank you for your reply.

    I did everything and its frustating that it doesnt work.

    When i do this:

    LibreELEC:~ # ir-keytable -a /storage/.config/rc_maps.cfg

    I get this:

    Empty table /storage/.config/rc_keymaps/Remote

    LibreELEC:~ # ir-keytable

    Found /sys/class/rc/rc0/ (/dev/input/event3) with:

    Name: gpio_ir_recv

    Driver: gpio_ir_recv, table: rc-rktvbox

    lirc device: /dev/lirc0

    Supported protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon

    Enabled protocols: lirc nec

    bus: 25, vendor/product: 0001:0001, version: 0x0100

    Repeat delay = 500 ms, repeat period = 125 ms

    I have GPIO, like you said.

  • it doesnt work.

    What does not work exactly?

    You say you don't even receive any scancodes? It definitely should work (if your RC is compatible with NEC IR protocol).

    It looks your /storage/.config/rc_keymaps/Remote file is wrong, try to replace it with some template file from /usr/lib/udev/rc_keymaps folder and edit with nano editor to ensure you don't corrupt it.

    BTW. the table name table: rc-rktvbox indicate that the file content is different from what you shared here...

    Edited 2 times, last by ghtester (March 8, 2021 at 11:34 AM).

  • What does not work exactly?

    You say you don't even receive any scancodes? It definitely should work (if your RC is compatible with NEC IR protocol).

    It looks your /storage/.config/rc_keymaps/Remote file is wrong, try to replace it with some template file from /usr/lib/udev/rc_keymaps folder and edit with nano editor to ensure you don't corrupt it.

    BTW. the table name table: rc-rktvbox indicate that the file content is different from what you shared here...

    I am so sorry, this is my first time doing this and i am already really happy that you put time and efford in to help me out. Thank you so much.

    Apperntly i didnt give the correct information.

    I will try it all again and do a fresh install so i didnt f*ck it up.

  • What does not work exactly?

    You say you don't even receive any scancodes? It definitely should work (if your RC is compatible with NEC IR protocol).

    It looks your /storage/.config/rc_keymaps/Remote file is wrong, try to replace it with some template file from /usr/lib/udev/rc_keymaps folder and edit with nano editor to ensure you don't corrupt it.

    BTW. the table name table: rc-rktvbox indicate that the file content is different from what you shared here...

    Thank you so much, i was checking everything and i found out that my protocol was totally wrong. Now everything works perfect.