Debugging the Aiptek driver


Glyn Edwards pointed out to me on the Aiptek Users mailing list that the cvs code under unified_package/src/linux_kernel_driver/2.6/ is the same as the 1.9 source. There are other versions in the same repository – the repository needs a little cleaning out to avoid confusion.

I checked out the 1.9 and started debugging. I found one minor bug so far – the structure member being updated when you write to coordinate_mode in the sysfs filesystem was actually “pointerMode” instead of “coordinateMode”. I fixed that and will submit patch.

I also added a option for setting a debug level in sysfs. This allows me to push more output to syslog. I'll also post a patch for that.

The first debug test I ran shows that I do indeed get “Report 3” show up in aiptek_irq() when my pen is near the tablet and coordinate_mode is set to absolute. Changing coordinate_mode to relative also correctly gets me “Report 1”. This also tells me that events are occuring over the tablet when the pen is near the tablet – not just when I push *reeeeally* hard. So the problem with using the pen is not related to how hard I push or that the tablet is not sending the events. They are showing up. Now I just have to determine why they aren't getting routed to the right handling functions. My first guess is that the X driver isn't seeing these events correctly. I haven't dug into the X driver yet because it will required downloading the xorg software distribution, which I haven't done yet. I think the next thing to do, since I've proven the events are showing up when the pen is close to the tablet, is to get the Xorg source and rebuild the X driver to make sure I'm up to date with that.