Re: Writing HID driver for a USB phone handset IPEVO VP170 (0x1778:0x0403)

"Robin H. Johnson" <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mon, Mar 19, 2007 at 02:34:20PM +0100, Jiri Kosina wrote:
> On Mon, 19 Mar 2007, Robin H. Johnson wrote:
> 
> > Here is the interface and endpoint for the controls. I find it odd that the HID
> > Report Descriptor is not present. I suspect it will contain the LED control as
> > well.
> 
> Could you please compile some recent kernel with HID debugging support 
> (Device Drivers -> HID devices -> HID debugging support in menuconfig), 
> and show us the output both from the time you connect the device (this 
> will give, among other things, a report descriptor, so it will be possible 
> to see how to interpret the data from the device)? This will also log the 
> contents of received reports when you press the buttons, and also the 
> mappings that hid-input has established (if any) when parsing the report 
> descriptor.

The attached file usb-capture-startup-ipevo.log details the hid-debug output
from when I plug it in, to when it produces no more automatic output.

Thereafter, the output looks like this for all button presses.
Notice the X and Y in the output. I have a detailed mapping of the keys below.
[ 3479.472985] drivers/hid/hid-core.c: report (size 7) (unnumbered)
[ 3479.472985] drivers/hid/hid-core.c: report 0 (size 7) =  f0 XX YY 00 00 00 00
[ 3479.472985] hid-debug: input Consumer.00e9 = 0
[ 3479.472985] hid-debug: input Consumer.00ea = 0
[ 3479.472985] hid-debug: input Consumer.00e2 = 0
[ 3479.472985] hid-debug: input Consumer.0000 = 0
[ 3479.472985] hid-debug: input Consumer.0000 = 1
[ 3479.472985] hid-debug: input Consumer.0000 = 1
[ 3479.472985] hid-debug: input Consumer.0000 = 1
[ 3479.472985] hid-debug: input Consumer.0000 = 1
[ 3479.472985] hid-debug: input Consumer.0000 = XX
[ 3479.472985] hid-debug: input Consumer.0000 = YY
[ 3479.472985] hid-debug: input Consumer.0000 = 0
[ 3479.472985] hid-debug: input Consumer.0000 = 0
[ 3479.472985] hid-debug: input Consumer.0000 = 0
[ 3479.472985] hid-debug: input Consumer.0000 = 0

YY is always 0..3, seems to be a small cycle counter (that wraps) over the
scope of ALL buttons. Eg pressing Mute, then Keypad7 will increment the counter
by two.

