Calibrate Touchscreen.

1,678 views
Skip to first unread message

Thomas Alrek

unread,
Dec 28, 2009, 7:27:23 PM12/28/09
to Android-x86
Hello.
I must say, I am really impressed by the work done on this project so
far.
I'm currently running 1.6 on my EEE 701.

Everything works, but there is one issue.

I have installed an eGalaxTouch 7" Touch screen on this machine, and
your android port is detecting it, and is recieving input when I touch
the screen. But the X axis is inverted. When I ran Ubuntu on this
machine, I could just run the eGalaxTouch utility to calibrate the
touch screen, but for obvious reasons, that utility wont run on
Android.

As Android does not have any built in utility to calibrate the touch
screen, what could I do to resolve this?

Thank you

Yi Sun

unread,
Dec 28, 2009, 9:11:55 PM12/28/09
to andro...@googlegroups.com
There is a tslib. But without rebuild a new image and add the
configuration files for your device, the device will not work.
For detail, you can look at the read me from the tslib.
Yi
> --
>
> You received this message because you are subscribed to the Google Groups "Android-x86" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-x86...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.
>
>


--
Android-x86
www.android-x86.org

Thomas Alrek

unread,
Dec 30, 2009, 4:16:53 AM12/30/09
to Android-x86
So I would have to remaster the image with an custom configuration
file? Isnt it possible to just replace the configuration file for the
existing innstallation?
Where could I find the documentation for tslib?

Vitor Hugo Barros

unread,
Dec 30, 2009, 7:11:24 AM12/30/09
to Android-x86
Hi Thomas,

Here is the TSLIB readme:
http://git.android-x86.org/?p=platform/external/tslib.git;a=blob;f=README;h=d16c80cd08c5275bc9f45a6acd655dc2dd686f56;hb=HEAD

As you can see in the q1u build configuration (1), you have to put
both ts.conf (2) and ts.env (3) files in your build config so you can
"activate" the tslib with the right module loaded.

Naturally, you have to build the source aganist your own versions of
ts.conf and ts.env.

1. http://git.android-x86.org/?p=platform/vendor/samsung/q1u.git;a=tree
2. http://git.android-x86.org/?p=platform/vendor/samsung/q1u.git;a=blob;f=ts.conf;h=c8521686524b4bbe7fd3dc2909541c93f6726c7d;hb=HEAD
3. http://git.android-x86.org/?p=platform/vendor/samsung/q1u.git;a=blob;f=ts.env;h=a34969a04da6e0753f6e7d6b4da818276889266b;hb=HEAD

Hope this helps!

Vitor

Thomas Alrek

unread,
Dec 30, 2009, 7:51:42 AM12/30/09
to Android-x86
Thank you Vitor.
Will give it a try, even though my programming skills are limited.

Will just try to edit the config file (find a way to invert the X axis
that is), and recompile.

If I have understood this correctly, the ts.conf is compiled into
tslib at build time, and not loaded dynmically at boot?
Would have been great if it where loaded dynically though.

On 30 Des, 13:11, Vitor Hugo Barros <vitor.h.bar...@gmail.com> wrote:
> Hi Thomas,
>

> Here is the TSLIB readme:http://git.android-x86.org/?p=platform/external/tslib.git;a=blob;f=RE...


>
> As you can see in the q1u build configuration (1), you have to put
> both ts.conf (2) and ts.env (3) files in your build config so you can
> "activate" the tslib with the right module loaded.
>
> Naturally, you have to build the source aganist your own versions of
> ts.conf and ts.env.
>
> 1.http://git.android-x86.org/?p=platform/vendor/samsung/q1u.git;a=tree

> 2.http://git.android-x86.org/?p=platform/vendor/samsung/q1u.git;a=blob;...
> 3.http://git.android-x86.org/?p=platform/vendor/samsung/q1u.git;a=blob;...

Yi Sun

unread,
Dec 30, 2009, 11:51:09 AM12/30/09
to andro...@googlegroups.com, Android-x86
Well I think Bryan is working on something for this but not sure if he
is online to answer you question
Yi

Vitor Hugo Barros

unread,
Dec 30, 2009, 11:59:24 AM12/30/09
to Android-x86
I believe it is loaded dynamically.

The reason for having to deal with the ts.* files is to define what
kind of hardware (and its needed module and settings) are you building
your kernel aganist. Remember Android isn't a full featured Linux
distro, so it only has a small subset of the available modules.
Actually, it only has the ones needed for a particular hardware piece/
phone, in order to save resources.

