LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   usb keyboard identified and events shown but key character not shown on the prompt (https://www.linuxquestions.org/questions/linux-software-2/usb-keyboard-identified-and-events-shown-but-key-character-not-shown-on-the-prompt-4175486210/)

flyxtop 11-28-2013 11:16 PM

usb keyboard identified and events shown but key character not shown on the prompt
 
Hi everyone,

I'm trying to hook up my USB keyboard to our embedded system.
FOr now I'm connecting to the embedded system usnig UART(serial port) through usb port (my linux machine to the embedded system board. embeded system has USB slave port).

Now I'm trying to hookup USB keybaord to the USB master host port on the embedded system. I can see the USB enumeration has passed and when I add EVDBG in the configuration(event debug), when press the key, I can see events going up (like key 'A' pressed.. and released..)
Below is the prints I added and those coming from EVDBG driver.(it seems to be a kind of driver)
starting hid_irq_in()-260,drivers/hid/usbhid/hid-core.c
starting usb_hidinput_input_event()-639,drivers/hid/usbhid/hid-core.c
evbug: Event. Dev: input0, Type: 4, Code: 4, Value: 458756
evbug: Event. Dev: input0, Type: 1, Code: 30, Value: 1
evbug: Event. Dev: input0, Type: 0, Code: 0, Value: 0

evbug: Event. Dev: input0, Type: 1, Code: 30, Value: 2
evbug: Event. Dev: input0, Type: 0, Code: 0, Value: 1
.... many such lines ...
evbug: Event. Dev: input0, Type: 1, Code: 30, Value: 2
evbug: Event. Dev: input0, Type: 0, Code: 0, Value: 1

starting hid_irq_in()-260,drivers/hid/usbhid/hid-core.c
starting usb_hidinput_input_event()-639,drivers/hid/usbhid/hid-core.c
evbug: Event. Dev: input0, Type: 4, Code: 4, Value: 458756
evbug: Event. Dev: input0, Type: 1, Code: 30, Value: 0
evbug: Event. Dev: input0, Type: 0, Code: 0, Value: 0
When I cat /proc/bus/input/devices, it shows this.
kobject: 'input0' (c7f659a0): fill_kobj_path: path = '/devices/platform/my-hcd/usb1/1-1/1-1:1.0/input/input0'
kobject: 'input1' (c7ccd9a0): fill_kobj_path: path = '/devices/platform/my-hcd/usb1/1-1/1-1:1.1/input/input1'
I: Bus=0003 Vendor=045e Product=0780 Version=0111
N: Name="Microsoft Comfort Curve Keyboard 3000"
P: Phys=usb-my-hcd-1/input0
S: Sysfs=/devices/platform/my-hcd/usb1/1-1/1-1:1.0/input/input0
U: Uniq=
H: Handlers=sysrq kbd event0 evbug
B: PROP=0
B: EV=120013
B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
B: MSC=10
B: LED=107

I: Bus=0003 Vendor=045e Product=0780 Version=0111
N: Name="Microsoft Comfort Curve Keyboard 3000"
P: Phys=usb-my-hcd-1/input1
S: Sysfs=/devices/platform/my-hcd/usb1/1-1/1-1:1.1/input/input1
U: Uniq=
H: Handlers=sysrq kbd event1 evbug
B: PROP=0
B: EV=10001f
B: KEY=4837fff 72ff32d bf544446 0 0 1 30f90 8b17c007 ffff7bfa d9415fff febeffdf ffefffff ffffffff fffffffe
B: REL=40
B: ABS=1 0
B: MSC=10
As shown above, I can print the key events in the debug event handler, but I don't know how to make the key values appear in the prompt. How do I make sure it's connected to correct event handler? It's being handled by generic-usb driver, is it correct? Should I use any mapping to /dev/ttyx ? Any suggestion will be appreciated. Currently the console is connected thruogh uart serail port(through USB slave port on the embedded system) but how can I switch the input to the keyboard(connected through USB host port)? Too many questions to ask...
Thank you!

Chan Kim / ETRI


All times are GMT -5. The time now is 04:48 PM.