XX mapping table (hex):
1c = 'Skype'
c1 = 'Out'/+
c3 = 'List'
1d = Selector-Up
1e = Selector-Down
1f = No/Onhook
20 = Yes/Offhook
2f = Mute
f1 = Circle (GROUP 0)
f2 = Diamond
f3 = Square
32 = Volume Up
33 = Volume Down
b0 = Keypad 0
b1 = Keypad 1
b2 = Keypad 2
b3 = Keypad 3
b4 = Keypad 4
b5 = Keypad 5
b6 = Keypad 6
b7 = Keypad 7
b8 = Keypad 8
b9 = Keypad 9
ba = Keypad *
bb = Keypad #

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Council Member
E-Mail     : [email protected]
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
usb-capture-startup-ipevo.log (text/plain, 8.1 KB)
[ 3397.809660] usb 3-1: new full speed USB device using uhci_hcd and address 2
[ 3397.966326] usb 3-1: configuration #1 chosen from 1 choice
[ 3397.972993] drivers/usb/input/hid-core.c: report descriptor (size 50, read 50) =  05 0c 09 01 a1 01 15 00 25 01 09 e9 09 ea 75 01 95 02 81 02 09 e2 09 00 81 06 09 00 95 04 81 02 26 ff 00 09 00 75 08 95 06 81 02 09 00 95 07 91 02 c0
[ 3397.976326] drivers/hid/hid-core.c: report (size 7) (unnumbered)
[ 3397.976326] drivers/hid/hid-core.c: report 0 (size 7) =  20 00 00 00 00 00 00
[ 3397.976326] hid-debug: input Consumer.00e9 = 0
[ 3397.976326] hid-debug: input Consumer.00ea = 0
[ 3397.976326] hid-debug: input Consumer.00e2 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 1
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326] hid-debug: input Consumer.0000 = 0
[ 3397.976326]   INPUT[INPUT]
[ 3397.976326]     Field(0)
[ 3397.976326]       Usage(2)
[ 3397.976326]         Consumer.00e9
[ 3397.976326]         Consumer.00ea
[ 3397.976326]       Logical Minimum(0)
[ 3397.976326]       Logical Maximum(1)
[ 3397.976326]       Report Size(1)
[ 3397.976326]       Report Count(2)
[ 3397.976326]       Report Offset(0)
[ 3397.976326]       Flags( Variable Absolute )
[ 3397.976326]     Field(1)
[ 3397.976326]       Usage(2)
[ 3397.976326]         Consumer.00e2
[ 3397.976326]         Consumer.0000
[ 3397.976326]       Logical Minimum(0)
[ 3397.976326]       Logical Maximum(1)
[ 3397.976326]       Report Size(1)
[ 3397.976326]       Report Count(2)
[ 3397.976326]       Report Offset(2)
[ 3397.976326]       Flags( Variable Relative )
[ 3397.976326]     Field(2)
[ 3397.976326]       Usage(4)
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]       Logical Minimum(0)
[ 3397.976326]       Logical Maximum(1)
[ 3397.976326]       Report Size(1)
[ 3397.976326]       Report Count(4)
[ 3397.976326]       Report Offset(4)
[ 3397.976326]       Flags( Variable Absolute )
[ 3397.976326]     Field(3)
[ 3397.976326]       Usage(6)
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]       Logical Minimum(0)
[ 3397.976326]       Logical Maximum(255)
[ 3397.976326]       Report Size(8)
[ 3397.976326]       Report Count(6)
[ 3397.976326]       Report Offset(8)
[ 3397.976326]       Flags( Variable Absolute )
[ 3397.976326]   OUTPUT[OUTPUT]
[ 3397.976326]     Field(0)
[ 3397.976326]       Usage(7)
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]         Consumer.0000
[ 3397.976326]       Logical Minimum(0)
[ 3397.976326]       Logical Maximum(255)
[ 3397.976326]       Report Size(8)
[ 3397.976326]       Report Count(7)
[ 3397.976326]       Report Offset(0)
[ 3397.976326]       Flags( Variable Absolute )
[ 3397.976326] Mapping: Consumer.00e9 ---> Key.VolumeUp
[ 3397.976326] Mapping: Consumer.00ea ---> Key.VolumeDown
[ 3397.976326] Mapping: Consumer.00e2 ---> Key.Mute
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] Mapping: Consumer.0000 ---> IGNORED
[ 3397.976326] input: ÿ Free-1 USB Phone as /class/input/input6
[ 3397.976326] input: USB HID v1.00 Device [ÿ Free-1 USB Phone] on usb-0000:00:1d.1-1
[ 3397.982993] drivers/hid/hid-core.c: report (size 7) (unnumbered)
[ 3397.982993] drivers/hid/hid-core.c: report 0 (size 7) =  20 00 00 00 00 00 00
[ 3397.982993] hid-debug: input Consumer.00e9 = 0
[ 3397.982993] hid-debug: input Consumer.00ea = 0
[ 3397.982993] hid-debug: input Consumer.00e2 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 1
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3397.982993] hid-debug: input Consumer.0000 = 0
[ 3398.309660] drivers/hid/hid-core.c: report (size 7) (unnumbered)
[ 3398.309660] drivers/hid/hid-core.c: report 0 (size 7) =  60 00 00 00 00 00 00
[ 3398.309660] hid-debug: input Consumer.00e9 = 0
[ 3398.309660] hid-debug: input Consumer.00ea = 0
[ 3398.309660] hid-debug: input Consumer.00e2 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 1
[ 3398.309660] hid-debug: input Consumer.0000 = 1
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.309660] hid-debug: input Consumer.0000 = 0
[ 3398.376326] usbcore: registered new interface driver snd-usb-audio
[ 3398.502993] drivers/hid/hid-core.c: report (size 7) (unnumbered)
[ 3398.502993] drivers/hid/hid-core.c: report 0 (size 7) =  70 00 00 00 00 00 00
[ 3398.502993] hid-debug: input Consumer.00e9 = 0
[ 3398.502993] hid-debug: input Consumer.00ea = 0
[ 3398.502993] hid-debug: input Consumer.00e2 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 1
[ 3398.502993] hid-debug: input Consumer.0000 = 1
[ 3398.502993] hid-debug: input Consumer.0000 = 1
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.502993] hid-debug: input Consumer.0000 = 0
[ 3398.549660] drivers/hid/hid-core.c: report (size 7) (unnumbered)
[ 3398.549660] drivers/hid/hid-core.c: report 0 (size 7) =  f0 00 00 00 00 00 00
[ 3398.549660] hid-debug: input Consumer.00e9 = 0
[ 3398.549660] hid-debug: input Consumer.00ea = 0
[ 3398.549660] hid-debug: input Consumer.00e2 = 0
[ 3398.549660] hid-debug: input Consumer.0000 = 0
[ 3398.549660] hid-debug: input Consumer.0000 = 1
[ 3398.549660] hid-debug: input Consumer.0000 = 1
[ 3398.549660] hid-debug: input Consumer.0000 = 1
[ 3398.549660] hid-debug: input Consumer.0000 = 1
[ 3398.549660] hid-debug: input Consumer.0000 = 0
[ 3398.549660] hid-debug: input Consumer.0000 = 0
[ 3398.549660] hid-debug: input Consumer.0000 = 0
[ 3398.549660] hid-debug: input Consumer.0000 = 0
[ 3398.549660] hid-debug: input Consumer.0000 = 0
[ 3398.549660] hid-debug: input Consumer.0000 = 0
signature.asc (application/pgp-signature, 321 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.2 (GNU/Linux)
Comment: Robbat2 @ Orbis-Terrarum Networks - The text below is a digital signature. If it doesn't make any sense to you, ignore it.

iD8DBQFGLwfdPpIsIjIzwiwRAp7kAKCMP+bA7gZGvXYoDdbZYYFBRQPdswCg39QE
lC//hDur1xklwRIg+QmTuTo=
=Zo3+
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.