Skip to content

04. Adding a second remote

Betatester edited this page Dec 6, 2022 · 21 revisions

Abstract

SoC Amlogic devices can have two remote controllers work in tandem.

Amlogic

Basic instructions

  1. Create remotesecond.conf

    run touch remotesecond.conf

    edit and construct the file following the remote.conf instructions.

  2. Add the line

    factory_infcode = 1 # set as second remote

    to remotesecond.conf

  3. Initialize

    run remotecfg remotesecond.conf

NOTE: some devices may require the second remote to be called during startup. To achieve this, add the following to autostart.sh:

 #!/bin/bash 
 (/usr/bin/remotecfg /storage/.config/remotesecond.conf)&
 exit

IMPORTANT:

The second remote configuration file must reside in the same directory as the first one.

Samples

remotesecond.conf

ce_logo

This method works ONLY with CoreELEC:
  1. Rename the second remote.conf to remote2.conf
  2. Save in /storage/.config/
  3. Reboot
Multiple remotes can be added this way.

IMPORTANT:

All remote configuration files must reside in the /storage/.config/ directory.

Meson IR

Basic instructions

  1. Edit /storage/.config/rc_maps.cfg

    change:

    meson-ir * KEYMAP

    to

    meson-ir * multi_rc_config

  2. Create multi_rc_config in /storage/.config/rc_keymaps

    touch /storage/.config/rc_keymaps/multi_rc_config

  3. Edit multi_rc_config and enter:

    # table multi_rc_config, type: PROTOCOL_01 PROTOCOL_02

  4. Copy and paste the contents of the KEYMAP files to be combined into the multi_rc_config file.

IMPORTANT:

All remote protocols must be listed.

The protocol required by a remote can be found in the first line of that remotes existing KEYMAP file.

When combining multiple remotes using the same protocol, the protocol has to be listed only once.

  1. Separate each remote by protocol:

    In this example NEC & RC6 protocols are used.

    # table multi_rc_config, type: NEC RC6
    #
    # table kvim, type: NEC
    #
    0x14 KEY_POWER
    0x07 KEY_ENTER
    ...
    # 
    # table rc6_mce, type: RC6
    #
    0x800f0400 KEY_NUMERIC_0
    0x800f0401 KEY_NUMERIC_1
    ...
    #
    
  2. Save the file and reboot.

Alternate method

KEYMAP files can also be combined via the command line:

  1. Create multi_rc_config

    touch /storage/.config/rc_keymaps/multi_rc_config

  2. Add "# table multi_rc_config, type: NEC RC6"

    echo "# table multi_rc_config, type: NEC RC6" > /storage/.config/rc_keymaps/multi_rc_config

  3. Merge multiple KEYMAP files

    cat /usr/lib/udev/rc_keymaps/rc6_mce >> /storage/.config/rc_keymaps/multi_rc_config

    cat /usr/lib/udev/rc_keymaps/kvim >> /storage/.config/rc_keymaps/multi_rc_config

    HINT: Numerous KEYMAP files can be found in /usr/lib/udev/rc_keymaps/ and the Meson_IR file section of the Repository.

  4. Edit the resulting multi_rc_config to verify proper format.

    vi /storage/.config/rc_keymaps/multi_rc_config

  5. Reboot

Samples

multi_rc_config