User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

old serial tablet, WACOM ArtZ II ?

Sun Nov 29, 2020 10:52 pm

(this obscure topic should probably go in some sub-forum, but I'm not sure which.)

I have a 25-year-old Wacom ArtZ II tablet with DB-9 serial connector. I'd like to use it like a mouse device on my Pi4.
Needless to say, the original Wacom manual only mentions configuring it for Win95 or DOS. The tablet speaks "WACOM IV" protocol at 9600 bps 8-N-1. I have a USB-Serial converter, which appears on my Pi as /dev/ttyUSB0.
I confirmed my tablet does generate output, as I can monitor bursts of binary data coming in on ttyUSB0 when I move the pen around on the surface.

I found some R-Pi instructions but only for Wacom USB models. viewtopic.php?t=211665
The thread here, attempting to use a serial trackball, looks discouraging: viewtopic.php?t=184614

Apparently there is something called "inputattach" from "linuxconsole" on Arch Linux, but I wasn't able to find or install those things on my Pi4.
Has this input path been depreciated or discontinued?
There are some complex instructions involving compiling kernel modules for serial device support, but they look to be for outdated kernels.

Has anyone got an old serial device like this working on a Pi?
Obviously, serial pointing devices used to be the only kind there was, but now this is starting to look like a genuinely lost technology.

BMS Doug
Posts: 4356
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: old serial tablet, WACOM ArtZ II ?

Sun Nov 29, 2020 11:40 pm

This github issue indicates that the artpad II should be in the linuxwacom kernel, although I'm not sure if that is similar to your artz II tablet or even if it is included in Raspberry Pi OS.

https://github.com/linuxwacom/xf86-inpu ... /issues/40
Doug.
Building Management Systems Engineer.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 2:05 am

Thanks BMS Doug, that github issue is the most relevant info for my case, that I've seen yet.

However I'm trying to follow along with what they're talking about there, and failing. That thread starts with a root user using "inputattach" but that command is not available in the current version of Raspberry OS as far as I know, and I don't know what available package could be installed to provide it.

What I've read indicates "inputattach" is an old-skool way that is no longer used for some years now. Maaaybe I can make some edit to /usr/share/X11/xorg.conf.d/40-libinput.conf that enables a serial device. If it was a generic mouse, apparently that would look something like

Code: Select all

Section "InputDevice"
  Identifier "Mouse"
  Driver "mouse"
  Option "CorePointer"
  Option "Device" "/dev/ttyUSB0"
  Option "Protocol" "auto"
EndSection
but I'll need to figure out what that would look like with my tablet speaking 9600 baud "WACOM-IV" protocol.

DarkElvenAngel
Posts: 1277
Joined: Tue Mar 20, 2018 9:53 pm

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 2:20 am

I had an old Logitech Kidz mouse same idea it was serial and I was trying to get it working same as your doing, it never worked. I ended up tracking down the protocol and writing a C program to basically do was mouse.com use to do for DOS. Now I don't know if you can find the protocol it uses and or if you have some programing skills. But it might be possible to get you going. I published my code on gitlab https://gitlab.com/DarkElvenAngel/serial-mouse I don't know it might be useful to you.

This was how I finally managed to get my Kidz mouse working.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 3:37 am

DarkElvenAngel wrote:
Mon Nov 30, 2020 2:20 am
I published my code on gitlab https://gitlab.com/DarkElvenAngel/serial-mouse I don't know it might be useful to you.
This was how I finally managed to get my Kidz mouse working.
Thank you for that! It is good that at least someone got some serial device working with a current X11 device.
My tablet speaks "WACOM IV" (Wacom 4) protocol which is at least somewhat described here
https://github.com/jigpu/linuxwacom-wik ... ocol_IV.md
and there is an overview here: https://github.com/linuxwacom/input-wac ... -Protocols

However there may be working code already for many Wacom tablets in https://github.com/linuxwacom/xf86-input-wacom
I'm trying to understand if this is relevant to the current X11 setup in Rasperry OS, and if so how.

I was pleasantly surprised to find a 2019 release of xf86-input-wacom-0.39.0 with the comment:
"...Additionally there is some new hardware support and a fix for an issue that could affect users of old serial tablets." suggesting that serial devices are somehow still supported. I just need to figure out how.
https://github.com/linuxwacom/xf86-input-wacom/releases

From https://github.com/linuxwacom/xf86-inpu ... The-Driver it looks like the magic invocation

sudo sh -c "apt-get update && apt-get install xserver-xorg-input-wacom$(dpkg -S $(which Xorg) | grep -Eo -- "-hwe-[^:]*")"

works on the Pi4 to install some things including xsetwacom but it probably needs manual config to know about any serial devices.
From this page https://wiki.debian.org/WacomTablets it looks like such a config might be similar to

Code: Select all

   Section "InputDevice"
        Identifier   "stylus"
        Driver       "wacom"
        Option       "Mode" "Absolute"
        Option       "Type" "stylus"
        Option       "Device" "/dev/input/wacom"
   Endsection
except with /dev/input/wacom possibly being replaced by /dev/ttyUSB0 but I have yet to figure this out. Maybe that goes in
/usr/share/X11/xorg.conf.d/40-libinput.conf

I'm now trying out the info in https://help.ubuntu.com/community/WacomTroubleshooting
Last edited by jbeale on Mon Nov 30, 2020 4:55 am, edited 2 times in total.

DarkElvenAngel
Posts: 1277
Joined: Tue Mar 20, 2018 9:53 pm

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 4:14 am

jbeale wrote:
Mon Nov 30, 2020 3:37 am
DarkElvenAngel wrote:
Mon Nov 30, 2020 2:20 am
I published my code on gitlab https://gitlab.com/DarkElvenAngel/serial-mouse I don't know it might be useful to you.
This was how I finally managed to get my Kidz mouse working.
Thank you for that! It is good that at least someone got some serial device working with a current X11 device.
My tablet speaks "WACOM IV" (Wacom 4) protocol which is at least somewhat described here
https://github.com/jigpu/linuxwacom-wik ... ocol_IV.md
and there is an overview here: https://github.com/linuxwacom/input-wac ... -Protocols

However there may be working code already for many Wacom tablets in https://github.com/linuxwacom/xf86-input-wacom
I'm trying to understand if this is relevant to the current X11 setup in Rasperry OS, and if so how.

I was pleasantly surprised to find a 2019 release of xf86-input-wacom-0.39.0 with the comment:
"...Additionally there is some new hardware support and a fix for an issue that could affect users of old serial tablets." suggesting that serial devices are somehow still supported. I just need to figure out how.
https://github.com/linuxwacom/xf86-input-wacom/releases
I found a kernel module that will not be built into the Raspberry Pi OS kernel as it does not have a serial port, this was one of the problems I had. https://github.com/torvalds/linux/blob/ ... _serial4.c

The thinking is, this is something that isn't going to be used by many people if at all so it's not included, and a Raspberry Pi doesn't have an RS232 port.

This was some time ago now I tried this however here is the post there may be something that can help viewtopic.php?f=29&t=272793

Good luck, you can get it going again.
Last edited by DarkElvenAngel on Mon Nov 30, 2020 4:16 am, edited 1 time in total.

W. H. Heydt
Posts: 14083
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 4:15 am

jbeale wrote:
Sun Nov 29, 2020 10:52 pm
I have a 25-year-old Wacom ArtZ II tablet with DB-9 serial connector.
Nitpick... There is no connector properly designated "DB-9". What you have is almost certainly a DE-9 connector.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 5:17 am

Thank you for the DE-9 note- I'd never heard of it, but apparently that is correct.

Apparently I just need to know more about X11 config. This page https://help.ubuntu.com/community/WacomTroubleshooting explains how to change /etc/X11/xorg.conf files with Section "InputDevice" and Section "ServerLayout" to enable either a USB or Serial interface Wacom tablet device BUT the problem is:

1) Raspberry OS has no such file. It does have /usr/share/X11/xorg.conf.d/40-libinput.conf but that file
2) has "InputClass" but no "InputDevice" or "ServerLayout" sections, and when I try to add a "ServerLayout" config to that file, then
3) the X server crashes.

