This is an old revision of the document!
About this Article
Cubieboard series have support for infra-read (IR) support and analog sound ouput. Together with mplayer, Cubieboard could be turned into a great music box.
Select the sunxi IR support in kernel config, it's straightforward.
<*> Device Drivers ---> <*> Input device support ---> <*> Keyboards ---> <*> sunxi IR support
If your kernel has already support IR feature, you can test the IR device interface.
root@Cubieboard1:~# dmesg | grep -i sunxi-ir [ 2.254701] input: sunxi-ir as /devices/virtual/input/input0
If you see the above line, /dev/input/event0 should be the IR device interface.
It is time to test your IR remote and get the keycodes.
root@Cubieboard1 ~# cat /dev/input/event0 | hexdump
Grasp your remote pointing to Cubieboad IR receiver and press a key, watch the output and last three columns, maybe like this
0000000 c0d6 528c c81c 0000 0001 0009 0001 0000 0000010 c0d6 528c c830 0000 0000 0000 0000 0000 0000020 c0d6 528c 9c3f 0004 0001 0009 0000 0000 0000030 c0d6 528c 9c51 0004 0000 0000 0000 0000 0000040 c0d7 528c 3275 0001 0001 0015 0001 0000 0000050 c0d7 528c 3292 0001 0000 0000 0000 0000 0000060 c0d7 528c 272b 0004 0001 0015 0000 0000 0000070 c0d7 528c 273e 0004 0000 0000 0000 0000
Pay attention to digits such as "0009", "0015", yes, they are the remote keycode, and you'd better write them down.
root@Cubieboard1:~# apt-get install lirc mplayer