Armbian comes with both sunxi_ir_rx (Jernej’s backported OpenELEC version) and sunxi_cir and none is loaded by default.
—>
ArmbianではデフォルトでIRのカーネルモジュールは読み込まれていないようです。
IRモジュールとしてsunxi_ir_rxとsunxi_cirの2種類存在しますが、sunxi_cirをロードします。
########################################################
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--uinput"
# Don't start lircmd even if there seems to be a good config file
# START_LIRCMD=false
# Don't start irexec, even if a good config file seems to exist.
# START_IREXEC=false
# Try to load appropriate kernel modules
LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/lirc0"
MODULES="sunxi_cir"
# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""
########################################################
LIRCD_ARGS="--uinput"
# Try to load appropriate kernel modules
LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
irrecordについて補足説明です。repeat codeが取得できないとリモコンのキーボタンを押し続けてもキー入力がカウントされません。必ずrepeat codeが取得できているかどうか確認して下さい。取得できると任意のキー入力読取り後header, trail pulseと共に表示され、最後にChecking for toggle bit maskが表示されます(下記irrecordフロー参照)。
Please send the finished config files to <[email protected]> so that I
can make them available to others. Don't forget to put all information
that you can get about the remote control in the header of the file.
Press RETURN to continue.
Now start pressing buttons on your remote control.
It is very important that you press many different buttons and hold them
down for approximately one second. Each button should generate at least one
dot but in no case more than ten dots of output.
Don't stop pressing buttons until two lines of dots (2x80) have been
generated.
Press RETURN now to start recording.--->(1)参照
................................................................................
Found const length: 139005
Please keep on pressing buttons like described above.--->(2)参照
................................................................................
Space/pulse encoded remote control found.
Signal length is 67.
Found possible header: 8876 4438
Found trail pulse: 537
Found repeat code: 8881 2213
Signals are space encoded.
Signal length is 32
Now enter the names for the buttons.
Please enter the name for the next button (press <ENTER> to finish recording)
ch-
Now hold down button "ch-".
Please enter the name for the next button (press <ENTER> to finish recording)
ch
Now hold down button "ch".
Please enter the name for the next button (press <ENTER> to finish recording)
ch+
Now hold down button "ch+".
Please enter the name for the next button (press <ENTER> to finish recording)
prev
Now hold down button "prev".
Please enter the name for the next button (press <ENTER> to finish recording)
next
Now hold down button "next".
Please enter the name for the next button (press <ENTER> to finish recording)
pause
Now hold down button "pause".
Please enter the name for the next button (press <ENTER> to finish recording)
vol-
Now hold down button "vol-".
Please enter the name for the next button (press <ENTER> to finish recording)
vol+
Now hold down button "vol+".
............................................................
Please enter the name for the next button (press <ENTER> to finish recording)
9
Now hold down button "9".
Please enter the name for the next button (press <ENTER> to finish recording)
Checking for toggle bit mask.--->(3)参照
Please press an arbitrary button repeatedly as fast as possible.
Make sure you keep pressing the SAME button and that you DON'T HOLD
the button down!.
If you can't see any dots appear, then wait a bit between button presses.
Press RETURN to continue.
..............................
No toggle bit mask found.
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="car_remote"
REMOTE_MODULES="sunxi_cir" ここを指定
REMOTE_DRIVER="default" ここを指定
REMOTE_DEVICE="/dev/lirc0" ここを指定
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf" ここを指定
REMOTE_LIRCD_ARGS="--uinput" ここを指定
#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
#Disable kernel support.
#Typically, lirc will disable in-kernel support for ir devices in order to
#handle them internally. Set to false to prevent lirc from disabling this
#in-kernel support.
#DISABLE_KERNEL_SUPPORT="true"
#Enable lircd
START_LIRCD="true" ここを指定
#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"
#Try to load appropriate kernel modules
LOAD_MODULES="true"
# Default configuration files for your hardware if any
LIRCMD_CONF=""
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
A10 : Configuration files
The lirc configuration is mostly done in the lirc config directory, usually /etc/lirc. Besides this, there are occasionally needs to configure the kernel drivers using files in /etc/modprobe.d.
lirc_options.conf holds the lircd options. This includes driver, port and other important configuration. All of these options can be overridden on the lircd command line.
lircd.conf contains timing information. It’s used by lircd to convert raw data from the kernel to key symbols. As shipped, the lircd.conf is empty and just includes any configuration file in lircd.conf.d.
lircd.conf.d contains all used remote configuration files. When receiving data lircd will try to decode it, trying each of these files.
/etc/lirc/lircrc is an optional default lircrc file. Debian Stretch では、irexec.serviceはirexec.lirrcをデフォルトの設定ファイルとしているようです。
modprobe.d/blacklist-*. These contains a single blacklist directive used to disable kernel drivers which conflicts with lirc’s driver.
modprobe.d/options-*. Contains kernel module options e. g., which serial port the lirc_serial module should use.
$HOME/.config/lircrc is the main lircrc file. Many applications supporting LIRC have specific paths to their lircrc files.
# Sample mplayer lircrc configuration.
# This config assumes an MCE remote. You may need to change the button names
# if you have a different remote. Use the irw command to find the names for
# your remote's buttons.
#
# To use this config, paste it to the end of your ~/.lircrc (create the file if
# it doesn't exist).
include "/etc/lirc/vlc"
include "/etc/lirc/mplayer"