|
Edited by osator at 2016-4-6 15:49
Now it's working but how can I record the keys from remote?
After cat < /proc/bus/input/devices :
...
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="MCE IR Keyboard/Mouse (sunxi-ir)"
P: Phys=/input0
S: Sysfs=/devices/virtual/input/input7
U: Uniq=
H: Handlers=sysrq kbd mouse2 event7
B: PROP=0
B: EV=100017
B: KEY=30000 0 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: REL=3
B: MSC=10
after evtest /dev/input/event6:
orangepi@orangepiplus2:~$ sudo evtest /dev/input/event6
[sudo] password for orangepi:
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "sunxi-ir"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 152 (KEY_SCREENLOCK)
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Key repeat handling:
Repeat type 20 (EV_REP)
Repeat code 0 (REP_DELAY)
Value 500
Repeat code 1 (REP_PERIOD)
Value 125
Properties:
Testing ... (interrupt to exit)
Event: time 1459928696.216836, type 4 (EV_MSC), code 4 (MSC_SCAN), value 16
Event: time 1459928696.216843, -------------- EV_SYN ------------
Event: time 1459928697.517258, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1d
Event: time 1459928697.517265, -------------- EV_SYN ------------
Event: time 1459928698.013873, type 4 (EV_MSC), code 4 (MSC_SCAN), value 19
Event: time 1459928698.013880, -------------- EV_SYN ------------
^Corangepi@orangepiplus2:~$
remote send the code of buttons but when I tried to record it:
orangepi@orangepiplus2:~$ sudo irrecord -f -H devinput -d /dev/input/event6 my.conf
irrecord - application for recording IR-codes for usage with lirc
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)
irrecord: initializing '/dev/input/event6'
This program will record the signals from your remote control
and create a config file for lircd.
Usually it's not necessary to create a new config file for devinput
devices. A generic config file can be found at:
http://www.lirc.org/remotes/devinput/
You should try this config file before creating your own config file.
A proper config file for lircd is maybe the most vital part of this
package, so you should invest some time to create a working config
file. Although I put a good deal of effort in this program it is often
not possible to automatically recognize all features of a remote
control. Often short-comings of the receiver hardware make it nearly
impossible. If you have problems to create a config file READ THE
DOCUMENTATION of this package, especially section "Adding new remote
controls" for how to get help.
If there already is a remote control of the same brand available at
http://www.lirc.org/remotes/ you might also want to try using such a
remote as a template. The config files already contain all
parameters of the protocol used by remotes of a certain brand and
knowing these parameters makes the job of this program much
easier. There are also template files for the most common protocols
available in the remotes/generic/ directory of the source
distribution of this package. You can use a template files by
providing the path of the file as command line parameter.
Please send the finished config files to <lirc@bartelmus.de> so that I
can make them available to others. Don't forget to put all information
that you can get about the remote control in the header of the file.
Press RETURN to continue.
Hold down an arbitrary button.
.irrecord: gap not found, can't continue
irrecord: closing '/dev/input/event6'
|
|