我是参考帖子http://www.enjoyself.net/index.php/archives/8.html设置红外线的
一.加载模块和获取信息input和event的信息
root@cubietruck:/home/cubie# modprobe sunxi_ir
root@cubietruck:/home/cubie#
root@cubietruck:/home/cubie# dmesg | grep sunxi-ir
input: sunxi-ir as /devices/virtual/input/input0
root@cubietruck:/home/cubie#
root@cubietruck:/home/cubie# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-ir"
P: Phys=RemoteIR/input1
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=sysrq rfkill kbd event0
B: PROP=0
B: EV=3
B: KEY=ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
二.创建创建 udev rule
root@cubietruck:/home/cubie# vim /etc/udev/rules.d/10-meleir.rules
UBSYSTEM=="input", ACTION=="add", KERNEL=="event0", ATTRS{name}=="sunxi-ir", SYM
LINK+="input/meleir"
~
~
~
~
"/etc/udev/rules.d/10-meleir.rules" 1L, 101C
三.编辑/etc/lirc/hardware.conf
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=""
#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="devinput"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/input/meleir"
MODULES=""
# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""
"/etc/lirc/hardware.conf" 23L, 596C
四.运行以下命令重启模块
# rmmod sunxi_ir
# /etc/init.d/udev restart
# /etc/init.d/lirc restart
# modprobe sunxi_ir
root@cubietruck:/home/cubie#
root@cubietruck:/home/cubie# rmmod sunxi_ir
Error: Module sunxi_ir is not currently loaded
提示模块没有正确加载,忽略了,继续下面步骤
root@cubietruck:/home/cubie# /etc/init.d/udev restart
Stopping the hotplug events dispatcher: udevd.
Starting the hotplug events dispatcher: udevd<30>udevd[3283]: starting version 5
udevd[3283]: starting version 175
.
重启udev成功,继续下面步骤
root@cubietruck:/home/cubie# /etc/init.d/lirc restart
No valid /etc/lirc/lircd.conf has been found..
Remote control support has been disabled..
Reconfigure LIRC or manually replace /etc/lirc/lircd.conf to enable..
提示没有有效配置,远程控制设备不可用,叫我重新配置LIRC和conf
而我不懂怎么配置。直接忽略了,继续下面步骤
root@cubietruck:/home/cubie# modprobe sunxi_ir
没提示失败
五.查看配置是否成功
root@cubietruck:/home/cubie# ls -l /dev/input
total 0
drwxr-xr-x 2 root root 120 Dec 25 14:15 by-id
drwxr-xr-x 2 root root 140 Dec 25 14:15 by-path
crw------- 1 root root 13, 64 Dec 25 14:15 event0
crw------- 1 root root 13, 65 Dec 25 14:15 event1
crw------- 1 root root 13, 66 Dec 25 14:15 event2
crw------- 1 root root 13, 67 Dec 25 14:15 event3
crw------- 1 root root 13, 68 Dec 25 14:15 event4
crw------- 1 root root 13, 63 Dec 25 14:15 mice
crw------- 1 root root 13, 32 Dec 25 14:15 mouse0
发现没有出现lrwxrwxrwx 1 root root 6 Jan 11 15:19 meleir -> event1这样类似的语句
这是我遇到的问题,现在我应该怎么处理这里的问题比较合适?
|