Recent Linux kernels include support for infrared remote controls and so the requirement for LIRC (Linux Infrared Remote Control) has been diminishing, but nevertheless some systems still use it. I was doing some work with LIRC recently and I couldn’t find a configuration file for my remote control, a Sony RM-ADP090. It should be possible to use the irrecord
tool to create a LIRC configuration file for an unknown remote control, but for some reason this didn’t work for mine so in the end I created a configuration file manually: I worked out the scancode for each key by staring at the output from running mode2 -d /dev/lirc0
and took the header information from an existing configuration file.
(I was helped in my understanding by a fascinating article which explains how the infrared signalling works with a Sony remote control – you can find it at http://www.righto.com/2010/03/understanding-sony-ir-remote-codes-lirc.html .)
Interestingly I discovered that while most of the keys use 20 bit codes, some of the keys use 15 bit codes and a few of them use 12 bit codes, hence there are three separate sections in the configuration file.
In the end I never used the configuration file in anger, which means that it has had very little testing, but I’m posting it here in case it’s of use to anyone.
Vaughan
#
# This lirc configuration file was constructed manually
# July 2020
#
# contributed by Vaughan Harper
#
# brand: Sony
# model: RM-ADP090
# devices: Sony BDV-E2100 Home Cinema System
#
# remote layout:
# +-------------------------------------------------+
# | (EJECTCD) (TV_SPEAKER) (TV_POWER) (POWER) |
# | (SLEEP) (1) (2) (3) |
# | (BLUETOOTH) (4) (5) (6) |
# | (FUNCTION) (7) (8) (9) |
# | (FOOTBALL) (AUDIO) (0) (SUBTITLE) |
# | (RED) (GREEN) (YELLOW) (BLUE) |
# | (TOP MENU) (UP) (POP UP/MENU) |
# | (LEFT) (OK) (RIGHT) |
# | (RETURN) (DOWN) (OPTIONS) |
# | (SOUND_MODE_DOWN) (HOME) (SOUND_MODE_UP) |
# | (MUSIC_EQ) (PREVIOUS) (NEXT) (SEN) |
# | (REWIND) (PLAY) (FASTFORWARD) |
# | (DISPLAY) (PAUSE) (STOP) |
# | (VOLUMEUP) (TV_VOL_UP) |
# | (MUTE) (TV_SOURCE) |
# | (VOLUMEDOWN) (TV_VOL_DOWN) |
# +-------------------------------------------------+
begin remote
# 20 bit key codes:
name SONY_RM-ADP090
bits 20
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 2468 531
one 1255 530
zero 660 530
gap 44657
min_repeat 2
toggle_bit 0
begin codes
KEY_1 0x0000000000000108
KEY_2 0x0000000000080108
KEY_3 0x0000000000040108
KEY_4 0x00000000000C0108
KEY_5 0x0000000000020108
KEY_6 0x00000000000A0108
KEY_7 0x0000000000060108
KEY_8 0x00000000000E0108
KEY_9 0x0000000000010108
KEY_0 0x0000000000090108
KEY_POP_UP 0x0000000000058108
KEY_TOP_MENU 0x0000000000098108
KEY_DOWN 0x000000000009E108
KEY_LEFT 0x000000000005E108
KEY_RIGHT 0x00000000000DE108
KEY_OK 0x000000000003E108
KEY_UP 0x000000000001E108
KEY_REWIND 0x00000000000CC108
KEY_FASTFORWARD 0x000000000002C108
KEY_PREVIOUS 0x000000000000C108
KEY_NEXT 0x000000000008C108
KEY_EJECTCD 0x000000000003C108
KEY_TV_SPEAKER 0x00000000000A210C
KEY_BLUETOOTH 0x000000000008E10C
KEY_FOOTBALL 0x00000000000E810E
KEY_AUDIO 0x0000000000048108
KEY_SUBTITLE 0x0000000000088108
KEY_RED 0x00000000000A010C
KEY_GREEN 0x000000000006010C
KEY_YELLOW 0x00000000000E010C
KEY_BLUE 0x000000000002010C
KEY_RETURN 0x00000000000BE108
KEY_OPTIONS 0x00000000000CE108
KEY_SEN 0x000000000000A10E
KEY_DISPLAY 0x0000000000018108
end codes
end remote
begin remote
# 15 bit key codes:
name SONY_RM-ADP090_2
bits 15
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 2468 531
one 1255 530
zero 660 530
gap 44657
min_repeat 2
toggle_bit 0
begin codes
KEY_PLAY 0x000000000000200B
KEY_STOP 0x000000000000000B
KEY_PAUSE 0x000000000000400B
KEY_POWER 0x000000000000540A
KEY_SLEEP 0x000000000000030A
KEY_FUNCTION 0x0000000000004B0B
KEY_SOUND_MODE_DOWN 0x0000000000007B0B
KEY_HOME 0x000000000000700B
KEY_SOUND_MODE_UP 0x0000000000003B0B
KEY_MUSIC_EQ 0x000000000000490B
KEY_MUTE 0x000000000000140A
KEY_VOLUMEUP 0x000000000000240A
KEY_VOLUMEDOWN 0x000000000000640A
end codes
end remote
begin remote
# 12 bit key codes:
name SONY_RM-ADP090_3
bits 12
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 2468 531
one 1255 530
zero 660 530
gap 44657
min_repeat 2
toggle_bit 0
begin codes
KEY_TV_POWER 0x0000000000000A90
KEY_TV_VOL_UP 0x0000000000000490
KEY_TV_VOL_DOWN 0x0000000000000C90
KEY_TV_SOURCE 0x0000000000000A50
end codes
end remote
Leave a Reply