<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Julian Squires</title>
  <link href="http://cipht.net/atom.xml" rel="self"/>
  <link href="http://cipht.net/"/>
  <updated>2011-07-02T13:11:06-04:00</updated>
  <id>http://cipht.net/</id>
  <author>
    <name>Julian Squires</name>
    <email>julian@cipht.net</email>
  </author>
  
  <entry>
    <title>A kernel driver for legacy Wacom serial tablets</title>
    <link href="http://cipht.net/2011/07/02/wacom_serial-initial-release.html"/>
    <updated>2011-07-02T00:00:00-04:00</updated>
    <id>http://cipht.net/2011/07/02/wacom_serial-initial-release</id>
    <content type="html">&lt;p&gt;Having gotten back to doing some art on computer, I decided to dust off my old Wacom Digitizer II again. It&amp;#8217;s always a bit of an adventure trying to get it to work on a new system, as some configuration system has &lt;a href='http://www.jwz.org/doc/cadt.html'&gt;always completely changed&lt;/a&gt; since the last time I hooked it up. However, this time, I discovered that while the general approach to detecting and configuring input devices had improved a lot, support for these old serial Wacom tablets had been completely removed from the xorg Wacom input driver!&lt;/p&gt;

&lt;p&gt;Initially I was pretty irritated, as you can imagine, but after looking at the code that had been excised, it was clear that this was for the best. Given the new(ish) approach to handling input devices in the Linux kernel, having all the support for the device on the X side is now clearly the Wrong Thing. So, I set about reading as much code as possible related to serial Wacom tablets, and writing a &lt;code&gt;serio&lt;/code&gt;-based driver.&lt;/p&gt;

&lt;p&gt;Along the way, it seemed to me that this would be cleaner if protocol four (like my Digitizer II) and protocol five (newer tablets like the Intuos series) devices were supported separately. So, Intuos owners, I regret to say that the driver presented here does not support your devices, though I wouldn&amp;#8217;t mind trying to write a driver to support them.&lt;/p&gt;

&lt;p&gt;Aside from the inevitable actual bugs to be discovered, this driver currently does not support (at least):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pad buttons;&lt;/li&gt;

&lt;li&gt;tilt;&lt;/li&gt;

&lt;li&gt;suppression;&lt;/li&gt;