In android-x86's case you have 2 kernel building configurations,
kindly pre-assembled by the project members, for two specific hardware
configurations:

- ASUS Eee PC (various models) (1)
- Samsung Q1U (2)

1. http://git.android-x86.org/?p=platform/vendor/asus/eeepc.git;a=blob;f=eeepc_info;h=cb089dfa2af7ac4a5147aa31a355b166076f955e;hb=HEAD
2. http://git.android-x86.org/?p=platform/vendor/samsung/q1u.git;a=blob;f=q1u_info;h=e01b31436324e43ef645e138d1afe937ec6e0132;hb=HEAD

As you have an Eee 701 I believe you only have to:

1. Sync your repo to get the updated source
2. Add "BOARD_USES_TSLIB=true" to eeepc_info file in the "700|701|702|
900)" case
3. Copy the ts.conf and ts.env from the Q1U buiding configuration - I
believe you don't have to edit the files because you touchscreen uses
the same driver as Q1U's
4. build the source

bryanhundven

unread,
Dec 30, 2009, 12:59:04 PM12/30/09
to Android-x86
I tried to reply to this on my t-mo g1, but the google gmail app ate
my reply :-$ (constantly saying its sending, but not doing anything).

Anyways... Vitor, you are mostly correct.

To get touchscreen working, I will *need* the communities support by
reading and replying to this thread:
http://groups.google.com/group/android-x86/browse_thread/thread/f83834c0ef8bc6e3/8adb14e4d20cade5?lnk=gst&q=touchscreen#8adb14e4d20cade5

The pointercal file is the only thing needed besides having the right
kernel module loaded to get touchscreen working. Right now for Q1U,
usbhid provides touchscreen driver. This WILL be different for other
devices. Some will use the usbtouchscreen driver, others will be
different. Still not sure how I will support wacom devices yet, as
they do not use tslib and all drivers for wacom are made for X11.

The pointercal file is generated by ts_calibrate, and read by
frameworks/base/services/java/com/android/server/InputDevice.java.

The pointercal file needs to be in /data/system/tslib, because you
cannot write to /system/etc .

My suggestion is for the community (this group) to stop opening new
threads about touchscreen and support for new devices/computers and
SEARCH for threads already open on these issues and reply to them.

We would like to see more devices supported in the vendor/<company>/
<model> directory, but to make sure that anything that is common goes
into the build/target/board/generic_x86/ area.

Next week I will start working on a program/script that will start up
before the home screen is displayed, that will try to detect your
touchscreen (if the correct modules are loaded). If the pointercal
file is not found in /data/system/tslib, then it will run ts_calibrate
for you.

Hopefully this whirlwind of information has been helpful, but for this
to work, I need YOUR SUPPORT by providing me with more information
about YOUR device!

Thank you.

--Bryan

Thomas Alrek

unread,
Dec 30, 2009, 1:32:53 PM12/30/09
to Android-x86
My device is natively supported in the latest stable build of Android
x86.
Its a eGalaxTouch 7", bought it through DealExtreme.


On 30 Des, 18:59, bryanhundven <bryanhund...@gmail.com> wrote:
> I tried to reply to this on my t-mo g1, but the google gmail app ate
> my reply :-$ (constantly saying its sending, but not doing anything).
>
> Anyways... Vitor, you are mostly correct.
>
> To get touchscreen working, I will *need* the communities support by

> reading and replying to this thread:http://groups.google.com/group/android-x86/browse_thread/thread/f8383...

Chih-Wei Huang

unread,
Jan 8, 2010, 6:37:23 AM1/8/10
to andro...@googlegroups.com
Hi Bryan,
Have you begun the work?
I've made some tests on my EeePC T91,
seems work (with a little modification to tslib).
If you are too busy to begin the work, I may do it this weekend.

2009/12/31 bryanhundven <bryanh...@gmail.com>:

Reinhard

unread,
Jan 18, 2010, 4:26:38 PM1/18/10
to Android-x86
I also have an eee701+eGalax 7" Touchscreen.

now it works correct. First android used inverted y-axis and uses only
a part of the screeen (on android)
my approach was this:

usbtouchscreen.ko is the kernel-module that works with a egalax-
controller.
lsusb:
Bus 004 Device 002: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax
TouchScreen
idVendor 0x0eef D-WAV Scientific Co., Ltd
idProduct 0x0001 eGalax TouchScreen
bcdDevice 1.00
iManufacturer 1 eGalax Inc.
iProduct 2 USB TouchController
iSerial 0

