Basic IR Support
#1
Hi, I just mounted the IR receiver that came with the basic Pine Remote on my board. After reading the User Manual and checking the schematics, I know now that the A64 has a dedicated IR receiver block that does low level decoding. According to http://linux-sunxi.org/IR there was legacy support for that for the other sunxi SoCs as a keyboard device and there is a newer driver for 4.x Linux. I had a look at the devicetree entries and it's there with the correct base address... Is this something we could enable in the 3.10.x kernel ?
Come have a chat in the Pine IRC channel >>
#2
Ok I enabled and built the kernel module sunxi-ir-rx in the latest longsleep kernel and that loads fine and creates /dev/input/event3 :


Code:
[11421.673001] Registered IR keymap rc_map_sunxi
[11421.673523] input: sunxi_ir_recv as /devices/soc.0/1f02000.s_cir/rc/rc0/input3
[11421.673676] rc0: sunxi_ir_recv as /devices/soc.0/1f02000.s_cir/rc/rc0
[11421.683893] lirc_dev: IR Remote Control driver registered, major 249
[11421.771356] IR NEC protocol handler initialized
[11421.772549] IR RC5(x) protocol handler initialized
[11421.775071] input: MCE IR Keyboard/Mouse (sunxi-rc-recv) as /devices/virtual/input/input4
[11421.775310] IR MCE Keyboard/mouse protocol handler initialized
[11421.777204] rc rc0: lirc_dev: driver ir-lirc-codec (sunxi-rc-recv) registered at minor = 0
[11421.777214] IR LIRC bridge handler initialized
[11421.777687] IR JVC protocol handler initialized
[11421.779092] IR RC6 protocol handler initialized
[11421.780438] IR SANYO protocol handler initialized
[11421.781451] IR Sony protocol handler initialized


Using a small tool from https://github.com/elopez/keybinder.git , binding keys from the Pine64 remote seems to work fine:


Code:
ubuntu@pine64:~/build/keybinder$ sudo ./keybinder /dev/input/event3
Reading key input from /dev/input/event3 (sunxi_ir_recv)
Loaded config items
Keycode 1 pressed
Keycode 2 pressed
Keycode 3 pressed
Keycode 5 pressed
Keycode 6 pressed
Keycode 77 pressed
Keycode 31 pressed
Keycode 10 pressed
Come have a chat in the Pine IRC channel >>
#3
(06-17-2016, 11:54 AM)xalius Wrote: Ok I enabled and built the kernel module sunxi-ir-rx in the latest longsleep kernel and that loads fine and creates /dev/input/event3 :

I managed to get it working without any hassle after updating the kernel to the latest (3.10.102 at time of writing), with the sunxi_ir_recv being registered as /dev/input/event4 right out of the box! So just have to figure out how to drive the keybinder tool.  Cool

If you haven't come across them yet, the update scripts in /usr/local/sbin are your friends! One script will check for and install updated longsleep kernels, and the other will check for and install uboot image updates...

Edit: Don't seem to be able to get keybinder to work... did you fiddle with any LIRC settings at all? evtest is picking up IR button presses ok, but I can't get irrecord or keybinder to respond. I thought that the 'values' that evtest gives for each key would be the code that keybinder wants, but maybe not?


Possibly Related Threads…
Thread Author Replies Views Last Post
  Programming languages support under PINE64 baryluk 6 13,385 09-23-2020, 11:46 PM
Last Post: Phillip Bell
  AXP803 Battery Charger Support xalius 14 26,586 12-22-2017, 08:59 AM
Last Post: Velociraptor
Wink Pine64 Will support Freenas or openmediavault ? joe 1 5,305 04-13-2017, 07:44 AM
Last Post: xalius
  Remote Desktop Support? Rochambeaux 20 32,379 10-01-2016, 05:08 PM
Last Post: HayseedGeek
  Binfmt_misc support cztian 1 4,042 08-17-2016, 11:49 PM
Last Post: longsleep
  Basic Pine64 Server Set-Up Guide rallar8 1 4,885 08-12-2016, 10:06 PM
Last Post: MarkHaysHarris777
Question Joystick/Gamepad support Drakuwa 3 6,607 08-10-2016, 10:12 AM
Last Post: xalius
Big Grin Funny ! Support Intel x86 linux applications on ARM-based ( PINE64 ) not freeware joe 10 17,945 08-09-2016, 05:59 PM
Last Post: dkryder
  Camera support - Ubuntu Xenial 16.04 LTS @lex 3 5,826 08-07-2016, 03:47 AM
Last Post: romansavrulin
  Virtualization Support soccercheng 12 19,328 07-14-2016, 11:04 AM
Last Post: mont3z

Forum Jump:


Users browsing this thread: 2 Guest(s)