&lt;li&gt;cursor devices (some things are missing to fully support these devices).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To use it presently, you&amp;#8217;ll need to do a few things: (instructions apply to Debian systems but should be easily adapted elsewhere)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Unpack and build the module:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    $ tar xzf wacom_serial.tar.gz
    $ cd wacom_serial
    $ make all&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That should produce &lt;code&gt;wacom_serial.ko&lt;/code&gt; if you&amp;#8217;ve got things otherwise configured correctly for building modules against your current kernel version. Then:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    $ sudo insmod ./wacom_serial.ko&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Patch and build &lt;code&gt;inputattach&lt;/code&gt; (in the &lt;code&gt;joystick&lt;/code&gt; package) with the included patch:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    $ apt-get source joystick
    $ cd joystick-1.4.1
    $ patch -p1 &amp;lt; ~/wacom_serial/inputattach.patch
    $ dpkg-buildpackage
    $ sudo dpkg -i ../inputattach-1.4.1-1_powerpc.deb&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(Adjust paths to things per your case, of course.)&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Add the included &lt;code&gt;70-serial-wacom.rules&lt;/code&gt; file to your local udev rules (put it in &lt;code&gt;/etc/udev/rules.d&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Connect your tablet, turn it on, and run:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    $ sudo inputattach --wacom_iv /dev/ttyS0&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;where &lt;code&gt;ttyS0&lt;/code&gt; is the device for the serial port to which the tablet is attached. USB serial adapters usually show up as &lt;code&gt;/dev/ttyUSB&lt;/code&gt;&lt;em&gt;n&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At this point, if everything else on your system is fairly current (including the &lt;code&gt;xf86-input-wacom&lt;/code&gt; module and its configuration), your tablet should hopefully work in X. &lt;a href='mailto:julian@cipht.net'&gt;Let me know&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So far, I&amp;#8217;ve only tested it on Linux kernel 2.6.39, i386 and powerpc.&lt;/p&gt;

&lt;p&gt;You can get the driver here: &lt;a href='/releases/wacom_serial-110702-0.tar.gz'&gt;wacom_serial-110702-0.tar.gz&lt;/a&gt;. If you have a Wacom serial tablet, please try it out and let me know what happens, success or failure regardless. Please also send any messages logged (usually to &lt;code&gt;/var/log/kern.log&lt;/code&gt;) from the point where you attached the device with &lt;code&gt;inputattach&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This driver was developed with reference to much code written by others, particularly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;elo, gunze drivers by Vojtech Pavlik;&lt;/li&gt;

&lt;li&gt;wacom_w8001 driver by Jaya Kumar;&lt;/li&gt;

&lt;li&gt;the USB wacom input driver, credited to many people (see &lt;code&gt;drivers/input/tablet/wacom.h&lt;/code&gt;);&lt;/li&gt;

&lt;li&gt;new and old versions of linuxwacom / xf86-input-wacom credited to Frederic Lepied, Ping Cheng, and Jon E. Joganic;&lt;/li&gt;

&lt;li&gt;and xf86wacom.c (a presumably ancient version of the linuxwacom code), by Frederic Lepied and Raph Levien.&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
  
  <entry>
    <title>Molt live, July 21st</title>
    <link href="http://cipht.net/2011/06/16/molt-show-announcement.html"/>
    <updated>2011-06-16T00:00:00-04:00</updated>
    <id>http://cipht.net/2011/06/16/molt-show-announcement</id>
    <content type="html">&lt;p&gt;My eccentric death metal band, &lt;a href='http://molt.ca'&gt;Molt&lt;/a&gt;, will be playing &lt;a href='http://www.myspace.com/barflymtl'&gt;Barfly&lt;/a&gt; on July 21st. Further details to come soon — keep an eye on the feed at &lt;a href='http://molt.ca'&gt;molt.ca&lt;/a&gt; or &lt;a href='http://www.last.fm/event/1971929+Molt+at+Barfly+on+21+July+2011'&gt;the event page on last.fm&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <title>Anaphora 0.9.4 released</title>
    <link href="http://cipht.net/2011/06/15/anaphora-0.9.4-released.html"/>
    <updated>2011-06-15T00:00:00-04:00</updated>
    <id>http://cipht.net/2011/06/15/anaphora-0.9.4-released</id>
    <content type="html">&lt;p&gt;Just shy of the fifth anniversary of the last release, &lt;a href='http://common-lisp.net/project/anaphora'&gt;anaphora&lt;/a&gt; 0.9.4 has been released. This release is mostly some accumulated minor bug fixes, though it also adds &lt;code&gt;ALET&lt;/code&gt; and &lt;code&gt;SLET&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Anaphora is an anaphoric macro package for Common Lisp, allowing code like this:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='cl'&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;define-binary-type&lt;/span&gt; &lt;span class='nc'&gt;array&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;type&lt;/span&gt; &lt;span class='nb'&gt;count&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='ss'&gt;:reader&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;in&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;aprog1&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;make-array&lt;/span&gt; &lt;span class='nb'&gt;count&lt;/span&gt; &lt;span class='ss'&gt;:element-type&lt;/span&gt; &lt;span class='k'&gt;type&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
      &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;loop&lt;/span&gt; &lt;span class='nv'&gt;for&lt;/span&gt; &lt;span class='nv'&gt;i&lt;/span&gt; &lt;span class='nv'&gt;below&lt;/span&gt; &lt;span class='nb'&gt;count&lt;/span&gt; &lt;span class='nb'&gt;do&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;setf&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;svref&lt;/span&gt; &lt;span class='nv'&gt;it&lt;/span&gt; &lt;span class='nv'&gt;i&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;read-value&lt;/span&gt; &lt;span class='k'&gt;type&lt;/span&gt; &lt;span class='nv'&gt;in&lt;/span&gt;&lt;span class='p'&gt;)))))&lt;/span&gt;
  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='ss'&gt;:writer&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;out&lt;/span&gt; &lt;span class='nc'&gt;array&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;loop&lt;/span&gt; &lt;span class='nv'&gt;for&lt;/span&gt; &lt;span class='nv'&gt;v&lt;/span&gt; &lt;span class='nv'&gt;across&lt;/span&gt; &lt;span class='nc'&gt;array&lt;/span&gt; &lt;span class='nb'&gt;do&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;write-value&lt;/span&gt; &lt;span class='k'&gt;type&lt;/span&gt; &lt;span class='nv'&gt;out&lt;/span&gt; &lt;span class='nv'&gt;v&lt;/span&gt;&lt;span class='p'&gt;))))&lt;/span&gt;

&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nb'&gt;defun&lt;/span&gt; &lt;span class='nv'&gt;get-faces&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;chunk&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
  &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;awhen&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;recursively-seek-chunk&lt;/span&gt; &lt;span class='ss'&gt;&amp;#39;face-list&lt;/span&gt; &lt;span class='nv'&gt;chunk&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='nv'&gt;faces-of&lt;/span&gt; &lt;span class='nv'&gt;it&lt;/span&gt;&lt;span class='p'&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;(&lt;code&gt;APROG1&lt;/code&gt;, &lt;code&gt;IT&lt;/code&gt;, and &lt;code&gt;AWHEN&lt;/code&gt; are symbols from &lt;code&gt;ANAPHORA&lt;/code&gt;).&lt;/p&gt;</content>
  </entry>
  
</feed>
