Subject: Re: Wacom tablets and NetBSD?
To: Geert Hendrickx <ghen@telenet.be>
From: Michael van Elst <mlelstv@serpens.de>
List: netbsd-users
Date: 01/22/2007 21:21:12
On Mon, Jan 22, 2007 at 06:38:29PM +0100, Geert Hendrickx wrote:
> On Wed, Jan 03, 2007 at 10:49:27PM +0000, Michael van Elst wrote:
> > That patch (and the corresponding code for the 4x5) makes the tablet
> > send input as a 'Digitizer' as opposed to a 'Generic_Desktop' device.
> > 
> > Without the patch the events are send to wsmouse as regular mouse events.
> > With the patch you have to read from /dev/uhid0 as you describe.
> 
> Could I please see your dmesg with and without the patch applied?

With patch:

ehci0: handing over low speed device on port 3 to uhci1
uhub4: port 3, device disappeared after reset
uhidev0 at uhub1 port 1 configuration 1 interface 0
uhidev0: WACOM CTE-430-UV3.1-4, rev 1.10/3.14, addr 2, iclass 3/1
uhidev0: 3 report ids
ums0 at uhidev0 reportid 1: 3 buttons and Z dir.
wsmouse1 at ums0 mux 0
uhid0 at uhidev0 reportid 2: input=7, output=0, feature=2
uhid1 at uhidev0 reportid 3: input=0, output=0, feature=2

usbhidctl -r shows:

Report descriptor:
Collection page=Digitizer usage=Digitizer
Collection page=Digitizer usage=Digitizer
Input   size=1 count=1 page=Digitizer usage=Touch, logical range 0..1
Input   size=1 count=1 page=Digitizer usage=Barrel_Switch, logical range 0..1
Input   size=1 count=1 page=Digitizer usage=Barrel_Switch, logical range 0..1
Input   size=1 count=1 page=Digitizer usage=Invert, logical range 0..1
Input   size=1 count=1 page=Digitizer usage=Transducer_Index, logical range 0..1
Input   size=1 count=1 page=Digitizer usage=In_Range, logical range 0..1
Input   size=16 count=1 page=Generic_Desktop usage=X, logical range 0..10206
Input   size=16 count=1 page=Generic_Desktop usage=Y, logical range 0..7422
Input   size=16 count=1 page=Digitizer usage=Tip_Pressure, logical range 0..511
End collection
Feature size=16 count=1 page=Digitizer usage=Undefined, logical range 0..511
Total   input size 7 bytes
Total  output size 0 bytes
Total feature size 2 bytes

Now /dev/uhid0 works together with the usbtablet driver. wsmouse
doesn't return any events. This is because all events are
sent with reportid 2.


Without patch:

ehci0: handing over low speed device on port 4 to uhci1
uhub4: port 4, device disappeared after reset
uhidev0 at uhub1 port 2 configuration 1 interface 0
uhidev0: WACOM CTE-430-UV3.1-4, rev 1.10/3.14, addr 2, iclass 3/1
uhidev0: 3 report ids
ums0 at uhidev0 reportid 1: 3 buttons and Z dir.
wsmouse1 at ums0 mux 0
uhid0 at uhidev0 reportid 2: input=7, output=0, feature=1
uhid1 at uhidev0 reportid 3: input=0, output=0, feature=1

usbhidctl -r shows:

Report descriptor:
Collection page=Digitizer usage=Digitizer
Collection page=0x0000 usage=0x0000
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Input   size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
End collection
Feature size=8 count=1 page=Microsoft usage=0x0001, logical range 0..255
Total   input size 7 bytes
Total  output size 0 bytes
Total feature size 1 bytes

Now /dev/uhid0 does nothing but wsmouse returns regular mouse
events. And obviously all events are sent with reportid 1.


> > In my experience the X server will abort when uhid0 is detached, but that
> > was in XFree 4.2 days. Maybe current XFree or X.org handle such errors
> > more gracefully.
> 
> My X server doesn't mind pluggin or unplugging a mouse...

Do you use /dev/uhid0 (with usbtablet driver) or /dev/wsmouse?


-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."