Ir codes for Android 9 - Printable Version

+- PINE64 (
+-- Forum: ROCK64 (
+--- Forum: Android on Rock64 (
+--- Thread: Ir codes for Android 9 (/showthread.php?tid=10563)

Ir codes for Android 9 - Redwid - 07-05-2020

Is there any way to get IR codes on Android images.
Any drivers, tools ... etc presents there?
Grep shows something related irc and lirc:

./proc/kallsyms:0000000000000000 t nf_conntrack_irc_fini
./proc/kallsyms:0000000000000000 R __ksymtab_nf_nat_irc_hook
./proc/kallsyms:0000000000000000 r __kcrctab_nf_nat_irc_hook
./proc/kallsyms:0000000000000000 r __kstrtab_nf_nat_irc_hook
./proc/kallsyms:0000000000000000 t init_rc_map_lirc
./proc/kallsyms:0000000000000000 t nf_conntrack_irc_init
./proc/kallsyms:0000000000000000 t nf_nat_irc_init
./proc/kallsyms:0000000000000000 t exit_rc_map_lirc
./proc/kallsyms:0000000000000000 t nf_nat_irc_fini
./proc/kallsyms:0000000000000000 t __initcall_init_rc_map_lirc6
./proc/kallsyms:0000000000000000 t __initcall_nf_conntrack_irc_init6
./proc/kallsyms:0000000000000000 t __initcall_nf_nat_irc_init6
./proc/kallsyms:0000000000000000 D nf_nat_irc_hook
./proc/kallsyms:0000000000000000 d irc
./proc/kallsyms:0000000000000000 d lirc_map
./proc/kallsyms:0000000000000000 b lirc
./proc/kallsyms:0000000000000000 b irc_buffer_lock
./proc/kallsyms:0000000000000000 b irc_buffer
./proc/kallsyms:0000000000000000 b irc_exp_policy

RE: Ir codes for Android 9 - Redwid - 07-05-2020

A little bit more info about device:

getevent -lp /dev/input/event0
add device 1: /dev/input/event0
  name:    "ff1b0030.pwm"
    KEY (0001): KEY_1                KEY_2                KEY_3                KEY_4               
                KEY_5                KEY_6                KEY_7                KEY_8               
                KEY_9                KEY_0                KEY_BACKSPACE        KEY_HOME           
                KEY_UP                KEY_LEFT              KEY_RIGHT            KEY_DOWN           
                KEY_DELETE            KEY_MUTE              KEY_VOLUMEDOWN        KEY_VOLUMEUP       
                KEY_POWER            KEY_MENU              KEY_SETUP            KEY_WAKEUP         
                KEY_BACK              KEY_PLAYPAUSE        KEY_F13              KEY_F14             
                KEY_F15              KEY_F16              KEY_SEARCH            KEY_REPLY           
                KEY_TEXT              KEY_BLUE              KEY_CHANNELUP       
  input props:

+ this:

rk3328_box:/ # getevent -i /dev/input/event0                                                                                                                                                                                         
add device 1: /dev/input/event0
  bus:      0019
  vendor    0001
  product   0001
  version   0100
  name:     "ff1b0030.pwm"
  location: "gpio-keys/remotectl"
  id:       ""
  version:  1.0.1
    KEY (0001): 0002  0003  0004  0005  0006  0007  0008  0009
                000a  000b  000e  0066  0067  0069  006a  006c
                006f  0071  0072  0073  0074  008b  008d  008f
                009e  00a4  00b7  00b8  00b9  00ba  00d9  00e8
                0184  0191  0192
  input props:

Somehow this codes should be mapped to this remote?

RE: Ir codes for Android 9 - Redwid - 07-07-2020

Found more info.
About ir driver:
Source code of that driver:
Tool to get key info:
Chinese document regarding ir on rockchip:

I do have a device that could send any ir codes.
Doing a brute force right now.
Found that key codes:

0x404000FF or 0xFF -> KEY_0
0x404010EF -> KEY_8

RE: Ir codes for Android 9 - Redwid - 07-15-2020

Finally found this ir codes:

0x58A7; //KEY_HOME
0xA25D; //KEY_BACK
0x08F7; //KEY_LEFT
0x8877; //KEY_RIGHT
0xFB04F; //KEY_REPLY <- not working
0xF807; //KEY_SEARCH
0x50AF; //KEY_MUTE
0xE21D; //KEY_TEXT
0xD02F; //KEY_UP
0x708F; //KEY_DOWN
0x50AF; //KEY_MUTE
0xE00FF; //KEY_0
0x807F; //KEY_1
0x40BF; //KEY_2
0xE20DF; //KEY_4
0xA05F; //KEY_5
0x609F; //KEY_6
0x10EF; //KEY_8
0xE906F; //KEY_9

I've used this tool to find IR codes:

All codes in NEC 32 length format.
So sample curl to execute:
curl -X GET http://{your_device_ip}/msg?code=FF:NEC:32&simple=1

Unfortunately KEY_POWER ir code is unable to wake up device from power off state.
I've looked for home automation, so this is a kind of useless for me Sad