It does deliver a report in /var/log/Xorg.0.log saying it didn't like my config:

Code: Select all

[    10.812] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    10.812] Data incomplete in file /usr/share/X11/xorg.conf.d/40-libinput.conf
	Undefined Screen "Default Screen" referenced by ServerLayout "Default Layout".
[    10.812] (EE) Problem parsing the config file
[    10.812] (EE) Error parsing the config file
[    10.812] (EE) 
Fatal server error:
[    10.812] (EE) no screens found(EE) 
[    10.812] (EE) 
Basically I'm concluding either the current Raspberry OS X11 server wants a different config syntax in this file, and/or the config happens in some entirely different way than in the Ubuntu 8.10 help page I was using. Anyone know?

W. H. Heydt
Posts: 14083
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 5:38 am

jbeale wrote:
Mon Nov 30, 2020 5:17 am
Thank you for the DE-9 note- I'd never heard of it, but apparently that is correct.
You're welcome.

It's part of a series... DA-15, DB-25, DC-37, DD-50, DE-9. And then the "odd man out", HDB-15.

DB-25 was used for RS-232 for decades before IBM used it for both serial and (Centronics) parallel on the PC. The serial was later switched to using the DE-9. DD-50 got use a lot for SCSI. And HDB-15 is best known as the VGA cable connector.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 7:06 pm

