accessory:connectivity:ir_remote_controller

IR Remote Controller

Manufacturer Code: 0x4DB2

Button IR code Scancode Android
Power0xDC116KEYCODE_POWER
Mute0x88113KEYCODE_VOLUME_MUTE
Home0x82102KEYCODE_HOME
OK0xCE97KEYCODE_DPAD_CENTER
Up0xCA103KEYCODE_DPAD_UP
Left0x99105KEYCODE_DPAD_LEFT
Right0xC1106KEYCODE_DPAD_RIGHT
Down0xD2108KEYCODE_DPAD_DOWN
Menu0xC5139KEYCODE_MENU
Back0x9A158KEYCODE_BACK
Volume Down0x81109KEYCODE_VOLUME_DOWN
Volume Up0x80104KEYCODE_VOLUME_UP

The IR remote key map is defined in /system/etc/remote.conf file.
Default IR protocol is NEC type.

Manufacturer Code ( Address Code | Inverted Address Code )
: 0x4DB2

Data Code (IR Code | Inverted IR Code)

Button IR code on Android IR code on LIRC Data code based on NEC event
Power0xDC0x3B0x3BC4KEY_POWER
Mute0x880x110x11EEKEY_MUTE
Home0x820x410x41BEKEY_HOME
OK0xCE0x730x738CKEY_ENTER
Up0xCA0x530x53ACKEY_UP
Left0x990x990x9966KEY_LEFT
Right0xC10x830x837CKEY_RIGHT
Down0xD20x4B0x4BB4KEY_DOWN
Menu0xC50xA30xA35CKEY_MENU
Back0x9A0x590x59A6KEY_BACK
Volume Down0x810x810x817EKEY_VOLUMEDOWN
Volume Up0x800x010x01FEKEY_VOLUMEUP

Data format of Hardkernel stock remote controller is based on NEC protocol.
And NEC transmission code is configured as following.

  • Address code 8bit : 0x4D (0100 1101b), Actual address code is 0xB1 and 0x4D is the LSB/MSB swapped code of 0xB2 for LIRC format.
  • Inverted Address code 8bit : 0xB2 (1011 0010b), 0/1 inverted code of 0x4D
  • Data code 8bit
  • Inverted Data code 8bit


For example, KEY_POWER format is as following.
[ Address code | Inverted Address code | IR code | Inverted IR code ]
= 0x4d | 0xb2 | 0x3b | 0xc4 = 0x4db23bc4

You can confirm the full data format using irw command.

root@odroid:~# irw
000000004db23bc4 01 KEY_POWER odroid
000000004db211ee 01 KEY_MUTE odroid
000000004db241be 00 KEY_HOME odroid
000000004db2738c 00 KEY_ENTER odroid

Please note that IR code format that is configured LIRC is different (lsb/msb position swapped) from its format on Android remote.

  • accessory/connectivity/ir_remote_controller.txt
  • Last modified: 2020/04/06 10:36
  • by joy.cho