yossi
May 6, 2020, 3:21am
1
Good morning! I have an issue when adding a new IR remote to Android 9,
I have read the article Add support for a new IR remote controller
but from the log file :
meson-remote c8100580.rc: invalid custom:0xa758f708
[ 337.335124@1] meson-remote c8100580.rc: cur_custom is nulll
[ 337.340633@1] meson-remote c8100580.rc: no valid key to handle
from the log invalid custom code.
and i was change the custom_map in …/common/arch/arm64/boot/dts/amlogic/mesongxl.dtsi
custom_maps:custom_maps {
mapnum = <1>;
map0 = <&map_0>;
map_0: map_0{
mapname = “khadas-ir”;
customcode = <0xf708>;
release_delay = <20>;
fn_key_scancode = <0x60>;
cursor_left_scancode = <0x03>;
cursor_right_scancode = <0x02>;
cursor_up_scancode = <0x00>;
cursor_down_scancode = <0x01>;
cursor_ok_scancode = <0x1F>;
size = <4>; /keymap size /
keymap = <REMOTE_KEY(0x00,103)
REMOTE_KEY(0x01,108)
REMOTE_KEY(0x03,105)
REMOTE_KEY(0x02,106)>;
};
};
Thanks
1 Like
Frank
May 13, 2020, 1:15am
3
@yossi Hello , Maybe @Terry can hely you .
yossi
May 13, 2020, 2:18am
4
hi @Terry any suggestion to add the new IR Remote controller in android 9?
Terry
May 13, 2020, 3:24am
5
The valid dts file is arch/arm/boot/dts/amlogic/mesongxl.dtsi and not arch/arm64/boot/dts/amlogic/mesongxl.dtsi
/*
* arch/arm/boot/dts/amlogic/mesongxl.dtsi
*
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*/
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/amlogic,gxl-reset.h>
#include <dt-bindings/clock/amlogic,gxl-clkc.h>
This file has been truncated. show original
yossi
May 13, 2020, 7:39am
6
i was editted in
arch/arm/boot/dts/amlogic/mesongxl.dtsi
and the configuration :
meson-remote {
compatible = “amlogic, aml_remote”;
dev_name = “meson-remote”;
status = “okay”;
remote_ao_offset = <0x580>; /* 0x400 + (0x20 + idx)<<2 – old ; 0x400 + (0x60 +idx)<<2 --new */
interrupts = <0 196 1>;
pinctrl-names = “default”;
pinctrl-0 = <&remote_pins>;
};
common/drivers/amlogic/input/remote/Makefile
obj-$(CONFIG_MESON_REMOTE) += remote.o
remote-objs := remote_main.o remote_func.o
common/arch/arm/config
CONFIG_MESON_REMOTE=y
and modify device/khadas/kvim/files/remote.conf and device/khadas/common/products/mbox/Vendor_0001_Product_0001.kl
but the new remote cannot function.
Terry
May 16, 2020, 1:55am
7
We did’t use the file remote.conf . And you only need to modify the file mesongxl.dtsi
1 Like
yossi
June 10, 2020, 10:23am
8
we modify mesongxl.dtsi :
custom_maps:custom_maps {
mapnum = <1>;
map0 = <&map_0>;
map_0: map_0{
mapname = “khadas-ir”;
customcode = <0xf708>;
release_delay = <20>;
fn_key_scancode = <0x60>;
cursor_left_scancode = <0x03>;
cursor_right_scancode = <0x02>;
cursor_up_scancode = <0x00>;
cursor_down_scancode = <0x01>;
cursor_ok_scancode = <0x1f>;
size = <13>; /keymap size /
keymap = <REMOTE_KEY(0x0A, 116)
REMOTE_KEY(0x1F,28)
REMOTE_KEY(0x1C,158)
REMOTE_KEY(0x00,103)
REMOTE_KEY(0x01,108)
REMOTE_KEY(0x03,105)
REMOTE_KEY(0x02,106)
REMOTE_KEY(0x0D,113)
REMOTE_KEY(0x07,119)
REMOTE_KEY(0x0B,128)
REMOTE_KEY(0x44,168)
REMOTE_KEY(0x45,208)
REMOTE_KEY(0x1D,370)>;
};
};
but still same. the new remote IR cannot work
Terry
June 11, 2020, 5:57am
9
You can verify the kernel printing log when you click your IR remote. like this
[ 896.802688] <3>[ 896.802688@0] meson-remote ff808040.rc: invalid custom:0xb24ddf20
[ 896.803159] <3>[ 896.803159@0] meson-remote ff808040.rc: cur_custom is nulll
[ 896.808698] <3>[ 896.808698@0] meson-remote ff808040.rc: no valid key to handle
Terry
June 15, 2020, 11:59am
11
yossi:
custom_maps:custom_maps {
mapnum = <1>;
map0 = <&map_0>;
map_0: map_0{
mapname = “khadas-ir”;
customcode = <0xf708>;
release_delay = <20>;
fn_key_scancode = <0x60>;
cursor_left_scancode = <0x03>;
cursor_right_scancode = <0x02>;
cursor_up_scancode = <0x00>;
cursor_down_scancode = <0x01>;
cursor_ok_scancode = <0x1f>;
size = <13>; / keymap size /
keymap = <REMOTE_KEY(0x0A, 116)
REMOTE_KEY(0x1F,28)
REMOTE_KEY(0x1C,158)
REMOTE_KEY(0x00,103)
REMOTE_KEY(0x01,108)
REMOTE_KEY(0x03,105)
REMOTE_KEY(0x02,106)
REMOTE_KEY(0x0D,113)
REMOTE_KEY(0x07,119)
REMOTE_KEY(0x0B,128)
REMOTE_KEY(0x44,168)
REMOTE_KEY(0x45,208)
REMOTE_KEY(0x1D,370)>;
};
};
The change is the right. How did you confirm that your changes are valid?? by update image or kvim.dtb?
Terry
June 15, 2020, 12:06pm
12
I think you can check it on uboot command mode
kvim3#fdt print /custom_maps/map_0 customcode
customcode = <0x0000ff00>
yossi
June 16, 2020, 2:28am
13
after change the custom_maps,
i do a command : make bootimage
and then make otapackage -j12
and update the image
yossi
June 16, 2020, 2:32am
14
i cannot do a command : fdt print /custom_maps/map_0 customcode
kvim#fdt print /custom_maps/map_0 customcode
No FDT memory address configured. Please configure
the FDT address via “fdt addr ” command.
Aborting!
kvim#
Terry
June 16, 2020, 5:40am
15
# fdt addr ${dtb_mem_addr}
# fdt print /custom_maps/map_0 customcode
Terry
June 16, 2020, 6:53am
17
The custom code ff00 is our khadas IR. And your changes have not taken effect.
1 Like
yossi
June 16, 2020, 8:30am
18
kvim#fdt addr ${dtb_mem_addr}
kvim#fdt print /custom_maps/map_0 customcode
customcode = <0x0000f708>
kvim#
The custom code has been changed. the remote not working
yossi
June 17, 2020, 7:10am
19
the remote can work now, do clean first. @Terry thankyou!
Hi Yossi,
Can you help me please! I downloaded this ROM ATV9 (is an image file .img) https://drive.google.com/file/d/1ik5Yyx2zKt8ZmIbNeBso14vS-Wsx-cs_/view
and my IR Remote control doesn’t work. I read too many tutorial and I saw this post. I have the same problem than you:
[ 1306.825458] meson-remote c8100580.rc: invalid custom:0xf20d4040
[ 1306.829215] meson-remote c8100580.rc: cur_custom is null
[ 1306.834731] meson-remote c8100580.rc: no valid key to handle
[ 1306.271383] meson-remote c8100580.rc: invalid custom:0xfe014040
[ 1306.275156] meson-remote c8100580.rc: cur_custom is null
[ 1306.280674] meson-remote c8100580.rc: no valid key to handle
I’m trying to mount (in a Mac Osx) the rom image (.img) file to edit and unmount again and then flash again in the TV BOX, but when I try to mount the rom image says “Image not recognized” so I can’t edit. Can you help me with this things please:
Can you tell me if I’m doing the process correct. I will mount de image, then i will find the “mesongxl.dtsi” file and edit the code and add the custom code 0x4040 and the keymap that i put below. Then I will unmount the image and then I will flash it in the tv box again. Its necesary to edit remote.cfg, remote.tab1 or remote.tab2 files from vendor/etc? If this process is not correct, or I’m missing something? can you explain me the correct one please!!?
Can I edit a rom image or that’s not possible?
Please help me I already spent too many days on this jajaja, I learn too much, but I cant fix it jajaj
Thanks you!
This is my key maping
0x4d 116 #ON /OFF
0x43 113 #MUTE
0x17 114 #VOL -
0x18 115 #VOL +
0x0b 103 #UP
0x11 106 #RIGHT
0x0e 108 #DOWN
0x10 105 #LEFT
0x0d 22 #OK
0x1a 102 #HOME
0x45 103 #MENU
0x42 158 #RETURN
0x01 2 #1
0x02 3 #2
0x03 4 #3
0x04 5 #4
0x05 6 #5
0x06 7 #6
0x07 8 #7
0x08 9 #8
0x09 10 #9
0x00 11 #0
0x47 #MOUSE
0x0c 111 #DELETE
fn_key_scancode = <0x47>;
cursor_left_scancode = <0x10>;
cursor_right_scancode = <0x11>;
cursor_up_scancode = <0x0b>;
cursor_down_scancode = <0x0e>;
cursor_ok_scancode = <0x0d>;