BPI-M2+ IR interface

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

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

4 test remote-control unit

evtest

choose "0" must xunxi-ir

please note:value 0 value 1

press is:1,unpress is:0

key 64 MOUSE WAKE
key 24 BACK WAKE_DROPPED
key 83 VOLUME_DOWN WAKE
key 91 VOLUME_UP WAKE

BPI-M2+ keycode:

IR Address: 4040

1.how to do check IR address on Android.

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

<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

demo IR remote control on youtube:

https://www.youtube.com/watch?v=HhW_G85Byio&feature=youtu.be

BPI IR remoter control accessoires:

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

results matching ""

    No results matching ""