Remote.conf doesn't work at boot

I’m trying to configure two remotes for two identical boxes (Nexbox A95X B7N).
I’ve tried to configure a meson style remote, and it works for one of the machines, but not the other.
On the second box I’m trying to configure a remote.conf instead.

I have remote.conf located in /storage/.config
If I boot the machine, the remote doesn’t work. If I ssh in and type remotecfg remote.conf from the /storage/.config directory, my remote works perfectly.

In /storage/.config I had renamed rc_keymaps.cfg to rc_keymaps.cfg.backup just to try to make sure meson version didn’t try to load.

I created an autostart.sh file in /storage/.config with the lines:
#!/bin/sh
remotecfg /storage/.config/remote.conf and this seems to work without further input.

Why, though, do I need to do this? Something seems really off.

Andrew

Check that you don’t have remote.conf file on /flash partition.
https://wiki.coreelec.org/coreelec:rcu
See troubleshooting link

Thanks for the reply.

/flash doesn’t have anything extraneous and the wiki didn’t help - there is only 1 remote.conf and it is in the right place. The install does not have and of:
/flash/remote.disable`
/storage/.config/remote.disable
/flash/remote.force_meson_ir
/storage/.config/remote.force_meson_ir

So I can’t modify any of these per the wiki

What’s also weird is the reponse from ir-keytable or dmesg –c.
If I run:

systemctl stop kodi
systemctl stop eventlircd
ir-keytable -p NEC,RC-5,RC-6,JVC,SONY -t

I get:

/sys/class/rc/: No such file or directory
No devices found

OK, so I’ll use dmesg -c.

However, for all keys that are mapped to something, nothing gets echo’d back – this means I can’t remap a key without figuring out what the key currently does and figure out the number that represents that action and then knowing the key (eg if pushing a button increases the volume, I need to know that 115 is Vol+ (by looking it up somewhere) and find that line in remote.conf to know that 0x9b is presently assigned to that key (whew, that’s gonna be a long night)

For the one key which isn’t mapped (or mapped correctly) that I know of, which is the blue Vol+ key at the top of my NexBox B7N remote, I get back:

[ 547.578191@0] meson-remote c8100580.meson-remote: invalid custom:0x649bf708
[ 547.578201@0] meson-remote c8100580.meson-remote: cur_custom is nulll
[ 547.578205@0] meson-remote c8100580.meson-remote: no valid key to handle

Best case, this means that 9b is the keycode for the Vol+ key. However mapping that key to Vol+; ie

0x9b 115 #Vol+

Doesn’t work; the other Vol button on the remote is paired to 115 and works.

So, how do I get:

  1. dmesg (or ir-keytable) to tell me what all the buttons are when pushed
    
  2. to not have to use autostart.sh to get the remote to work at boot
    

Thoughts?

Andrew

execute command remoteinfo and send us a link

If there is a remote.conf in /storage/.config/ rename it to remote.bak and reboot
Then SSH into device and try ir-keytable -u

remoteinfo reports this:
http://ix.io/3MMn

When I remove remote.conf and rename and restart, ir-keytable will return this:

167.031399: event type EV_MSC(0x04): scancode = 0x89b
167.031399: event type EV_KEY(0x01) key_down: KEY_VOLUMEUP(0x0073)
167.031399: event type EV_SYN(0x00).
167.042650: event type EV_MSC(0x04): scancode = 0x89b
167.042650: event type EV_SYN(0x00).
167.168041: event type EV_MSC(0x04): scancode = 0x89b
167.168041: event type EV_SYN(0x00).
167.424022: event type EV_KEY(0x01) key_up: KEY_VOLUMEUP(0x0073)
167.424022: event type EV_SYN(0x00).

This seems to be a 3 digit key, not 2.

Andrew

Can you disable autostart.sh, reboot and run this command and post link you get

journalctl -l | paste

Also ir-keytable -p NEC,RC-5,RC-6,JVC,SONY -t only works when meson-ir is used. In case remote.conf file is used during boot this is not the case.
That’s why module meson-remote needs to be removed and meson-ir loaded. Then ir-keytable will work.

vim3 $ systemctl stop kodi
vim3 $ systemctl stop eventlircd
vim3 $ rmmod meson-remote
vim3 $ modprobe meson-ir
vim3 $ ir-keytable -p NEC,RC-5,RC-6,JVC,SONY -t

Protocols changed to rc-5 jvc sony nec rc-6
Testing events. Please, press CTRL-C to abort.
82.924080: event type EV_MSC(0x04): scancode = 0x800f041e
82.924080: event type EV_KEY(0x01) key_down: KEY_UP(0x0067)
82.924080: event type EV_SYN(0x00).
83.180023: event type EV_KEY(0x01) key_up: KEY_UP(0x0067)
83.180023: event type EV_SYN(0x00).
83.610958: event type EV_MSC(0x04): scancode = 0x800f041f
83.610958: event type EV_KEY(0x01) key_down: KEY_DOWN(0x006c)
83.610958: event type EV_SYN(0x00).
83.772042: event type EV_MSC(0x04): scancode = 0x800f041f
83.772042: event type EV_SYN(0x00).
84.028028: event type EV_KEY(0x01) key_up: KEY_DOWN(0x006c)
84.028028: event type EV_SYN(0x00).
84.800050: event type EV_MSC(0x04): scancode = 0x800f0420
84.800050: event type EV_KEY(0x01) key_down: KEY_LEFT(0x0069)
84.800050: event type EV_SYN(0x00).
85.056025: event type EV_KEY(0x01) key_up: KEY_LEFT(0x0069)
85.056025: event type EV_SYN(0x00).
85.659056: event type EV_MSC(0x04): scancode = 0x800f0421
85.659056: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x006a)
85.659056: event type EV_SYN(0x00).
85.820080: event type EV_MSC(0x04): scancode = 0x800f0421
85.820080: event type EV_SYN(0x00).
86.076029: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x006a)
86.076029: event type EV_SYN(0x00).

and I have in remote.conf

    0x1e  103  # up -> up
    0x1f  108  # down -> down
    0x20  105  # left -> left
    0x21  106  # right -> right

So, of course now that you’re being my Problem Solver, the problem has mysteriously fixed itself.
When I boot with autostart.sh renamed, the remote now works. Go figure.

This is my remote.conf

#amlogic Nexbox A95X (905X) remote
factory_code  = 0xdf000001
work_mode     = 0
repeat_enable   = 1
repeat_delay    = 130
repeat_peroid   = 120
release_delay = 20
debug_enable  = 0

#fn_key_scancode    = 0x03
left_key_scancode  = 0x47
right_key_scancode = 0x07
up_key_scancode    = 0x1a
down_key_scancode  = 0x48
ok_key_scancode    = 0x06
#pageup_key_scancode = 0x4b
#pagedown_key_scancode = 0x4f

mouse_begin
  0 0x47 #LEFT
  1 0x07 #RIGHT
  2 0x6c #UP
  3 0x48 #DOWN
mouse_end

key_begin
  0x1c 31  #ON/OFF Shutdown menu
  0xf1 45  #STOP (Power)
  0xf2 24  #MEDIA OSD info
  0xf3 113 #MUTE
  0x42 172 #HOME
  0x0a 158 #BACK
  0x18 46  #MENU
# Blue Buttons
  0x89b 115 #Vol+ BLUE
  0xf4 114  #Vol- BLUE
# End Blue
  0x5d 115 #VOL+
  0x5c 114 #VOL-
  0x1a 103 #UP
  0x48 108 #DOWN
  0x47 105 #LEFT
  0x07 106 #RIGHT
  0x06 28  #OK
  0x03 23  #INFO (Mouse)
  0x5f 57  #PAUSE (KODI)
  0x01 15  #DISPLAY TAB
  0x41 44  #ZOOM (Browser)
  0x10 14  #BACKSPACE (Del)
  0x4f 109 #PAGEDOWN (Prev)
  0x4b 104 #PAGEUP (Next)
  0x54 2   #1
  0x16 3
  0x15 4
  0x50 5
  0x12 6
  0x11 7
  0x4c 8
  0x0e 9
  0x0d 10
  0x0c 11  #0
key_end

The 0x89b for Vol+ in the blue section doesn’t make much sense - everything else is 2 digits.

I’m confused about your advice:
If I want dmesg -c to work while using remote.conf, what do I need to do so that it will echo all keys back to me?
If I want ir-keytable to work while using the other remote (meson-remote?), what do I need to do?

Are these changes on each boot, or does the box adjust by itself each time when I boot with one or the other set? I’m concerned that the modprobe will continue after a reboot.

Thanks so much. More than I ever wanted to know about remotes, but I’m getting there (insert happy face here).

Andrew

I don’t know how to get keys printed with dmesg.
But my instructions above with rmmod/modprobe is just one time thing to get the keys from the remote. Then you adjust remote.conf file and reboot.
ir-keytable and meson-remote are not compatible. That’s why there is no device printed.

And instead of 3 chars key just try with 2? Like 0x9b.

Thanks. Got ir-keytable to echo
Pressing the Blue Vol+ button at the top of the remote returns:
1807.829548: event type EV_MSC(0x04): scancode = 0x89b
1807.829548: event type EV_KEY(0x01) key_down: KEY_VOLUMEUP(0x0073)

Tried using 0x89b and 0x9b - no joy on the remote. Vol- at the top (again, a blue button) works correctly.
The Vol+ on the right side of the controller is also set for (you guessed it) Vol+ (115) and works correctly. Vol- on the right and blue also works correctly.

Weird.

Andrew

The blue buttons are for remote learning, not for programming via remote.conf or meson keyfile. They are intended to learn the commands from your TV remote.

# amlogic NEC remote * Abox A1 Max
#
    factory_code    = 0xdf000001
    work_mode       = 0
    repeat_enable   = 1
    repeat_delay    = 130
    repeat_peroid   = 39
    release_delay   = 120
    debug_enable    = 1
#
    fn_key_scancode       = 0x03 # MOUSE
    left_key_scancode     = 0x47 # LEFT
    right_key_scancode    = 0x07 # RIGHT
    up_key_scancode       = 0x1a # UP
    down_key_scancode     = 0x48 # DOWN
    ok_key_scancode       = 0x06 # OK
#
mouse_begin
    0 0x47 # LEFT
    1 0x07 # RIGHT
    2 0x1a # UP
    3 0x48 # DOWN3
mouse_end
#
key_begin
#
    0x1c 31  # S-POWERMENU (POWER)
    0x01 164 # PLAYPAUSE (TV)
    0x5f 113 # MUTE (KBUTTON)
    0x4b 168 # REWIND (|<<)
    0x4f 208 # FASTFORWARD (>>|)
    0x47 105 # LEFT
    0x07 106 # RIGHT
    0x1a 103 # UP
    0x48 108 # DOWN
    0x06 28  # ENTER (OK)
    0x42 102 # HOME (HOUSE)
    0x0a 14  # BACKSPACE (BACK ARROW)
    0x18 46  # CONTEXTMENU (DOCUMENT)
    0x0c 11  # KEY No.0
    0x54 2   # KEY No.1
    0x16 3   # KEY No.2
    0x15 4   # KEY No.3
    0x50 5   # KEY No.4
    0x12 6   # KEY No.5
    0x11 7   # KEY No.6
    0x4c 8   # KEY No.7
    0x0e 9   # KEY No.8
    0x0d 10  # KEY No.9
    0x10 24  # O-CODEC INFO (BACKSPACE)
    0x41 23  # INFO (GLOBE)
    0x5c 114 # VOLUMEDOWN (VOL-)
    0x5d 115 # VOLUMEUP (VOL+)
# 0x52 nn  # MOUSE (!!! NEVER !!! use this line, this key is mapped in fn_key_scancode)
key_end
#
repeat_key_begin
    0x47 105 # LEFT
    0x07 106 # RIGHT
    0x1a 103 # UP
    0x48 108 # DOWN
    0x5d 104 # PAGEUP (VOL+)
    0x5c 109 # PAGEDOWN (VOL-)
repeat_key_end
#

If you start with completely empty remote.conf file then you will see lines like this in dmesg

[   31.531839@0]s meson-remote ff808040.meson-remote: invalid custom:0x800f841e
[   31.531846@0]s meson-remote ff808040.meson-remote: cur_custom is nulll
[   31.531849@0]s meson-remote ff808040.meson-remote: no valid key to handle
[   32.153609@0]s meson-remote ff808040.meson-remote: invalid custom:0x800f041f

But when you have properly configured remote.conf (probably with correct factory_code) then you will get in dmesg only keys which are not mapped in remote.conf. And output is also little different in this case

[   19.884585@0]s meson-remote ff808040.meson-remote: scancode 30 undefined
[   19.884590@0]s meson-remote ff808040.meson-remote: no valid key to handle
[   20.185579@0]s meson-remote ff808040.meson-remote: scancode 31 undefined
[   20.185585@0]s meson-remote ff808040.meson-remote: no valid key to handle

As you can see only key value in decimal format is printed.
30 → 0x1e
31 → 0x1f

Hi attached is the remote for my Nexbox A95X B7N if you still need it

This box still works great with CoreELEC
remote.conf (1.8 KB)

Updated, as previously posted above, the best source for remotes can found using the wiki, there are links to remotes that are update to date (great job, thanks)
https://wiki.coreelec.org/coreelec:rcu
In the case for AmRemote

My remote was based on something I found a few years ago and modified, I modified the repeated key timing… I notice the repository has the official A95x remote, so I would use that

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.