# BPI-M1 IR interface

BPI-M1 support IR interface on board. you can use it as remote control.

How to use IR interface

test on bananian image:

1,install lirc

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

2,edit /etc/lirc/hardware.conf as below:

`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,test lirc

`service lirc start`

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HXCKhSwPzyk1wUAql%2FIR%EF%BC%91.png?generation=1584080169178261\&alt=media)

4 test remote-control unit

`evtest`

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HXCKjCUlcmLFfajhl%2FIR%202.png?generation=1584080169604340\&alt=media)

choose "0" must xunxi-ir

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HXCKlwZG-fNOTedaJ%2FIR%EF%BC%93.png?generation=1584080173835400\&alt=media)

please note:value 0 value 1

press is:1，unpress is:0
