![Pi-PC-2-详情页_26.jpg Pi-PC-2-详情页_26.jpg](https://static.assets-stash.eet-china.com/forum/202111/23/172416lmps24ymyxu4ms52.jpg)
linux5.4 红外接收测试
1) 红外功能在 dts 中默认是关闭的,需要在 /boot/orangepiEnv.txt 中设置 overlays=cir 才会打开
![图1.png 图1.png](https://static.assets-stash.eet-china.com/forum/202111/23/172452iumk9dqmbqqms7nq.png)
2) 然后重启系统,启动时,在 u-boot 的启动 log 中可以看到红外 DT overlays 的配 置输出
![图2.png 图2.png](https://static.assets-stash.eet-china.com/forum/202111/23/172513u5eigs6ix6ix5ere.png)
3) 安装 ir-keytable 红外测试软件
![图3.png 图3.png](https://static.assets-stash.eet-china.com/forum/202111/23/172528oz82023fdgl8eheh.png)
4) 然后执行 ir-keytable 可以查看红外设备的信息
![图4.png 图4.png](https://static.assets-stash.eet-china.com/forum/202111/23/172540oe3khgeykyfgshgk.png)
5) 测试红外接收功能前需要准备一个红外遥控器
![图5.png 图5.png](https://static.assets-stash.eet-china.com/forum/202111/23/172551wjwryb1da3pbnj9y.png)
6) 在终端中输入 ir-keytable -c -p NEC -t 命令,然后使用红外遥控器对着 Orange Pi 开发板的红外接收头按下按键就能在终端中看到接收到的按键编码了
![图6.png 图6.png](https://static.assets-stash.eet-china.com/forum/202111/23/172601ihr8jcdtiprrrnn8.png)
linux3.10 红外接收测试
1) 首先安装 ir-keytable 红外测试软件
![图2-1.png 图2-1.png](https://static.assets-stash.eet-china.com/forum/202111/23/172611kf8bmqo1da0xodj8.png)
2) 测试红外接收功能前需要准备一个红外遥控器
![图2-2.png 图2-2.png](https://static.assets-stash.eet-china.com/forum/202111/23/172622fz79xmxmkk98zk5t.png)
3) 在终端中输入 ir-keytable -t 命令,然后使用红外遥控器对着 Orange Pi 开发板的 红外接收头按下按键就能在终端中看到接收到的按键编码了
![图2-3.png 图2-3.png](https://static.assets-stash.eet-china.com/forum/202111/23/172632d4y63xt3rti322vm.png)