我已经在 Raspberry Pi(运行 Wheezy)上安装了 lirc,但无法让它发送任何信号。
LED 已正确连接(使用 python 脚本进行测试)。
看到它工作在 youtube 上。
我用了这个网站安装 lirc。
以下是 的内容/etc/modules
:
snd-bcm2835
lirc_dev
lirc_rpi gpio_out_pin=22
的内容/etc/lirc/hardware.conf
# /etc/lirc/hardware.conf
LIRCD_ARGS="--uinput"
LOAD_MODULES=true
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
LIRCD_CONF=""
LIRCMD_CONF=""
内容/etc/lirc/lircd.conf
# brand: TV LG 42"LD420
# model no. of remote control: AKB72915207
begin remote
name LG
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 9056 4448
one 601 1647
zero 601 538
ptrail 601
repeat 9081 2199
pre_data_bits 16
pre_data 0x20DF
gap 108229
toggle_bit_mask 0x0
begin codes
KEY_POWER 0x10EF # Was: power
energy 0xA956
avmode 0x0CF3
input 0xD02F
tvrad 0x0FF0
KEY_1 0x8877 # Was: 1
KEY_2 0x48B7 # Was: 2
KEY_3 0xC837 # Was: 3
KEY_4 0x28D7 # Was: 4
KEY_5 0xA857 # Was: 5
KEY_6 0x6897 # Was: 6
KEY_7 0xE817 # Was: 7
KEY_8 0x18E7 # Was: 8
KEY_9 0x9867 # Was: 9
KEY_0 0x08F7 # Was: 0
KEY_LIST 0xCA35 # Was: list
q.view 0x58A7
KEY_VOLUMEUP 0x40BF # Was: vol_up
KEY_VOLUMEDOWN 0xC03F # Was: vol_down
KEY_CHANNELUP 0x00FF # Was: ch_up
KEY_CHANNELDOWN 0x807F # Was: ch_down
KEY_FAVORITES 0x7887 # Was: fav
ratio 0x9E61
KEY_MUTE 0x906F # Was: mute
KEY_MENU 0xC23D # Was: menu
KEY_INFO 0xD52A # Was: guide
q.menu 0xA25D
KEY_UP 0x02FD # Was: up
KEY_DOWN 0x827D # Was: down
KEY_LEFT 0xE01F # Was: left
KEY_RIGHT 0x609F # Was: right
KEY_OK 0x22DD # Was: ok
KEY_BACK 0x14EB # Was: back
KEY_INFO 0x55AA # Was: info
KEY_EXIT 0xDA25 # Was: exit
KEY_RED 0x4EB1 # Was: red
KEY_GREEN 0x8E71 # Was: green
ellow 0xC639
KEY_BLUE 0x8679 # Was: blue
KEY_BLUE 0x8679 # Was: blue
exit2 0x04FB
t.opt 0x847B
KEY_SUBTITLE 0x9C63 # Was: subtitle
KEY_STOP 0x8D72 # Was: stop
KEY_PLAY 0x0DF2 # Was: play
KEY_PAUSE 0x5DA2 # Was: pause
KEY_REWIND 0xF10E # Was: <<
KEY_FORWARD 0x718E # Was: >>
simplink 0x7E81
end codes
end remote
KEY_POWER
然后我创建了一个脚本来多次关闭电源按钮 ( ):
#! /bin/bash
powerkey(){
counter=0
while [ $counter -lt 15 ]; do
echo $counter
irsend SEND_ONCE LG KEY_POWER
sleep 0.1
let counter=counter+1
done
}
powerkey
exit 0
数字回显到控制台,但 IRLED 不亮。我还尝试运行 irsend SEND_START LG KEY_POWER - 相同的结果
我还在 bash 脚本之外的控制台中对此进行了测试,但 IRLED 仍然保持黑暗。
这是结果ls -l /dev/ | grep lirc
crw-rw---T 1 root video 244, 0 Jan 1 1970 lirc0
lrwxrwxrwx 1 root root 21 Sep 30 00:00 lircd -> ../var/run/lirc/lircd
有任何想法吗?
PS我问这个unix.
是因为它是L伊努克斯我红外线右表情C控制