[tslib] Questions regard whether tslib can work with driverless touchscreen

Martin Kepplinger martink at posteo.de
Tue Mar 6 03:15:31 PST 2018

Am 06.03.2018 10:54 schrieb JC Yang:
> Hi, I’m new to tslib and have questions.
> I’ve got a touchscreen connected via serial port and no known kernel
> drivers for it.
> From the tslib introduction and tutorial, it seems that it support any
> devices generate Linux input events and multitouch events, but you
> also stated “in case the operating system doesn't provide driver
> support.”  Doesn’t it suggest it support driverless touchscreens(at
> least for a list of known work models, I guess?).
> But all related information about “How To connect a serial port
> touchscreen without driver/How to use tslib as userspace driver daemon
> for your TS” are vague at best(not even google help). I know I can
> read the source code and get the conclusion but I’m not permitted to
> take long time to do it.
> So I do my experiments, simply invoke a properly configured(hopefully
> understand your tutorial correctly) ts_calibrate with
> TSLIB_TSDEVICE=/dev/ttyConnectedToTouch does not work at all. It says
> “Selected device is not a Linux input event device”
> Anything wrong with my approach? Or maybe the fact is that tslib does
> not implement any userspace daemon to interpret RealRaw touch signals
> for any models? Is the real meaning of “drivers” within “in case the
> operating system doesn't provide driver support.” same as any
> calibration and filtering tools from vendors(but tslib do rely on
> vendor provided /in kernel tree/userspace daemon to present a
> /dev/input/eventX)? Is calibration/filtering the real meaning of
> “access touchscreen devices” in your introduction?
> Thanks and hope that in anyway this subject should be better
> documented rather than rely on user investigations.


It's all not that complicated :) The Error "Selected device is not a 
Linux input event device"
is because you use the "module_raw input" (first) line in your ts.conf. 
That's wrong for you.
That's what you need to change!

And in your case, you need to (most probably) write
a plugins/<yourdevice>-raw.c "tslib-driver" that simply reads the data 
from your tty connection
in your new module's "read" or "read_mt" functions. How to read, only 
tells your datasheet.
But how to fill tslib's structs and functions, tell you "serial tty" 
modules like
dmc_dus3000-raw.c and touchkit-raw.c that work similarly. You then use 
your module
by having "module_raw <yourdevice>" in ts.conf instead of "input".

First, I'd be glad to get details on your device, and if you have a 
module-raw working,
maybe pull it in to tslib, in order for you to get filter/core-updates 
simply by updating tslib.
If you have a work-in-progress up somewhere, I may find time to review, 
just ask.

And also, I'd be happy for patches or hints on how we could improve 

Does that help? If not, just shout.



More information about the tslib mailing list