# BPI-M3 IR interface

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

**How to enable IR in BPI-M3 (Linux OS)**

Step 1: Insmod IR lib

```
$ sudo insmod /lib/modules/3.4.39-BPI-M3-Kernel/kernel/drivers/input/keyboard/sunxi-ir-rx.ko
```

Step 2: Turn on (IR debug mode)

```
$ cd /sys/module/sunxi_ir_rx/parameters
$ sudo su
$ echo 0xff > debug_mask
```

Step 3: Input IR keycode and check log

`$ dmesg`

```
[ 2797.200733] dcnt = 70 
[ 2797.200753] 351 active_delay = 128 
[ 2797.200772] 366 len = 153 
[ 2797.200795] IR code = 0x609ff708 
[ 2797.200821] IR RAW CODE : 159 
[ 2797.200903] IR CODE : 159 
[ 2797.201020] IR KEY VALE 159 
[ 2797.201047] ir_rx_irq_service: Rx Packet End, code=0x609ff708, ir_code=0x609
```

Ex: Open Browser (IR keycode=150)

![](/files/-M2HXHXufLTzU0BRrXGd)

demo to open Browser:

![](/files/-M2HXHXwNDLxKlQZ_puX)

Reference Key\_Map:

<https://www.redhat.com/archives/libvir-list/2011-May/msg01609.html>

**How to enable IR in BPI-M3 (Android)**

how to do check IR address on Android.

```
echo 0xff > /sys/module/sunxi_ir_rx/parameters

<7>[  625.998452] IR code = 0xf20d4040
<7>[  625.998473] IR RAW CODE : 13
<7>[  625.998542] IR CODE : 13
<7>[  625.998629] IR KEY VALE 13
<7>[  625.998653] ir_rx_irq_service: Rx Packet End, code=0xf20d4040, ir_code=0x 
<6>[  625.998717] cpus_wakeup_config_handler: address: 0x4040, powerkey: 0x0a
<6>[  626.002717] cpus_wakeup_config_handler: ok
```

BPI IR remoter control accessoires:

<https://bananapi.gitbooks.io/bpi-accessories/content/irremotecontrol.html>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bananapi.gitbook.io/bpi-m3/zh/bpim3irinterface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
