'

Serial Help

From linuxwacom
(Redirected from Serial Woes)
Jump to: navigation, search

Contents

Scope

This page is an effort to help aid you in setting up your serial tablet by breaking down the main problem areas. With some time and patience, you should be able to apply the appropriate changes in order to make use of your Wacom serial device. It is assumed that you have a basic understanding of using a console or terminal emulator within linux. Tasks such as searching, viewing, and editing of text files will be necessary.

Checklist

We have a few situations that can arise when trouble shooting a serial tablet.

  • The xorg.conf file has been configured incorrectly.
  • The serial port has not been identified and set to the appropriate uart and irq values of your serial hardware.
  • The serial port has been assigned to another program, interfering with the tablet signals
  • The older wacom driver that supports serial tablets is incompatible with the X server you are running
  • You are running X server 1.7 or later with the newer xf86-input-wacom driver which does not support serial tablets at the moment.

What to Expect

  • If your serial port is setup correctly
  • You have a linuxwacom X driver that supports serial tablets - 0.8.X release -> Download Page
  • Your X server version is prior to 1.7
  • A xorg.conf file that is configured correctly

If the above rules are in place, your serial tablet should work. If it doesn't, you have missed one of the steps in the checklist above. NOTE: xf86-input-wacom supplies the X driver for X servers 1.7 and up. It currently supports ISDV4 devices (serial tabletPCs), but does not yet support serial graphics tablets.

Below is the relevant sections of my Xorg.0.log file, this is what you would expect to see if the tablet is recognized and setup correctly without any problems. You can see on the last line, driver version 0.8.8-9 is being used. The most recent version that supports serial tablets is linuxwacom-0.8.8-10. The digit after the 0.8 is a even number, telling me that I'm using the stable version of the driver. If the decimal after the 0.8 digits happens to be a odd number this is a developer version of the driver. It is best to experiment with different versions of the driver if you are experiencing problems.

(II) LoadModule: "wacom"
(II) Loading /usr/lib/xorg/modules/input//wacom_drv.so
(II) Module wacom: vendor="X.Org Foundation"
        compiled for 4.3.99.902, module version = 1.0.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 2.0
(II) Wacom driver level: 47-0.8.8-9 $

Further on down the Xorg.0.log file you'll see some more entries showing the stylus, eraser, and cursor values being set. Any options set in the xorg.conf file will show up here, such as setting the cursor speed to "3.0" for the intuos 2 mouse.

(**) Option "Device" "/dev/ttyS0"
(**) stylus: always reports core events
(**) stylus device is /dev/ttyS0
(**) stylus is in absolute mode
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) stylus: serial speed 9600
(**) Option "Device" "/dev/ttyS0"
(**) eraser: always reports core events
(**) eraser device is /dev/ttyS0
(**) eraser is in absolute mode
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) eraser: serial speed 9600
(**) Option "Device" "/dev/ttyS0"
(**) cursor: always reports core events
(**) cursor device is /dev/ttyS0
(**) cursor is in relative mode
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) cursor: serial speed 9600
(**) Option "Speed" "3.0"
(**) cursor: speed = 3.000
(II) XINPUT: Adding extended input device "stylus" (type: Wacom Stylus)
(II) evaluating device (eraser)
(II) XINPUT: Adding extended input device "eraser" (type: Wacom Eraser)
(II) evaluating device (cursor)
(II) XINPUT: Adding extended input device "cursor" (type: Wacom Cursor)
(**) Option "StopBits" "1"
(**) Option "DataBits" "8"
(**) Option "Parity" "None"
(**) Option "Vmin" "1"
(**) Option "Vtime" "10"
(**) Option "FlowControl" "Xoff"
(WW) usbDetect: can not ioctl version
(==) Wacom tablet model : XD-0608-R00,V1.2-6
(==) Wacom using pressure threshold of 27 for button 1
(==) Wacom Serial Intuos2 tablet speed=9600 (38400) maxX=20320 maxY=16240 maxZ=1023 resX=2540 resY=2540 tilt=enabled

Configuring xorg.conf

Here we have the relevant sections needed in order to make your tablet work once X is started. The InputDevice sections are isolated sections and can be placed as is under your keyboard and mouse InputDevice entries. The three InputDevice entries seen in the ServerLayout section below, will need to be added to the existing ServerLayout section.

