> For the complete documentation index, see [llms.txt](https://bananapi.gitbook.io/bpi-m1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bananapi.gitbook.io/bpi-m1/zh/bpi-m1irinterface.md).

# bpi-m1irinterface

## 香蕉派 Banana Pi （BPI-M1）

香蕉派 Banana Pi （BPI-M1）拥有一个红外接口，因此您可以很容易的使用普通遥控器来控制您的板卡

如何使用红外接口：

1,安装 lirc

```
apt-get install lirc 
apt-get install evtest
```

2,编辑 /etc/lirc/hardware.conf 文件

```
nano /etc/lirc/hardware.conf
```

## /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="UNCONFIGURED"

## usually /dev/lirc0 is the correct setting for systems using udev

DEVICE="/dev/input/event0"\
MODULES="sunxi-ir"\`\`\`

ctrl+O save and ctrl+x exit.

3,测试 lirc

sudo `service lirc start`

![](/files/-M2HX8504ZGjj2BY3oV5)

4 测试remote-control unit

`evtest`

![](/files/-M2HX852goAGbfUsZSpR)

choose "0" must xunxi-ir

![](/files/-M2HX854Jw5BVVnqj_ZW)

please note:value 0 value 1

press is:1，unpress is:0
