VisTablet under Debian Squeeze

A new toy arrived today – the VisTablet, which is just a rebadged Aiptek 600U (model number WCK-C121). They sell as Aiptek or Waltop or Medion or any one of a few other names for about €65 on ebay.ie at the moment, so I thought what the heck, I do a fair bit of stuff in Gimp so maybe it’s worth a look. A few clicks and a week or so later and it arrives. Cue tearing open the box and unwrapping!
Plugging it into the laptop (Thinkpad R61 running Debian Squeeze amd64) got an instant result in that it found the device and allowed cursor movement… but no actual buttons or pressure sensor stuff, so it couldn’t work as a tablet. So off to google we go and after trying some frustrating messing about with udev rules (to create /dev/apitektablet - which isn’t necessary it turns out) and hal fdi files (to set up X.org options, which are needed) and I’d advanced in a posterior direction.
By now we were through the phase where plugging in the device crashed X and had reached the phase where plugging the device out crashed X. At this point, I found that the problem lay in the wacom drivers. See, just because it’s aiptek hardware doesn’t mean the aiptek drivers actually work – in this case, the wacom driver works much better.
But, just to be annoying, the new version of the wacom driver doesn’t work because it picks up that it’s not a wacom device and commits seppku to avoid being of any use. Note to the coder who thought that was a good idea – go choke on a hairball please.
Solution? Go to linuxwacom and download the latest driver, then untar the tarball, go into linuxwacom-0.8.4-2/src/xdrv and edit wcmUSB.c. You’re looking for this line (it’s line 530 in version 0.8.4.2):
/* vendor is wacom */
if (sID[1] == 0x056A)
{
And you want to change it to this:
/* vendor is wacom or waltop */
if (sID[1] == 0x056A || sID[1] == 0x172f)
{
Now apt-get install xorg-dev and whatever other packages you need like build-essential and call configure and make and then sudo make install.
You now have a working wacom driver and if you copy the wacom.fdi file into /etc/hal/fdi/policy/ (it’s /usr/share/hal/fdi/policy/20thirdparty/10-linuxwacom.fdi on Debian) and add in the following bit:
<match key="info.product" contains="WALTOP">
<merge key="input.x11_driver" type="string">wacom</merge>
<merge key="input.x11_options.Type" type="string">stylus</merge>
<append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
<append key="wacom.types" type="strlist">eraser</append>
<append key="wacom.types" type="strlist">cursor</append>
<append key="wacom.types" type="strlist">pad</append>
</match>
into the <device> section of the xml file (you probably don’t need the eraser and cursor lines, but what the heck, they don’t harm anything and I was too tired of restarting X at this point to check). You should now be almost done – restart hal, restart x.org, and log back in and then plug in the tablet (check dmesg and /var/log/X.0.log so you’re sure it worked) and then fire up Gimp, go to Edit->Preferences->Input Devices->Configure Extended Input Devices and make sure the tablet is listed there and that it’s not set to disabled, then go to Edit->Preferences->Input Controllers and make sure that Linux Input is in the list of active controllers and is set to look at the tablet, and it should work.

Mind you… if this is what it takes to make cheap hardware work on linux, Linux Hater has a very good point.
New CS7004 hardware arrives…
So for CS7004’s labs, I wanted to have one large-ish, deep-ish, multi-step, interesting project. And I’ve thought of one and I’ll write it up as we go through it (no fair readers here learning before the students!).
But here’s a sneak peek at the hardware they’ll be using
(Assuming, of course, that I can get the sodding thing to do what it needs to do!)

Duct tape considered harmful
Blogs are a useful and important tool for professional developers and engineers, for two main reasons. Firstly, by and large, we are not free to divulge the details of the work we do while under contract — but at our next interview, those details are precisely what the interview itself is there to judge. So blogs (and I include this one without question) can take on a professional portfolio role, showcasing examples of professional work as applied to side projects, giving professional opinions on relevant products and work practices and so forth, all of which informs an interviewer who does their research as to the suitability of a candidate for a position. This is an old technique that artists and graphic designers are explicitly familiar with.
Relevant professional blogs can also act as a cheap way to monitor your continuing professional development. They’re not training courses, they’re not accredited and they never will be; but observing what your peers are doing is a very old way of watching for trends that you might consider directing your own CPD efforts towards. Through RSS feeds, RSS aggregator sites and a decent RSS reader, it is relatively easy to monitor large numbers of blogs with little effort beyond the actual reading of new articles as they appear.
The problem is that some bloggers, so focussed on the first goal of presenting a good online portfolio, and so obsessed with metrics like pages-served-per-week as a measure of progress towards that first goal, post dross which can then impede others in the pursuit of the second goal because of the lack (and impossibility) of an effective peer review process. In some cases, bloggers seem to abandon completely the goal in pursuit of the metric – chasing after eyeballs without having anything of substance to then display to this newly captured audience. (more…)
DerBlinkenLightenWorken
Okay, I’ll grant you, it doesn’t look that impressive. That’s just the basic ‘Blinky’ first-step demo for the Keil MPC2400 board. Basic light chaser using the pot to set the speed of the blinking.
However, it’s a bit more fun when I note that the Keil environment was run from within Virtualbox on my Debian laptop and it still used the USB JTAG connection to connect to the board and it all worked without a hitch on the first try.
Apart from the obvious convienence this means to me (I don’t have to dual-boot to programme the board, I can run the exercises from within Linux, which I prefer), it’s just downright impressive that Virtualbox is that far along.
Well, maybe not to you young kids, but to someone who was in college when the web came along, this is impressive
Maximum Password Length in Coova-Chilli
So for the last few days I’ve been banging my head up against the same problem in the lab. We currently use Chillispot to run our access points for the Metakall user trials, which is grand, but it’s also fairly out of date – it hasn’t been actively developed on since 1997 – and it has some serious security issues. So with the new academic year looming, we’re moving over to its successor, Coova-Chilli.
Coova has a few neat features we like, and it’s also being actively maintained, which is important. So I took our testbed server, installed FreeRADIUS and MySQL and Apache and all the custom stuff we’ve written and generally got things set up, and then went to install the latest version of coova-chilli (1.0.14). There was an hour of swearing at iptables as usual (I really am coming to hate that program), and then I thought that’d be that.
But of course not. (more…)
Metakall User Trial
So this is what I’ve been up to for the last year; building this pretty much from scratch (rebuilding it in fact) and getting it to the launched stage. Everything from low-level C code for custom servers, to custom freeRADIUS modules (again in C) to the MacOS and iPhone/iPod Touch clients I’m writing at the moment (Will, if you’re reading this, I’m finally using Objective C again
), and all the project management and dogsbody stuff you’d expect.
Fingers crossed it works properly
METAKALL USER TRIAL KICKS OFF IN TRINITY COLLEGE DUBLIN

For Immediate Release
METAKALL USER TRIAL KICKS OFF IN TRINITY COLLEGE DUBLIN
Dublin, April 10 — Metakall, a WiFi authentication and metering system, has begun its second user trial in Trinity College Dublin this week for students and staff, allowing access to the internet from mobile devices and allowing them to make phone calls over the internet in cooperation with FreeSpeech.ie.
Metakall, which is funded by an Enterprise Ireland grant, may be among the first of 300 companies to spin out under the new joint TCD/UCD Innovation Academy announced last month by the two colleges along with the Taoiseach, Tanaiste, Minster for Finance and Minister for Education.
Headed up by Dr.Hitesh Tewari, an expert in internet micropayments, the project has a working system but is still working on usability, testing, and on creating new clients for different platforms. Several companies including Eircom and O2 have expressed interest in the technology developed by Metakall, and talks are ongoing regarding a possible installation in San Jose.
The Metakall system was initially trialled in August last year in TCD. Significant changes have since been made to the technology, which consists of a client which runs on the user’s laptop or mobile phone, connecting them to the wireless internet system on the TCD campus as well as in satellite sites in Trinity Halls, St.James’ Hospital and Santry.
This client, which runs under Microsoft Windows XP, Vista and the new Windows 7 operating system, as well as on several mobile phones, utilises Metakall’s Zero Touch Authentication technology to allow users to use the internet on their netbook or phone. Clients for MacBooks and both the iPhone and the iPod Touch are in active development. Clients for Google Android and the Palm Pre are planned.
Those students and staff who are interested can find out more and sign up for the trial, which has places for up to a thousand users, on the Metakall website at http://metakall.dsg.cs.tcd.ie.
Ultimately, the team hope to spin out and form their own company to market the technology commercially at home and abroad. Metakall received 400,000 euro in funding from Enterprise Ireland for the initial development of their technology.
PHOTOS AND GRAPHICS:
http://metakall.dsg.cs.tcd.ie/Press/Metakall.jpg
http://metakall.dsg.cs.tcd.ie/Press/MetakallUSBKey.jpg
http://metakall.dsg.cs.tcd.ie/Press/MetakallLogo.png
CONTACT DETAILS:
Hitesh Tewari, Principal Investigator htewari@cs.tcd.ie 087 212 2008 Distributed Systems Group School of Computer Science and Statistics Trinity College Dublin Dublin 2 Mark Dennehy, Project Manager mark.dennehy@cs.tcd.ie 085 774 7546 Distributed Systems Group School of Computer Science and Statistics Trinity College Dublin Dublin 2
gethostbyname_r()
Okay, so I can’t really go into too much of the big picture since this is from the day job, but I can certainly tear into gethostbyname_r() a bit.
For part of what we’re doing, we’re sending a RADIUS message using the freeradius project’s radius client library. So, nice and simple (after you’ve done some setup):
result = rc_acct(rh, 0, send);
Easy enough, right? So it fails. Specifically, it segfaults and since it’s in a multithreaded server, it’s a pain to track down. And I mean a pain. Hours of fun with DDD, gdb, nana and finally printf() lead to here:
res = gethostbyname_r(hostname, &hostbuf, tmphostbuf, hostbuflen, &hp, &herr)
Ah. gethostbyname_r(), the glibc2-reentrant thread-safe version of gethostbyname(). Except that it’s deprecated, and has the unique property of working differently on just about every machine out there.
And of course, in my machine, and the server, it’s going nuts. Not because of a dodgy parameter or anything like that, though that took a while to confirm, it’s going nuts because of the way /etc/nsswitch.conf is written:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
That’s the standard way to write nsswitch.conf in ubuntu – it first checks the /etc/hosts file, then uses the avahi daemon, then the DNS system.
Only that’s not good enough for gethostbyname_r(). Grrr. So after a full day bug-chasing through two codebases, the fix is to change a configuration file to this:
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 hosts: dns files
What a waste of a day! Gah!
I’m going to rewrite the radius-client library to use getaddrinfo() over the next while. I already have to make some changes to it to cope with other things, I may as well help here too I guess. But for today, I console myself by printing out that page of source code and reaching for the matches…
RSS Feed




2 comments