Thank you. LIRC is not needed at all, Linux event subsystem is enough.
i needed to run commands in the Linux shell of ODROID-C2
by pressing the colored buttons on the Samsung TV RC, and
I used lircd and irexec earlier for this purpose, look above.
At first I realized that Samsung remotes use the NEC protocol:
Then I scanned some codes I need: ir-keytable -t -v
And place it to file: /lib/udev/rc_keymaps/samsung.toml
name = "samsung"
protocol = "nec"
variant = "nec"
0x7076c = "KEY_RED"
0x70714 = "KEY_GREEN"
0x70715 = "KEY_YELLOW"
0x70716 = "KEY_BLUE"
The string of code initializing may be placed to rc.local, is it right?
/usr/bin/ir-keytable --clear --protocol=nec --write=/lib/udev/rc_keymaps/samsung.toml 2>/dev/null
Instead of irexec, I used the utility for handling Linux events:
apt-get install triggerhappy
And place configuration like this:
# Samsung TV Remote Control
KEY_RED 1 /usr/local/bin/script.sh red
KEY_GREEN 1 /usr/local/bin/script.sh green
KEY_YELLOW 1 /usr/local/bin/script.sh yellow
KEY_BLUE 1 /usr/local/bin/script.sh blue
Thats all, I hope that someone will be useful
apt purge lirc