Search This Blog

Apr 26, 2011

Wireless USB transceiver stuff


Get input devices.

Where get my wireless USB mouse device information?
$ cat /proc/bus/input/devices
I: Bus=0003 Vendor=045e Product=0745 Version=0111
N: Name="Microsoft Microsoft® Nano Transceiver v2.0"
P: Phys=usb-fsl-ehci.1-1.3/input0
S: Sysfs=/devices/platform/fsl-ehci.1/usb2/2-1/2-1.3/2-1.3:1.0/input/input3
U: Uniq=
H: Handlers=kbd event3 
B: EV=120013
B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=045e Product=0745 Version=0111
N: Name="Microsoft Microsoft® Nano Transceiver v2.0"
P: Phys=usb-fsl-ehci.1-1.3/input1
S: Sysfs=/devices/platform/fsl-ehci.1/usb2/2-1/2-1.3/2-1.3:1.1/input/input4
U: Uniq=
H: Handlers=kbd mouse1 event4 
B: EV=1f
B: KEY=837fff 2c3027 bf004444 0 0 1f0001 f84 8b27c000 667bfa d9415fed 8e0000 0 0 0
B: REL=3c3
B: ABS=1 0
B: MSC=10

I: Bus=0003 Vendor=045e Product=0745 Version=0111
N: Name="Microsoft Microsoft® Nano Transceiver v2.0"
P: Phys=usb-fsl-ehci.1-1.3/input2
S: Sysfs=/devices/platform/fsl-ehci.1/usb2/2-1/2-1.3/2-1.3:1.2/input/input5
U: Uniq=
H: Handlers=kbd js0 event5 
B: EV=10001f
B: KEY=837fff 2c3027 bf004444 0 c000000 1 10f84 8b27c007 ffff7bfa d941dfff febeffdf ffefffff ffffffff fffffffe
B: REL=40
B: ABS=ffffff01 701ff
B: MSC=10
From above messages, we can know this wireless USB transceiver contains 3 devices, there are keyboard,mouse, joystick. Also we know where they register.

Enable HID debug message output

If you want to see debug message when debugging HID device, please do following action.
$ echo 1 > /sys/module/hid/parameter
$ dmesg

Test mouse or keyboard under command line console.

$ cd /dev/input/
$ ls 
by-id    event0   event2   event4   js0      mouse0   uinput
by-path  event1   event3   event5   mice     mouse1
$ cat event4
# move your mouse or click on the buttons. We can see uart console output some character, that means mouse works.
S�v     S�v    S
S ����S  ����SS�' ����S�'  ����S�'S�F ����S�F  ����S�FS&f ����S)f  ����S1fSO� ����SS� 

Add other wireless USB transceiver support

We have a wireless transceiver, vendor is Sunplus, but i.MX53 has no response when plug in. The reason is that we didn't include its driver into kernel. Make one modification in imx5_defconfig, build uImage and done.
CONFIG_HID_SUNPLUS=y

Post a Comment