On Sun, Aug 29, 2010 at 04:24:33PM +0200, Jorge Juliá wrote:
> 2010/8/26 Peter Hutterer <[email protected]>
> >
> > On Wed, Aug 25, 2010 at 02:35:47PM +0200, Jorge Juliá wrote:
> > > On my Fujitsu T4410 tablet PC, FUJ02e7 serial device is recognized only
> > > as eraser an stylus but it also has touch capabilities. Executing
> > > "xinput --list" I only see earser and stylus.
> > >
> > > After a lot of testing I got touch working. Seems that device is not
> > > properly recognized by xf86-input-wacom-0.10.8.
> > >
> > > Y have added one line to xf86-input-wacom source code and, after
> > > recompiling wacom_drv.so and restarting X, "xinput --list" shows the new
> > > device and touch is working now.
> > >
> > > This is the change that I have made:
> > >
> > > r...@fujitsu:/usr/local/src/xf86-input-wacom-0.10.8# diff -aur
> > > src/wcmISDV4.c src/wcmISDV4.c.orig
> > > --- src/wcmISDV4.c 2010-08-23 01:21:32.484231001 +0200
> > > +++ src/wcmISDV4.c.orig 2010-07-26 06:33:10.000000000 +0200
> > > @@ -873,7 +873,6 @@
> > > /* default to penabled */
> > > SETBIT(common->wcmKeys, BTN_TOOL_PEN);
> > > SETBIT(common->wcmKeys, BTN_TOOL_RUBBER);
> > > - SETBIT(common->wcmKeys, BTN_TOOL_DOUBLETAP);
> > >
> > > /* id < 0x008 are only penabled */
> > > if (id > 0x007)
> > >
> > >
> > > I think that a possible solution is to check device name on
> > > isdv4ProbeKey and set BTN_TOOL_DOUBLETAP if name is FUJ02e7:
> >
> > this sounds like the right approach. isdv4ProbeKeys() already has some
> > handling for this (for WACf only) and that should be easily extendable to
> > this device.
> >
> > Please try to make a patch doing so, the above is to generic to use it
> > as-is.
> >
> > Cheers,
> > Peter
>
> Hi Peter,
>
> First, sorry for my English.
>
> I am not a C++ developer buy I have tried to do the patch.
>
> The following works for me:
>
> r...@fujitsu:/usr/local/src/xf86-input-wacom-0.10.8# diff -ua
> src/wcmISDV4.c.orig src/wcmISDV4.c
> --- src/wcmISDV4.c.orig 2010-07-26 06:33:10.000000000 +0200
> +++ src/wcmISDV4.c 2010-08-29 13:53:10.240852998 +0200
> @@ -846,13 +846,16 @@
> if (ioctl(local->fd, TIOCGSERIAL, &tmp) < 0)
> return 0;
>
> + memset(common->wcmKeys, 0, sizeof(common->wcmKeys));
> +
> /* check device name for ID first */
> - if (sscanf(local->name, "WACf%x", &id) <= 1)
> + if (sscanf(local->name, "WACf%x", &id) <= 1 ||
> !strcmp(local->name, "Serial Wacom Tablet"))
You could just check for FUJ here, no? the Serial Wacom Tablet name is
assigned to by the udev rules but we use the PnP id for wacom devices.
> {
> /* id in file sys/class/tty/%str/device/id */
> FILE *file;
> char sysfs_id[256];
> char *str = strstr(device, "ttyS");
> + int ret;
> snprintf(sysfs_id, sizeof(sysfs_id),
> "/sys/class/tty/%s/device/id", str);
> file = fopen(sysfs_id, "r");
> @@ -864,12 +867,18 @@
> if (fscanf(file, "WACf%x\n", &id) <= 0)
> id = 0;
>
> + /* Enable touch if FUJ02e7 */
> + ret = fscanf(file, "%s", str);
> + if ( ret != EOF )
> + {
> + if (!strcmp(str, "FUJ02e7"))
> + SETBIT(common->wcmKeys, BTN_TOOL_DOUBLETAP);
> + }
> +
if (fscanf(file, "FUJ%x\n", &id) <= 0)
id = 0;
should get you there as well, with id then containing the FUJ device ID. You
can then use that in the if conditions and switch statement to assign the
bits.
long term we may use enums for models as well to make sure to not mix up FUJ
and WACf but I think for now we should be fine.
Cheers,
Peter
> fclose(file);
> }
> }
>
> - memset(common->wcmKeys, 0, sizeof(common->wcmKeys));
> -
> /* default to penabled */
> SETBIT(common->wcmKeys, BTN_TOOL_PEN);
> SETBIT(common->wcmKeys, BTN_TOOL_RUBBER);
>
>
> I also noticed that is necessary to patch linux-wacom-0.8.8-8 udev
> rules or X11 does not detect the device. This is the patch:
> r...@fujitsu:/usr/local/src/linuxwacom-0.8.8-8# diff -ua
> ./src/util/60-wacom.rules.orig ./src/util/60-wacom.rules
> --- ./src/util/60-wacom.rules.orig 2010-07-28 02:12:27.000000000 +0200
> +++ ./src/util/60-wacom.rules 2010-08-29 15:36:04.048748000 +0200
> @@ -7,6 +7,11 @@
> # to present users with a standard set of device nodes
> # which they can rely on across the board.
>
> +ACTION=="add|change", SUBSYSTEM=="pnp", ATTR{id}=="WACf*",
> ENV{NAME}="Serial Wacom Tablet"
> +ACTION=="add|change", SUBSYSTEM=="pnp", ATTR{id}=="FUJ*",
> ENV{NAME}="Serial Wacom Tablet"
> +ACTION=="add|change", SUBSYSTEMS=="pnp", ATTRS{id}=="WACf*",
> ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
> +ACTION=="add|change", SUBSYSTEMS=="pnp", ATTRS{id}=="FUJ*",
> ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
> +
> KERNEL!="event[0-9]*", GOTO="wacom_end"
>
> # Port specific link for users of multiple tablets of the same type.
>
> I am a linux adavanced user but i am no a developer so I can only help
> you with testing if you need.
>
> Cheers.
>
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel