Shiny New E-Book Gizmo: The Amazon Kindle


View Full Version : iLiad as a wireless Wacom tablet for my desktop


hudson
10-19-2007, 10:33 AM
Based on the info from postings on the iRex forums (http://forum.irexnet.com/viewtopic.php?t=1353), I was able to get my iLiad to act as a tablet for my desktop PC. I used the socat tool on the iLiad and stopped the built in X server (otherwise it would sometimes shut down the tablet):


killall Xfbdev
socat TCP-LISTEN:2998 /dev/ttyS0


On my PC I ran (substitute your IP address):


sudo socat PTY,link=/dev/wacom,raw,echo=0 TCP:10.0.0.200:2998


I had to update my /etc/X11/xorg.conf with:


--- /tmp/xorg.conf.orig 2007-10-19 10:31:14.000000000 -0400
+++ xorg.conf 2007-10-19 10:11:28.000000000 -0400
@@ -8,6 +8,9 @@
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
+ InputDevice "stylus" "SendCoreEvents"
+ InputDevice "eraser" "SendCoreEvents"
+ InputDevice "cursor" "SendCoreEvents"
EndSection

Section "Files"
@@ -56,3 +59,40 @@
Modes "1280x1024"
EndSubSection
EndSection
+
+
+ Section "InputDevice"
+ Driver "wacom"
+ Identifier "stylus"
+ Option "Device" "/dev/wacom" # SERIAL ONLY
+ Option "Type" "stylus"
+ Option "ForceDevice" "ISDV4" # Tablet PC ONLY
+ EndSection
+
+ Section "InputDevice"
+ Driver "wacom"
+ Identifier "eraser"
+ Option "Device" "/dev/wacom" # SERIAL ONLY
+ Option "Type" "eraser"
+ Option "ForceDevice" "ISDV4" # Tablet PC ONLY
+ EndSection
+
+ Section "InputDevice"
+ Driver "wacom"
+ Identifier "cursor"
+ Option "Device" "/dev/wacom" # SERIAL ONLY
+ Option "Type" "cursor"
+ Option "ForceDevice" "ISDV4" # Tablet PC ONLY
+ EndSection
+
+ # This section is for Intuos3, Cintiq 21UX, Graphire4, or Bamboo
+# Section "InputDevice"
+# Driver "wacom"
+# Identifier "pad"
+# Option "Device" "/dev/ttyS0" # SERIAL ONLY
+# Option "Device" "/dev/input/event0" # USB ONLY
+# Option "Type" "pad"
+# Option "USB" "on" # USB ONLY
+# EndSection
+
+


The X11 wacom driver would not initialize the tablet correctly and the cursor would always go into the upper left corner , but if I ran wacdump before starting X it would leave things in an ready to go state:


sudo wacdump -v -f tpc /dev/wacom


With the two-button stylus from my CF-18 Toughbook I'm able to get the multiple buttons and pressure from wacdump and use the extra functions with the gimp.

It seems a good next step would be a helper application for the iLiad that displays a toolbox palette on the far side of the screen and maybe even a small preview of the screen. Sort of like CAD applications that use digitizer tablets, but for graphics.

nekokami
10-19-2007, 11:15 AM
Very interesting, especially that you are able to get the pressure sensitivity from the iLiad's screen. I'd been wondering if that was somehow unimplemented, like the problems that turned up with the tilt data during the calibration project.

So you don't see what you're drawing on the iLiad, it just shows up on the PC? It looks like you're running some kind of linux on the PC -- any particular flavor?

hudson
10-19-2007, 11:56 AM
Very interesting, especially that you are able to get the pressure sensitivity from the iLiad's screen. I'd been wondering if that was somehow unimplemented, like the problems that turned up with the tilt data during the calibration project.

I don't see any tilt data in the wacom structure for Tablet PC (tpc) capabilities for linuxwacom-0.7.8-3:


#define TABLETPC_CAPS (WACOMVALID(TOOLTYPE)|WACOMVALID(SERIAL)| \
WACOMVALID(PROXIMITY)|WACOMVALID(BUTTONS)|WACOMVAL ID(POSITION_X)| \
WACOMVALID(POSITION_Y)|WACOMVALID(PRESSURE))


However, this is based on a reverse engineered driver, so the capability may be there but not yet understood by the Linux developers.

So you don't see what you're drawing on the iLiad, it just shows up on the PC?
Right -- nothing shows up on the iLiad. The screen shows what ever was last viewed on it, but since the X server is killed as part of running my script nothing shows on it. As a future project I might switch to a UDP server on the iLiad that does some sort of image or toolbox display and allows for "hot plugging" of the tablet, but for now it is just a tabla rasa.

It looks like you're running some kind of linux on the PC -- any particular flavor?
I'm running FC4 on my desktop -- 485 days of uptime!