Section "InputDevice"
        Driver          "wacom"
        Identifier      "stylus"
        Option          "Device"        "/dev/ttyS0"
        Option          "Type"          "stylus"
EndSection

Section "InputDevice"
        Driver          "wacom"
        Identifier      "eraser"
        Option          "Device"        "/dev/ttyS0"
        Option          "Type"          "eraser"
EndSection

Section "InputDevice"
        Driver          "wacom"
        Identifier      "cursor"
        Option          "Device"        "/dev/ttyS0"
        Option          "Type"          "cursor"
EndSection

Section "ServerLayout"
        InputDevice     "stylus"        "SendCoreEvents"
        InputDevice     "eraser"        "SendCoreEvents"
        InputDevice     "cursor"        "SendCoreEvents"
EndSection

Serial Port Configuration

Before you can proceed to diagnose other areas of setting up your Wacom serial tablet, you need to first make sure the serial values are set up correctly. You do this by comparing your BIOS values with the values set when the kernel boots up. The values in the BIOS will show up as COM1 through COM3. Write the UART and IRQ values done, then reboot your system. Check your kernel boot log with the 'dmesg' command from a console, you're looking to find some ttySX entries.

Host@User# dmesg | grep ttyS
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a 16550A
00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:07: ttyS3 at I/O 0x2e8 (irq = 3) is a 16550A

Most of the time on a computer with one serial port it will be set to ttyS0 in the /dev directory. On my system I have a DE-9 serial port and a DA-15 gameport. Above you can see that the DE-9 is the ttyS0 device, with the gameport being assigned ttyS3. These same values coincide in the BIOS which is what I wanted to verify.

Host@User# setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test

Host@User# setserial -a /dev/ttyS3
/dev/ttyS3, Line 3, UART: 16550A, Port: 0x02e8, IRQ: 3
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test

Host@User# setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: 16550A, Port: 0x02e8, IRQ: 3

The print out above shows 4 serial devices being created regardless of whether they actually exist. This is due to a default of 4 serial devices being set in the kernels source code before it is built. You can bypass this with the 8250.nr_uarts kernel option telling the kernel to create more serial devices. This is needed for when you want to install a serial expansion card that attaches to the PCI interface, the ports will not show up at ttyS0 through ttyS3 and will be created at ttyS4 thereafter.

Below is an example entry in the menu.lst grub boot configuration file.

title           Debian GNU/Linux, kernel 2.6.34
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.34 root=/dev/sda1 ro 8250.nr_uarts=6

In debian your setserial settings are saved in the /etc/serial.conf file. Sometimes your serial card will not show up with the appropriate values needed, in which case you will have to manually edit this file. The best way to find out the UART and IRQ values of your PCI cards serial ports is to use the lspci command with the -vv option which will output extra verbose infromation.

02:0b.0 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port A (prog-if 02 [16550])
        Subsystem: Lava Computer mfg Inc Lava DSerial-PCI Port A
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 23
        Region 0: I/O ports at dfa8 [size=8]
        Kernel driver in use: serial
        Kernel modules: 8250_pci

02:0b.1 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port B (prog-if 02 [16550])
        Subsystem: Lava Computer mfg Inc Lava DSerial-PCI Port B
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 23
        Region 0: I/O ports at dfe0 [size=8]
        Kernel driver in use: serial
        Kernel modules: 8250_pci

The previous text is the print out of the lspci command showing my Lava DSerial-PCI card. There are two sections, one for port A and one for port B. This is the correct hardware information I need to pass to the setserial command at boot time. Below is an example of the parameters being specified in the serial.conf file. Some of the other values related to the serial card I found by searching the internet.

/dev/ttyS0 uart 16550A port 0x03f8 irq 4 spd_normal skip_test closing_wait 3000
/dev/ttyS3 uart 16550A port 0x02e8 irq 3 spd_normal skip_test closing_wait 3000
/dev/ttyS4 uart 16550A port 0xdfa8 irq 23 spd_normal skip_test close_delay 256 closing_wait 15360
/dev/ttyS5 uart 16550A port 0xdfe0 irq 23 spd_normal skip_test close_delay 256 closing_wait 15360

The above examples should give you an idea of how to check and modify the serial port values regardless of which distribution of linux you are using. If the values are correct, matching the information given in the BIOS, or the information printed by programs such as lspci, you can check this section off the list, moving on.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox