A13-LCD7TS 7″ LCD with Touchscreen works perfect under Android, but the normal Debian image we have didn’t support it.
You can see some discussion on our forum about it: https://www.olimex.com/forum/index.php?topic=444.0 part of the problem is that touchscreen driver is not registered as such in the linux kernel. This could be fixed relatively easy by adding the info written on the forum, so now you can use the touchscreen by your apps, but you still can’t do this under X, why?
Because Debian is missing xf86-input-tslib library in it’s repositories and to have working touchscreen on XFCE4 you have to download and compile this library yourself.
Dimitar Gamishev (a.k.a. HEHOPMAJIEH form #olimex irc channel) yesterday teach me how to do this step by step so now I can share. First you have to download the Touchscreen patched which Dimitar did from https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/TOUCHSCREEN
1. ENABLE TOUCHSCREEN
then you follow these steps:
step 1.
$ git clone https://github.com/kergoth/tslib
step 2.
$ cd tslib
step 3.
$ patch -p1 < ../tslib.patch
(if asks for the filename it is plugins/input-raw.c)
step 4.
$ autoreconf -vi
step 5.
$ ./configure
step 6.
$ make
step 7.
$ make install
so far fo good, now touchscreen event is exported and to see which number it is do
$ dmesg | grep sun4i-ts
[ 18.190000] sun4i-ts.c: sun4i_ts_init: start …
[ 18.200000] sun4i-ts: tp_screen_size is 7 inch.
[ 18.210000] sun4i-ts: tp_regidity_level is 5.
[ 18.220000] sun4i-ts: tp_press_threshold_enable is 0.
[ 18.230000] sun4i-ts: rtp_sensitive_level is 15.
[ 18.230000] sun4i-ts: rtp_exchange_x_y_flag is 0.
[ 18.240000] sun4i-ts.c: sun4i_ts_probe: start…
[ 18.260000] input: sun4i-ts as /devices/platform/sun4i-ts/input/input4
[ 18.280000] sun4i-ts.c: sun4i_ts_probe: end
[ 18.260000] input: sun4i-ts as /devices/platform/sun4i-ts/input/input4
so in this case the event is 4
then you have to do some EXPORTs where you replace X with “4″ in this case:
$ export TSLIB_TSEVENTTYPE=raw
$ export TSLIB_CONSOLEDEVICE=none
$ export TSLIB_FBDEVICE=/dev/fb0
$ export TSLIB_TSDEVICE=/dev/input/eventX
$ export TSLIB_CALIBFILE=/etc/pointercal
$ export TSLIB_CONFFILE=/path/to/ts.conf
$ export TSLIB_PLUGINDIR=/path/to/lib/ts
note you should write your correct path which depend on what OS you are running and what –prefix you used to compile them
if you did everything correctly you can check with
$ ts_test
or
$ ts_calibrate
if everything is OK
2. ENABLE TOUCHSCREEN FOR X
$ wget http://ftp.de.debian.org/debian/pool/main/x/xf86-input-tslib/xf86-input-tslib_0.0.6.orig.tar.gz
$ tar zxfv xf86-input-tslib_0.0.6.orig.tar.gz
$ cd xf86-input-tslib-0.0.6/
$ patch -p1 < ../1-xf86tslib-sigfault.patch
$ patch -p1 < ../xf86-input-tslib-port-ABI-12-r48.patch
$ ./configure –prefix=/your/x11/lib/dir/
$ make
$ make install
add this in the X- configuration:
Section “InputDevice”
Identifier “Sun4iTouchscreen”
Option “Device” “/dev/input/eventX”
Driver “tslib”
Option “ScreenNumber” “0″
Option “Rotate” “NONE”
Option “Width” “800″
Option “Height” “480″
Option “SendCoreEvents” “yes”
EndSection
and like in point 1 /dev/input/eventX replace X with “4″
then pray and start X
if you did everything correctly X should start with Touchscreen support like show on these videos:

If you are using the debian image, you will probably have to install a bunch of packages before you are able to compile this. The important packages: apt-get install xorg-dev xserver-xorg-dev x11proto-core-dev
Best news this side of Xmas! Off to try it now and will report back either way…
If it works I will create a working SD image so others can jump-start their projects. Watch this space.
Hi David, it gives me a segfault on my debian image. But I have a feeling this has to do with my 3.0.42+ kernel. I’m going to try to re-build the 3.0.52 kernel and then try again with that.
Other than that, notice that where it says Section “InputDevice” on this page, I believe it should be “InputClass” instead.
Good luck and I’ll be waiting for your progress. I plan to include such instructions on my own blog here: http://www.skaag.net/2012/12/20/lessons-learned-about-olinuxino-a13/
OK so I got it all working. It works really well, and I’ve documented more of the process on my blog post (but i’m not yet done with that, I’ll probably finish it all this evening). If you need help with it, let me know while it’s still all fresh in my memory
Do you known if the A13-LCD7TS 7″ LCD is working with QT 4.5 on the debian image?
The forum thread “QT 4.8.3 on A13″ is the place to go for an update on this. It is looking promising.
Thanks
hi, i have a 7″ tablet with an a10, i’ve followed all of the steps here to get it working with lubuntu 12.04 and got the touchscreen working with ts_calibrate and ts_test, also got the touchscreen (sun4-ts) detected in xorg, but i can’t make it work. I don’t know how i can debug to know what is failing, everything seems to be ok.
Thanks for the tutorial!
hello
for
“patch -p1 < ../1-xf86tslib-sigfault.patch" and "patch -p1 < ../xf86-input-tslib-port-ABI-12-r48.patch"
i get
"Reversed (or previously applied) patch detected! Assume -R? [n]"
and
" Apply anyway? [n]"
what should I do?
The same as to Aqua-Passion also happened to me. Why is this happening?
When I do step 3.
$ patch -p1 < ../tslib.patch
I get
**** Only garbage was found in the patch input.
how can I fix that :/
which image are you guys using to enable lcd-ts.
i want to start my lcd ts with a13 wifi board , so i have basic 2gb debian with xfce4 in my sd card.
but to do the above changes i need to have wifi connection ,
but i am not able to connect wifi connection.
i tried many things but no progress.
please suggest me what should i do.
please use the official Olimex image in the wiki, which is tested to work
I have been trying to get this to work reliably since January and still don’t have a working version.
Like a lot of users I am ok with Linux on fully loaded PC’s but embedded kernels on lightweight platforms are a lot more tricky.
I am sure there is a demand for a touch screen enabled version of Debian on the A13 else why would we buy it? Cannot someone in Olimex sort this out once and for all and give us a fully-sorted A13-touchscreen downloadable Debian image?
Right now I would happily pay for such a download so I can get on the rest of my development schedule.
Hello,
I have been trying to install touch screen. Ts_test and ts_calibrate worked ok, but I can’t make it work into X system. I tried different distribution of linux (debian, ubuntu and linaro) including official Olimex image. The results are null. Can somebody help me with a touch screen full-functional linux image file ?