Adam B.
10-19-2007, 12:33 PM
Can you post your binaries and scripts (I've deleted mine).

It seems like I was really close on this... It looks like the only thing you did different was change the port, and commented out the pad area. I guess I gave up too soon.

Good work!

nekokami
10-19-2007, 01:44 PM
As I understand it, someone at Wacom actually confirmed that the configuration used on the iLiad wouldn't render any meaningful tilt data, but I may have that mixed up. It's buried somewhere in the community developer threads at iRex.

jharker
10-19-2007, 01:49 PM
Wow, congratulations! Really nice work! I remember Adam giving it a try and having trouble, I'm impressed that you got it all figured out. Very, very useful ability. Also, it points out how the iLiad is really a very capable multi-purpose tool.

Re: pressure data:

The pressure data is definitely available. I don't know whether pressure got written into the new community-developed iLiad touchpad driver or not. That is, the question is whether the driver passes along pressure data to other applications. If I get a chance I'll look in the source code and see.

In any case, the second half is, even if the data is available from the driver, you still have to change the user programs to take advantage of the pressure data. As far as I know, no one has tried to do this yet.

Re: tilt data:

The iLiad's Wacom tablet definitely does not provide tilt data. It's not even tilt-capable. We don't know exactly what the hardware is, but it responds to the TabletPC protocol so it's probably similar. I actually corresponded with a Wacom VP of Engineering, who confirmed that the TabletPC Linux driver is a pretty complete implementation. He also confirmed that the iLiad's Wacom tablet doesn't do tilt.

Here's the thread (http://forum.irexnet.com/viewtopic.php?t=1222) nekokami mentioned. It dates back to when we were working on the "calibrate" utility and the new iLiad tablet driver. It pretty much covers the tilt topic from every angle, and the conclusion is that it's just not possible. :cry: Sad, too, I really wanted tilt.

hudson
10-19-2007, 02:04 PM
Can you post your binaries and scripts (I've deleted mine).

Attached is a directory of the arm and i386 binaries and scripts. The binaries may not work for anyone else since the libraries that they are linked against are old.


It seems like I was really close on this... It looks like the only thing you did different was change the port, and commented out the pad area. I guess I gave up too soon.


You really had it the entire way -- the only major fix that I found was the run wacdump to put the tablet into a working state since the Xorg device driver wasn't doing it correctly.

The port is arbitrary, but socat doesn't set the SO_REUSEADDR flag. This makes it frustrating to restart for another test -- I had to keep changing to different port numbers since socat exits when the connection is dropped. The X server doesn't like the /dev/wacom device going away, either. I suspect that the best approach would be a connectionless (UDP multicast?) approach that would have a persistant file descriptor on the desktop side and a server that runs constantly on the iLiad. The desktop client would also handle the initialization of the port so that we have the tablet in a known state.

nekokami
10-19-2007, 02:24 PM
So if the pressure data is available, what's a light-weight drawing program that could use it? The GIMP is obviously too huge for this. I like ArtRage a lot, but it's not available for Linux.

When I was showing off my iLiad at a conference last week, one question I did get several times was whether there was a better drawing program available -- something that would let you move elements, like boxes on a flowchart or org chart. Anyone know of something like that in the open source space?

Antartica
10-20-2007, 06:57 AM
When I was showing off my iLiad at a conference last week, one question I did get several times was whether there was a better drawing program available -- something that would let you move elements, like boxes on a flowchart or org chart. Anyone know of something like that in the open source space?

Flowcharts are handled quite well by Dia:

http://www.gnome.org/projects/dia/

But it doesn't use (nor need, IMHO) pressure data.

arivero
10-20-2007, 07:49 AM
Just to be curious, how does the price of the iLiad compares to a wacom tablet of the same size with and without incorporated screen? No need to be wireless.

I guess that now that the iLiad is stable on a table, it can be competitive.

hudson
10-20-2007, 10:01 AM
Just to be curious, how does the price of the iLiad compares to a wacom tablet of the same size with and without incorporated screen? No need to be wireless.

The Graphire (http://www.wacom.com/graphire/) is probably the closest in direct features -- 8x6 and Bluetooth wireless for $200. If the iLiad is extended to use the e-ink display as an external monitor it is closer, but not identical to the Cintiq (http://www.wacom.com/cintiq/) (full color, 21", wired and $2500) or the DTF521 (http://www.wacom.com/pendisplays/DTF521.cfm) (full color, 15", wired and $1600).

So if the pressure data is available, what's a light-weight drawing program that could use it? The GIMP is obviously too huge for this. I like ArtRage a lot, but it's not available for Linux.
wetdream (http://www.levien.com/gimp/wetdream.html) is a very simple water-color painting program from 2001 that uses the pressure data to allow for simulated brush strokes. Attached is an image that I drew to test it out, but I warn you that I'm not an artist!

nekokami
10-20-2007, 04:03 PM
I know pressure sensitivity wouldn't be needed for a basic draw program to handle flowcharts and the like. They are two separate functional needs that I'd like to see met. Even if they are in two different applications, like Dia and wetdream.

I think if the iLiad could display while it provides input to another system, it really could compete with the Cintiq, which is overkill for most folks. The Graphire is ok, but I really like being able to look down at what I'm drawing, rather than drawing in one place and looking in another. (I can do that while I type, but I'm not good enough at drawing to get away with it!)

arivero
10-22-2007, 11:30 AM
The Graphire (http://www.wacom.com/graphire/) is probably the closest in direct features -- 8x6 and Bluetooth wireless for $200. If the iLiad is extended to use the e-ink display as an external monitor it is closer, but not identical to the Cintiq (http://www.wacom.com/cintiq/) (full color, 21", wired and $2500) or the DTF521 (http://www.wacom.com/pendisplays/DTF521.cfm) (full color, 15", wired and $1600).


I see. Thus the price difference between the iLiad and the sony is perfectly explained. Bad news for prospective buyers expecting bargains, but good argument to defend the buying of iLiads.

nekokami
10-22-2007, 02:18 PM
If you consider that you get the functionality of the Sony Reader PLUS the Wacom Graphire, that would be $350+$200 = $550. That's what hudson's app gives us at this point. If you add in the ability to add open-source linux apps to do things like browse the web over wifi, that probably covers the remaining $200, but only for people who want/need those functions, obviously.

It's really quite a tool. I'm not sure iRex truly understands what they've got on their hands.

Adam B.
10-22-2007, 05:39 PM
It's really quite a tool. I'm not sure iRex truly understands what they've got on their hands.

Agreed. They really haven't even touched on what it is capable of.

I guess that's what we're here for. :D

CommanderROR
10-23-2007, 09:41 AM
iRex might not, but you guys certainly have...^^

Adam B.
10-23-2007, 09:49 AM
iRex might not, but you guys certainly have...^^

I think we've just begun to scratch the surface... :grin2:

hudson
10-25-2007, 09:03 AM
...
I think if the iLiad could display while it provides input to another system, it really could compete with the Cintiq, which is overkill for most folks. The Graphire is ok, but I really like being able to look down at what I'm drawing, rather than drawing in one place and looking in another. (I can do that while I type, but I'm not good enough at drawing to get away with it!)

Wacom has just announced a smaller version of the Cintiq, a 12 inch model (http://gadgets.boingboing.net/2007/10/24/wacom-cintiq-12wx-lc.html) that is powered over USB.

I haven't made much further progress with the UDP interface for the tablet on my iLiad; it is frustrating to restart my X server all the time since I must restart fifty xterms or so. This would be a good thing to test on a second X server running on :1.0 so that I don't lose all of my other work in the process.

nekokami
10-25-2007, 10:07 AM
At "less than one thousand dollars," the new Cintiq is still well out of my price range. I'm still hoping to be able to use my iLiad for this purpose. And I still think the iLiad in general could compete with this new Cintiq model, as it can do so many other things as well.

ProDigit
10-22-2008, 01:16 AM
Just out of curiosity, where do you guys learn all of this (Linux driver mods and so)?

igorsk
10-22-2008, 05:14 PM
Well, you can start here:
http://www.faqs.org/docs/kernel/
or here:
http://kernelnewbies.org/

jharker
10-22-2008, 05:57 PM
Personally, I started by just grabbing the source code or man pages and digging through it with a goal in mind. It really depends on what you're trying to do. Some understanding of basic tools (grep, less, find, man, C language, Google search) is really all you need to get started, then it's just looking things up, making deductions, etc...

Basically it's all trial and error. Keep notes to track your thought process. Don't be afraid to be wrong. Don't be afraid to ask other people questions, too! My number one rule is "never be afraid to look like an idiot" :D

ProDigit
10-22-2008, 09:32 PM
I wish there was some 'intro-kernel' to start with...
Like,Linux kernels have advanced so much the past 10 years it's like I'd never catch up with them anymore...

The time when Linux only was available as a shell, I was way too young to start thinking about modifying it.
Now that the years of 'intelligence' have come,it's like going to a school, and being 5 years behind the rest of the class,you know what I mean?

It'd be nice if the reader or other simple hardware devices supported like a tiny kernel, that's just too easy to mod.
Like where if you put your mind to it,you could program everything, and knew everything there is to know about the drivers and hardware within one week!

I bet the kernel is one of the hardest things to start with.. It's all so connected drivers, kernel, OS...

I'd love to learn it but I'd probably need to consider if I'm willing to dedicate myself to the many hours of study, and if it could ever bring bread in my house.. you know?

ericshliao
10-23-2008, 01:50 AM
It'd be nice if the reader or other simple hardware devices supported like a tiny kernel, that's just too easy to mod.
Like where if you put your mind to it,you could program everything, and knew everything there is to know about the drivers and hardware within one week!


IMHO, Linux is already a qualified tiny kernel. Many embedded devices adopt Linux as their working OS.
If you want to know everything about kernel mod in a week... that's hard to say.
I think its nearly impossible. Because if you can make it within a week, you must have already known so many things that you only need one week to pick up the tiny parts, not from intro-level.