any touch screen experience there?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Feb 16 20:36:19 UTC 2005


On Wed, Feb 16, 2005 at 01:20:57PM -0500, Zbigniew Koziol wrote:
> Just wonder if there is anybody around who knows something how touch 
> screens work under Linux?
> 
> The company I have some work with sells kiosks with touch screens. They 
> operate on Windows. It would be wonderfull to change their OS to Linux, 
> wouldnt it?
> 
> At the moment I do not know much technical details, but I will know 
> more, soon.

I reverse engineered the protocol for a touch screen a couple of years
ago, using a null modem cable (the touch screen used serial) and the
windows driver for the screen, then after determining what the command
to initilize the screen to the right mode was, and how to interpret the
bytes sent when the screen was being touched, I just copied an existing
xfree86 touch screen driver that seemed to have a similar protocol, and
changed the protocol handling code.  Worked very nicely.  only took me a
couple of days to do all the work (while being distracted by people
wanting me to fix their machines).

I wrote a small c program that simple read data from one serial port and
sent it out another, and vice versa, and dumped the hex code of each
byte it saw going each way.  Monitoring serial links in the middle that
way is rather simple, well once you know the baud rate, which is usually
9600 for touch screens.  Many newer touch screens are usb, so that is
probably a bit harder to figure out.

The basic protocol of the touch screens I have dealt with is, when
screen is touched, transmit touch event along with x/y cooordinate
(usually 0-4000 range, or whatever size of range the screen uses) and
then whenever the position changes, send a still held event with the new
coordinate, and when the user stops touching, send a release event with
last coordinate.  The meaning of the events is then up to the driver or
the application using the driver.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list