Linux Wacom Project HOWTO
7.0 - Tablet PC
Navigation:
MAIN UP PREV NEXT INDEX ALL
The Wacom digitizers embedded in Tablet PCs utilitizes a special
protocol IV, ISDV4. Most of them are serial tablets. There are a few Wacom USB tablet PC OEMs on the market recently. However, we don't support USB tablet PC yet. This page is for serial Tablet PC only.
Similar to the conventional serial tablets, serial tablet PCs use a serial controller (UART). But, normally, they are not set to any serial ports. They are effectively serial devices, but require special configuration (setserial) under Linux.
You can use xxd to see if your tablet has been mapped onto a serial port or not. To do so, follow the steps below:
[jej@ayukawa ~]$su
Password:
[jej@ayukawa ~]# xxd /dev/ttyS0
Move your pen on your tabletPC. If you see output from the terminal while you move the pen, your tablet has been mapped to port 1. Quit xxd by Ctrl+c. Then ignore the rest of this page and go to(see Configuring X11) page. Otherwise, apply xxd to port 1 to 4. If none of them show output, you need to manually map the tablet to a serial port.
Here is a sample command. The IO port may be different for your Tablet PC.
[jej@ayukawa src]$ setserial /dev/ttyS2 port 0x93f8 autoconfig
This command needs to be excuted with each reboot before X server starts.
You can add the command into one of your favorite start script. I normally
add it into /etc/rc.d/rc.local. Here is my rc.local:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
setserial /dev/ttyS2 port 0x93f8 autoconfig
After installing wacom_drv.o and other programs, such as wacomcpl and wacdump,
restart X server. Now you can view raw tablet data by:
[jej@ayukawa util]$ ./wacdump -f tpc /dev/ttyS2 # Wacom digitizer on fake COM3
If your wacdump is from linuxwacom version 0.7.5 or older, issue
[jej@ayukawa util]$ ./wacdump -f c100 /dev/ttyS2
If everything looks right from wacdump (see Using wacdump),
you can update /etc/X11/XF86Config or /etc/X11/xorg.conf to load wacom X driver
(see Configuring XFree86/X11R6).
Please notice that in Wacom InputDevice section, the following 2 options are
required for Tablet PC:
Option "Device" "/dev/ttyS2" # SERIAL ONLY
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Refer to Adding the InputDevices for details.
Some HP Tablet PCs require you explicitly run the following program before setserial. This
is due to the fact that Wacom Digitizer on HP Tablet PCs are not mapped to any serial
port by default.
Please compile tc1100ts.c as mentioned below and copy the executable (tc1100ts)
to /usr/sbin. Then add the following two lines to the end of your /etc/rc.d/rc.local:
/usr/sbin/tc1100ts
setserial /dev/ttyS2 port 0x03e8 autoconfig
Mapping Wacom Digitizer to /dev/ttyS2 for HP Tablet PC
/*
* HP TC1100 Touchscreen Enable
* Copyright (c) 2004 Hewlett-Packard Co.
*
* Compile with `cc -O2 -o tc1100ts tc1100ts.c',
* and run as root with `./tc1100ts'.
*
* This standalone program enables the Serial Port 1
* (SP1) of the NS LPC Super I/O, where the Wacom
* Digitizer is connected to on the HP TC1100 Tablet PC.
*
* The serial device is mapped to 0x3e8 IRQ0-4 to match
* the default /dev/ttyS2 port and IRQ mapping on Linux.
*
* To proof that the Wacom Digitizer is enabled by this
* standalone, do the following:
* - Change to superuser mode, i.e. root
* - setserial /dev/ttyS2
* it should return:
* /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
* - ./tc1100ts
* - setserial /dev/ttyS2 autoconfig
* - setserial /dev/ttyS2
* now returns:
* /dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 4
*
*/
#include
#include
#include
#include
const int cfgindex = 0x4e;
const int cfgdata = 0x4f;
#define wsio(i,d) {outb(i,cfgindex); outb(d,cfgdata);}
int main()
{
/* Get access to the ports */
if (iopl(3)) {perror("iopl"); exit(1);}
// See the SuperIO Specificatio for details of each register
wsio(0x07,0x03); // Select Logical Device - Serial Port 1
wsio(0x30,0x00); // De-activate Logical Device
wsio(0x60,0x03); // I/O Port Base [15-08]
wsio(0x61,0xe8); // I/O Port Base [07-00]
wsio(0x70,0x14); // Enables Wake-up on IRQ4
wsio(0x71,0x03); // Level IRQ Req, Hi priority
wsio(0x74,0x04); // DMA Channel Select 0 - no DMA
wsio(0x75,0x04); // DMA Channel Select 1 - no DMA
wsio(0x30,0x01); // Activate Logical Device
/* We don't need the ports anymore */
if (iopl(0)) {perror("iopl"); exit(1);}
exit(0);
}
/* end of tc1100ts.c */
Navigation:
MAIN UP PREV NEXT INDEX ALL