Template:Linux-IR-Receiver/zh

From FriendlyELEC WiKi
Jump to: navigation, search

注意: 请先检查红外接收器是否存在。
红外接收功能默认是关闭的, 可以通过npi-config使能:

$ npi-config
    6 Advanced Options     Configure advanced settings
        A8 IR              Enable/Disable IR
            ir Enable/Disable ir[enabled]

重启系统, 然后使用下列命令测试红外接收:

$ apt-get install ir-keytable
$ echo "+rc-5 +nec +rc-6 +jvc +sony +rc-5-sz +sanyo +sharp +mce_kbd +xmp" > /sys/class/rc/rc0/protocols   # 使能紅外协议
$ ir-keytable -t
Testing events. Please, press CTRL-C to abort.

ir-keytable -t用于检查是否有接收到红外信号, 使用任意遥控器发送按键信息给红外接收器, 可以看到类似下列信息:

1522404275.767215: event type EV_MSC(0x04): scancode = 0xe0e43
1522404275.767215: event type EV_SYN(0x00).
1522404278.911267: event type EV_MSC(0x04): scancode = 0xe0e42
1522404278.911267: event type EV_SYN(0x00).