How to use IR in Linux

21 15059
cool, now it works.


Thank you - now I know what brand to set my universal remote to.

Post Last Edited by sashijoseph at 2014-8-27 00:29

afaik it decodes only NEC.
sashijoseph Posted at 2014-8-26 12:55

Post Last Edited by herb123456 at 2014-9-14 11:16

it still not working...

  1. root@lemaker:~# ls /sys/devices/virtual/input/input0
  2. capabilities  event0  id  modalias  name  phys  power  properties  subsystem  uevent  uniq
Copy the Code
and already change the script.bin

i run sudo keybinder /dev/input/event0 command, then press my air conditioner remote control button(just for test), there does not anything happen...what can i do now?
my os: Lubuntu v3.1.1

Post Last Edited by herb123456 at 2014-9-15 11:21


i used bin2fex tool to reverse my script.bin to script.fex

and i see in the script.fex is already is

ir_used = 1
ir0_rx = port:PB04<2><default><default><default>

any idea?

Reply 14# herb123456

http://wiki.lemaker.org/FAQ  See here Q15 for more details

I changed my script.bin

when i start keybinder is says :

Reading key input from /dev/input/event0 (sunxi-ir)
Loaded config items

when i cat the /dev/input/event0 nothing gets added when i press buttons

however since my xbmc is running with some buttons the volume responds (higher lower)

So this means my IR is receiving fine.

My OS is :
VERSION="14.04.1 LTS, Trusty Tahr"
PRETTY_NAME="Ubuntu 14.04.1 LTS"

what is going wrong ?

I've set all things and i receved the keycode when pushing the control buttom but how can I configure to do some python script when I push the buttom??



Edited by pohybel at Mon Jul 20, 2015 07:51

Is it possible to get "extended" keycode from /dev/input/event0?

My problem is that my Banana Pro is located in living room where I already have 2 remote controls (TV, Sat) and third for controlling banana board. Unfortunately some keycodes are the same in all of them so when I operating with my TV remote sometimes banana board receives it and executes some command - which is of course undesirable in this case.

AFAIK apart of keycode all remotes sends also additional information like address.

So is it possible to get full data send from remote controll (keycode>255)? I know that event0 emulates keyboard so keycode should be <255 but maybe it is possible to send unicode keycode (<65535)?

Can't you leave out the common keys and use only the ones which do not have a matching key in the other two remotes?

Suppose your Banana-Remote's PLAY-button command gets activated by your TV's VOL-button,it means both the buttons are somehow emitting the same code.So even if you map the PLAY-button to an extended keymap it will still get triggered by the TV-VOL since both buttons are the same as far as the ir-driver is concerned.

So you must choose the keys carefully,avoiding cross-match or else modify and compile the sunxi ir-driver to check address bits,so that only one remote gets selected for service and hoping the other remotes will have different unique addresses.

If you have downloaded the kernel sources for your distro try going through the sunxi-ir.c and ir-keymap.h files.

Thanks for answer sashijoseph. I've also figured out this solution but it is just a workaround which doesn't satisfies me. I need something which returns me full IR_DATA which is address + command (4 bytes of data instead of one).

The protocol is described eg. here: http://www.circuitvalley.com/201 ... remote-control.html

I've already found something which looks promising but right now I'm struggling with compilation:

You have to log in before you can reply Login | Sign Up

Points Rules