in vendor/asus/eeepc you have to edit the product-specific files and
add the module and the tslib-variable
vendor/asus/eeepc/eeepc_info
EXTMOD="psmouse eeepc-laptop usbtouchscreen"
BOARD_USES_TSLIB=true

make sure that your kernel.config uses it as a module.
I think it is the TOUCHSCREEN_USB_COMPOSITE value in eeepc_defconfig

tslib:
create/edit vendor/asus/eeepc/ts.env
TSLIB_CONSOLEDEVICE=none
TSLIB_FBDEVICE=/dev/graphics/fb0
TSLIB_TSDEVICE=/dev/input/event8
TSLIB_CALIBFILE=/data/system/tslib/pointercal
TSLIB_CONFFILE=/system/etc/ts.conf
TSLIB_PLUGINDIR=/lib/ts

the TSLIB_TSDEVICE may be diffrent in your configuration, but you can
identify it by using getevent and touching the screen.

create/edit vendor/asus/eeepc/ts.conf
module_raw input-raw
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear

make sure that vendor/asus/eeepc/AndroidBoard.mk contains
BOARD_USES_TSLIB := true
$(call add-prebuilt-targets,$(TARGET_OUT_DATA_ETC),ts.conf ts.env)

also make sure that your source is up to date. without the patch
http://git.android-x86.org/?p=platform/frameworks/base.git;a=commitdiff;h=c4cb130747f491ee58d4338b3a57d7d90fdbe277
android will not use the pointercal-file

make usb_img TARGET_PRODUCT=eeepc

and install it. do NOT run it live. you have to change files in /data

make sure that the directory /data/system/tslib/ exists otherwise
mkdir /data/system/tslib/

clear the screen and run ts_calibrate and do the calibration. you will
get /data/system/tslib/pointercal
28130 -114 -2104672 313 -21554 38190987 65536 800 4800480

i think you have to reboot, to force android to read the pointercal

i hope that i did not forget something...

beyounn

unread,
Jan 18, 2010, 4:43:55 PM1/18/10
to Android-x86
Could you try the latest 2.0 tree? It should work now.

> also make sure that your source is up to date. without the patchhttp://git.android-x86.org/?p=platform/frameworks/base.git;a=commitdi...

Reinhard

unread,
Jan 18, 2010, 7:06:18 PM1/18/10
to Android-x86
> Could you try the latest 2.0 tree? It should work now.
i checked out the x86/master-branch in vendor/asus/eeepc.
the eeepc_defconfig does not include the CONFIG_INPUT_TOUCHSCREEN=y
and CONFIG_TOUCHSCREEN_USB_COMPOSITE=y for usbtouchscreen-support.

is this the correct branch?

Yi Sun

unread,
Jan 18, 2010, 7:23:59 PM1/18/10
to andro...@googlegroups.com
Hmm... did not notice that. The INPUT_TOUCHSCREEN was set to y. But
USB was not. Maybe following need to be added.

CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_USB_EGALAX=y
CONFIG_TOUCHSCREEN_USB_PANJIT=y
CONFIG_TOUCHSCREEN_USB_3M=y
CONFIG_TOUCHSCREEN_USB_ITM=y
CONFIG_TOUCHSCREEN_USB_ETURBO=y
CONFIG_TOUCHSCREEN_USB_GUNZE=y
CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
CONFIG_TOUCHSCREEN_USB_GOTOP=y

Chih-Wei-- any comment on this? Should we add these by default or
leave them to the people to add them when they have special needs like
current case.

> --
> You received this message because you are subscribed to the Google Groups "Android-x86" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-x86...@googlegroups.com.

> For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.
>
>
>
>

--
Android-x86
http://www.android-x86.org

Reinhard

unread,
Jan 20, 2010, 5:53:57 PM1/20/10
to Android-x86
maybe configure all as modules?
in this case everyone can configure the product (e.g. vendor/asus/
eeepc/) which one to use.

CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_USB_EGALAX=m
CONFIG_TOUCHSCREEN_USB_PANJIT=m
CONFIG_TOUCHSCREEN_USB_3M=m
CONFIG_TOUCHSCREEN_USB_ITM=m
CONFIG_TOUCHSCREEN_USB_ETURBO=m
CONFIG_TOUCHSCREEN_USB_GUNZE=m
CONFIG_TOUCHSCREEN_USB_DMC_TSC10=m
CONFIG_TOUCHSCREEN_USB_IRTOUCH=m
CONFIG_TOUCHSCREEN_USB_IDEALTEK=m
CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=m
CONFIG_TOUCHSCREEN_USB_GOTOP=m

Reply all
Reply to author
Forward
0 new messages