DarkElvenAngel wrote:
Mon Nov 30, 2020 4:14 am
I found a kernel module that will not be built into the Raspberry Pi OS kernel as it does not have a serial port, this was one of the problems I had. https://github.com/torvalds/linux/blob/ ... _serial4.c
Aha! That looks promising. I'm now working through building a new kernel based on https://www.raspberrypi.org/documentati ... uilding.md
That page for some reason does not mention the "make menuconfig" step to walk through the config options, but I used that to enable it:

<build_path>/linux/.config : CONFIG_TABLET_SERIAL_WACOM4=y

So far, so good...

Code: Select all

pi@rp49:~/linux $ uname -a
Linux rp49 5.4.80-v7l-CUSTOM_WACOM+ #1 SMP Mon Nov 30 10:42:40 PST 2020 armv7l GNU/Linux
That is certainly one piece of the puzzle. The other big part I think is what X11 config is needed for that driver to be connected and used. It seems like the X11 input device setup structure and/or syntax has changed since most online docs about this were made, and it's not clear to me how it's currently done.

The below comment taken from wacom_serial4.c worries me, though. I have read that "inputattach" became defunct about 10 years ago and may no longer be possible to use (?)

Code: Select all

static int wacom_setup(struct wacom *wacom, struct serio *serio)
{
	int err;

	/* Note that setting the link speed is the job of inputattach.
	 * We assume that reset negotiation has already happened,
	 * here. */
Ah, however I was able to compile and run inputattach.c, have yet to make it do anything though. https://github.com/linuxwacom/input-wac ... nputattach

...so close, and yet so far. Using the hex dump command, and waving the pen I can see the binary data in 7-byte packets (1st byte always has b7 set, others b7 clear) so it looks to be valid WACOM-IV protocol. Just seems like a heavy lift getting the X server to pay attention to it.

Code: Select all

# sudo xxd -g 1 -c 7 /dev/ttyUSB0
00000000: e0 3a 2f 00 1a 5e 40  .:/..^@
00000007: e0 3a 27 00 1a 63 40  .:'..c@
0000000e: e0 3a 18 00 1a 6b 40  .:...k@
00000015: e0 39 5c 04 1b 0b 40  .9\...@
0000001c: e0 39 17 00 1b 31 41  .9...1A
00000023: e0 38 58 00 1b 59 40  .8X..Y@
0000002a: e0 38 3a 04 1b 6d 40  .8:..m@
00000031: e0 37 78 00 1c 0e 40  .7x...@
00000038: e0 37 3b 00 1c 19 40  .7;...@
Last edited by jbeale on Tue Dec 01, 2020 6:49 am, edited 3 times in total.

DarkElvenAngel
Posts: 1277
Joined: Tue Mar 20, 2018 9:53 pm

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 8:48 pm

Based on the protocol and the way newer Wacom tablets behave with linux I'm having my doubts you will get it working like a mouse, what it looks like it will do is work like a touch screen or absolute pointing device. A mouse being relative pointing device.

I've done a fair bit of messing about with the linux /dev/inputx If the drive is written correctly you could us your tablet as a mouse. My tables both came with a mouse for use with them as well as the pens. Linux doesn't seem to read the different pens of the mouse as separate types instead they all act the same. This is true in my case I haven't messed around with the tablets too much they work well enough for my use.

If you read though my own work getting my mouse to work I did try mdetect and inputattach as well as gpm. Maybe have a look if any of these will others might support your tablet.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 9:50 pm

By "mouse" I just meant "controls the pointer on the screen." I would be super happy to get it working like anything. An absolute or touch-screen type mode would be great. I'll look through your code that you mentioned.

...I didn't know about the -dump option, that one does show the data:

Code: Select all

# ./inputattach --baud 9600 -dump /dev/ttyUSB0
e0 (x) 23 (#) 28 (() 00 (x) 24 ($) 38 (8) 40 (@) 
e0 (x) 23 (#) 7d (}) 00 (x) 25 (%) 07 (x) 40 (@) 
e0 (x) 24 ($) 58 (X) 00 (x) 25 (%) 5b ([) 40 (@) 
e0 (x) 25 (%) 05 (x) 00 (x) 26 (&) 06 (x) 40 (@) 
e0 (x) 26 (&) 0e (x) 00 (x) 26 (&) 7f (x) 40 (@) 
e0 (x) 26 (&) 39 (9) 00 (x) 27 (') 25 (%) 40 (@) 
e0 (x) 27 (') 08 (x) 00 (x) 27 (') 69 (i) 40 (@) 
e0 (x) 27 (') 50 (P) 00 (x) 28 (() 24 ($) 40 (@) 
Last edited by jbeale on Mon Nov 30, 2020 10:01 pm, edited 1 time in total.

BMS Doug
Posts: 4356
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 9:54 pm

I can confirm that usb Wacom tablets act as absolute pointing devices.

Good lick and keep us informed.
Doug.
Building Management Systems Engineer.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Mon Nov 30, 2020 10:56 pm

Amazing result, I finally just tried running the code https://gitlab.com/DarkElvenAngel/serial-mouse after changing the inline fixed serial port setup values from (1200 7N1) to (9600 8N1) and IT ACTUALLY DID SOMETHING! The cursor skittered across my display as I moved the tablet pen. Of course it was a little random because it's wanting a mouse protocol, and it's getting Wacom-IV protocol but clearly it can do the job. I just need to parse the Wacom packets into X,Y,button data and it should be usable. Thank you, DarkElvenAngel !

DarkElvenAngel
Posts: 1277
Joined: Tue Mar 20, 2018 9:53 pm

Re: old serial tablet, WACOM ArtZ II ?

Tue Dec 01, 2020 1:15 am

jbeale wrote:
Mon Nov 30, 2020 10:56 pm
Amazing result, I finally just tried running the code https://gitlab.com/DarkElvenAngel/serial-mouse after changing the inline fixed serial port setup values from (1200 7N1) to (9600 8N1) and IT ACTUALLY DID SOMETHING! The cursor skittered across my display as I moved the tablet pen. Of course it was a little random because it's wanting a mouse protocol, and it's getting Wacom-IV protocol but clearly it can do the job. I just need to parse the Wacom packets into X,Y,button data and it should be usable. Thank you, DarkElvenAngel !
Awesome, your welcome! If you need any further help let me know. I'm interested in how you make out with this.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Tue Dec 01, 2020 1:34 am

I'm curious if you based your use of ioctl() on https://www.kernel.org/doc/Documentatio ... uinput.rst or is there other documentation?
I mean things like

Code: Select all

      ioctl(fd, UI_SET_EVBIT, EV_REL);
      ioctl(fd, UI_SET_RELBIT, REL_X);
      ioctl(fd, UI_SET_RELBIT, REL_Y);
That one is based on a standard mouse so it uses relative X,Y motions, but the tablet will be giving me absolute coordinates so I presume I'll need to use a slightly different setup, assuming an absolute mode is even possible with this type of ioctl() call.

EDIT: Ok, it looks like ABS coords are also available in a similar way, per https://www.kernel.org/doc/html/v4.14/i ... codes.html

DarkElvenAngel
Posts: 1277
Joined: Tue Mar 20, 2018 9:53 pm

Re: old serial tablet, WACOM ArtZ II ?

Tue Dec 01, 2020 2:51 am

jbeale wrote:
Tue Dec 01, 2020 1:34 am
I'm curious if you based your use of ioctl() on https://www.kernel.org/doc/Documentatio ... uinput.rst or is there other documentation?
I mean things like

Code: Select all

      ioctl(fd, UI_SET_EVBIT, EV_REL);
      ioctl(fd, UI_SET_RELBIT, REL_X);
      ioctl(fd, UI_SET_RELBIT, REL_Y);
That one is based on a standard mouse so it uses relative X,Y motions, but the tablet will be giving me absolute coordinates so I presume I'll need to use a slightly different setup, assuming an absolute mode is even possible with this type of ioctl() call.

EDIT: Ok, it looks like ABS coords are also available in a similar way, per https://www.kernel.org/doc/html/v4.14/i ... codes.html
I don't remember where I found the project but it was a CEC to keyboard driver and then I just read all I could about uinput. The last link looks familiar, it's a very good resource. You can send any events you want you just have to register them before hand so you could use a button combo to switch from absolutely to relative position.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Success.

Wed Dec 02, 2020 12:27 am

Old technology lives again! Many thanks for the help with this.
works.png
Gimp with Wacom ArtZ II
works.png (7.01 KiB) Viewed 329 times
I'm thinking I may be the last person on the planet to own this particular serial tablet, but below is the code (copy & pasted from your mouse driver + various other sources, as noted in the top comments). It's working like an absolute-position two-button mouse, which was what I wanted. It does record pressure data, but I don't know how to use that in an X input device. I confirmed this one can be switched to a 9-byte mode with pen-tilt data as well, which apparently no one ever got working on Linux in "Wacom-IV" protocol, because the hardware was rare; most tablets with that feature used Wacom-V protocol. Of only historical interest now, I guess.
https://github.com/jbeale1/DataAcq/blob ... om_Input.c

DarkElvenAngel
Posts: 1277
Joined: Tue Mar 20, 2018 9:53 pm

Re: old serial tablet, WACOM ArtZ II ?

Wed Dec 02, 2020 1:25 am

Congratulations!

That's awesome well done. Another device saved and put back to use.

User avatar
Gavinmc42
Posts: 5097
Joined: Wed Aug 28, 2013 3:31 am

Re: old serial tablet, WACOM ArtZ II ?

Wed Dec 02, 2020 1:50 am

That's cool, got some of those old tablets, one even had the pressure sensitive pen.
Just need to find the box they are hiding in.
That will probably take longer than getting this code to work :lol:
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Wed Dec 02, 2020 7:00 am

I always thought of device drivers as very subtle, obscure and difficult, and maybe the "real" ones are, but with the online code examples I was able to assemble something useful-to-me in a day or so, which was quite satisfying. The motivation for this was my daughter wanting to play an online game "skribbl.io" for which we figured it is easier for speed and accuracy to make a quick sketch using a tablet pen, instead of a mouse. Maybe a touchscreen + stylus would be equally good. There is a learning curve using an absolute pen tablet instead of a relative-positioning mouse, but the pen does seem to be a better tool for the job.

BMS Doug
Posts: 4356
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: old serial tablet, WACOM ArtZ II ?

Wed Dec 02, 2020 7:08 am

Great to see old devices getting reused.

I should note that a small drawing tablet isn't horrendously expensive (about the cost of a new Pi4 2GB) as long as you get one without a built in screen. Price goes up with size of drawing area (naturally).
Doug.
Building Management Systems Engineer.

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: old serial tablet, WACOM ArtZ II ?

Wed Dec 02, 2020 9:57 pm

True, but as I do have the Wacom ArtZ- having carried it these past 25 years through at least 4 house moves- I'd rather use it if possible, and spend any loose change on another Pi 4B :-)

That said- since having declared success yesterday getting it to work like a mouse, I've discovered the MyPaint program https://github.com/mypaint/mypaint which is an impressive drawing tool, far beyond the old MS-Paint kind of thing. It makes me want to play with stylus pressure for more brush control. I (think) I know how to send pressure information from my Wacom program, having read through another tablet interface code at https://github.com/rfc2822/GfxTablet/bl ... rktablet.c

My new code including stylus pressure compiles and runs. An event device 'event2' appears, and 'udev' marks it as a tablet (ID_INPUT_TABLET=1), not a mouse as it had been before:

Code: Select all

# udevadm info -q all -n /dev/input/event2

P: /devices/virtual/input/input17/event2
N: input/event2
L: 0
E: DEVPATH=/devices/virtual/input/input17/event2
E: DEVNAME=/dev/input/event2
E: MAJOR=13
E: MINOR=66
E: SUBSYSTEM=input
E: USEC_INITIALIZED=141629041096
E: ID_INPUT=1
E: ID_INPUT_TABLET=1
E: ID_SERIAL=noserial
...however, it seems the X server doesn't know what to do with it, claiming it lacks a driver.

Code: Select all

# tail /var/log/Xorg.0.log

[141628.961] (II) config/udev: Adding input device Wacom ArtZ II (/dev/input/mouse1)
[141628.961] (II) No input driver specified, ignoring this device.
[141628.961] (II) This device may have been added with another device file.
[141629.151] (II) config/udev: Adding input device Wacom ArtZ II (/dev/input/event2)
[141629.151] (II) No input driver specified, ignoring this device.
[141629.151] (II) This device may have been added with another device file.
Part of my confusion is what exactly is meant here by "driver". I thought my code, converting the Wacom binary serial packet into X, Y, Pressure, Button data and sending ioctl() setup calls and updating those data values through a /dev/uinput file descriptor meant I do have a device driver. But maybe what the /var/log/Xorg.0.log calls an "input driver" is whatever code inside of the X server receives this data, and maybe that's what's missing(?) Does anyone know how other tablets work under X?

I presume these days, some magic happens in the server when a known USB tablet is connected, and the roll-your-own serial driver approach is a path so much less taken that X server code drift has now made it impassible (?)

BMS Doug
Posts: 4356
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: old serial tablet, WACOM ArtZ II ?

Wed Dec 02, 2020 10:27 pm

jbeale wrote:
Wed Dec 02, 2020 9:57 pm
True, but as I do have the Wacom ArtZ- having carried it these past 25 years through at least 4 house moves- I'd rather use it if possible, and spend any loose change on another Pi 4B :-)
Absolutely, my comment was intended for observers not a suggestion that you should abandon this work.
jbeale wrote:
Wed Dec 02, 2020 9:57 pm
That said- since having declared success yesterday getting it to work like a mouse, I've discovered the MyPaint program https://github.com/mypaint/mypaint which is an impressive drawing tool, far beyond the old MS-Paint kind of thing. It makes me want to play with stylus pressure for more brush control.
My daughter is using MyPaint with her (USB) Wacom Tablet, it's really good.
jbeale wrote:
Wed Dec 02, 2020 9:57 pm
I (think) I know how to send pressure information from my Wacom program, having read through another tablet interface code at https://github.com/rfc2822/GfxTablet/bl ... rktablet.c

My new code including stylus pressure compiles and runs. An event device 'event2' appears, and 'udev' marks it as a tablet (ID_INPUT_TABLET=1), not a mouse as it had been before:

Code: Select all

# udevadm info -q all -n /dev/input/event2

P: /devices/virtual/input/input17/event2
N: input/event2
L: 0
E: DEVPATH=/devices/virtual/input/input17/event2
E: DEVNAME=/dev/input/event2
E: MAJOR=13
E: MINOR=66
E: SUBSYSTEM=input
E: USEC_INITIALIZED=141629041096
E: ID_INPUT=1
E: ID_INPUT_TABLET=1
E: ID_SERIAL=noserial
...however, it seems the X server doesn't know what to do with it, claiming it lacks a driver.

Code: Select all

# tail /var/log/Xorg.0.log

[141628.961] (II) config/udev: Adding input device Wacom ArtZ II (/dev/input/mouse1)
[141628.961] (II) No input driver specified, ignoring this device.
[141628.961] (II) This device may have been added with another device file.
[141629.151] (II) config/udev: Adding input device Wacom ArtZ II (/dev/input/event2)
[141629.151] (II) No input driver specified, ignoring this device.
[141629.151] (II) This device may have been added with another device file.
Part of my confusion is what exactly is meant here by "driver". I thought my code, converting the Wacom binary serial packet into X, Y, Pressure, Button data and sending ioctl() setup calls and updating those data values through a /dev/uinput file descriptor meant I do have a device driver. But maybe what the /var/log/Xorg.0.log calls an "input driver" is whatever code inside of the X server receives this data, and maybe that's what's missing(?) Does anyone know how other tablets work under X?

I presume these days, some magic happens in the server when a known USB tablet is connected, and the roll-your-own serial driver approach is a path so much less taken that X server code drift has now made it impassible (?)
I haven't looked into getting the pressure sensativity working from my daughter's USB Wacom tablet but suffice to say that it does not work straight out of the box in raspberry pi OS.
So don't assume that the tablet isn't transmitting the pressure sensitivity, and Im sure there is a tutorial out there, explaining how to resolve the issue (I read one but as my daughter wasn't interested in the pressure sensitivity I didn't follow it).
Doug.
Building Management Systems Engineer.

DarkElvenAngel
Posts: 1277
Joined: Tue Mar 20, 2018 9:53 pm

Re: old serial tablet, WACOM ArtZ II ?

Wed Dec 02, 2020 10:48 pm

I haven't tried to expand this however what you can do is find out what a USB tablet identifies as and then drop those values into your program.

If you look at the initialization you can set different values for the vendor is and device idea.

I have a graphire 3 and a bamboo I can get you values if you need them. Just need to dig up the cable

Return to “General discussion”