tslib , Qt 4.5 problem

anafor2004
Hello

I managed to get the ts_* utils working, as well as my compiled QT
libraries.I can calibrate touchscreen. It is sensing my touches at
calibration.But after calibration , I am starting some QT applications, but
It seems coordinates are inverted. When I drag it over X axis mouse is
moving at Y axis , When I drag it over Y axis mouse is moving at X axis.

and also when I export QWS_MOUSE_PROTO=tslib:/dev/input/ts 

Do you have any sugesstion?

fatbrain
HI 

download ts lib from here it is a newer version 1.1 . It worked for me. 
http://www.zelow.no/floppyfw/download/Development/src/

regards
--fatbrain

anafor2004
How did you compile it, Can you tell me some tips.

peter a
Hi had right problems getting 4.6.2 to compile , now I`m left with the axis
problem.

I`ve tried the version from
http://billforums.station51.net/viewtopic.php?f=8&t=15 and the above , but
still with the same problem.

Is there a fix now , or a`m I out of luck again , with a new problem to
spend a week fixing if possible ? 

Thanks in advance Peter

serra82
I have the same problem, any news?

thank you
Andrea

davef
fatbrian,

Just to clarify:

- you found that doing a git pull as suggested on Bill's forum did not get
a fully functional tslib?  git clone http://github.com/kergoth/tslib.git

Seems a number of people have problems getting this sorted, including me. 
Would it be possible for you to post the configure script and any other
little tricks to get it sorted?

Host linux distribution?
Toolchain?

Thanks,
Dave

peter a
Yes ..

These are my settings :-
It was export QWS_MOUSE_PROTO=tslib:/dev/input/event1 which was my problem.

It looks like :-

export TSLIB_TSDEVICE=/dev/input/event1
export QWS_MOUSE_PROTO=tslib:/dev/input/event1

are the same and you should one use one , but you do need them both to make
it work , eg no swapped axis .

export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export QWS_MOUSE_PROTO=tslib:/dev/input/event1
export QWS_DISPLAY=LinuxFB:mmWidth=232:mmHeight=142

davef
Peter a,

Thanks for the input, I am sure many people will appreciate it.

I'll be a week or two before I can try it out.

Cheers,
Dave

bluscape
I'm having the same problem, inverted touch screen.
I've compiled and installed tslib and Qt4.6.2 successfully.

At what stage should I introduce the above mentioned settings? Before I
compile tslib?

export TSLIB_TSDEVICE=/dev/input/event1
export QWS_MOUSE_PROTO=tslib:/dev/input/event1

Thank you

davef
after.

So, when you do <ts_calibrate> is the screen inverted?

There are threads on the forum, that I think resolved the issue.  Have you
searched for <inverted screen>?

bluscape
No, when I run ts_calibrate it seems fine, but when I run the Qt demos, the
coordinates are swapped and inverted.

davef
Had a look myself and didn't much helpful here.  Have you tried searching:
http://billforums.station51.net/
and
http://groups.google.com/group/mini2440

davef
See the only thing at billforums points you back to this thread!

Are you sure that event1 is the touchscreen?

An Angstrom-based rootfs I got from some else uses:

export TSLIB_TSDEVICE=/dev/input/touchscreen0
export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0

What happens if you do:
cat /dev/input/event1
and run your stylus over the screen?

bluscape
When I cat /dev/input/event1 I get a whole lot of funny characters on the
output (display)

Juergen Beisert
bluscape,

funny characters when you touch the screen or always?

bluscape
Only when I touch the screen

Juergen Beisert
Then your touch is working as expected.

Abhishek
I am trying to run application build on Qt creator on mini2440 board. I am
working on fedora 12 and my linux-arm-gcc version is 4.4.3.
I downloaded Qt-source-everywhere 4.6.3.
i successfully compiled tslib and moving on to the next step i made the
following changes in qmake.conf file as given. But i do not understand when
i am trying to configure it is giving the error the tslib functionality
failed. tslib files are saved in /home/tslib/include & ./lib.
Is it a version mismatch error or something else as i have wasted a lot of
days in this problem..
Someone plz help me i am reffering the following blogs which are quite good

http://mini2440vietnam.blogspot.com/2011/04/upgrade-qt462-in-mini2440.html

i do not know how to get pass this error. 
to make my host pc ready so that i can port applications on board.

davef
Do a search on <mini2440vietnam> there was quite a bit of traffic.  I made
a modified procedure, which I thought I posted.  If you don't find it get
back to me.  

I managed only to get it to work once or twice.  So, I gave up and just
use:

www.ptxdist.org/oselas/bsp/pengutronix/mini2440_bsp_en.html

tslib functionality failed will probably give you a million hits on Google,
the problem is finding the one that fixes your problem!

Have you checked the ts_calibrate is really an ARM binary?

Carlos Leyva Guerrero
I've solved this issue. I was managing the same problem than the rest,
invereted axis when running Qt examples. The solution? I made some changes
over the scripts in the net about compiling tslib. The problem is that when
you set CC CCX CFLAGS... with export like :

#export CROSS_COMPILE=arm-linux-
#export CC=${CROSS_COMPILE}gcc
#export CFLAGS=-march=armv4t
#export CXX=${CROSS_COMPILE}"g++" 
#export AR=${CROSS_COMPILE}"ar" 
#export AS=${CROSS_COMPILE}"as"
#export RANLIB=${CROSS_COMPILE}"ranlib"
#export LD=${CROSS_COMPILE}"ld"
#export STRIP=${CROSS_COMPILE}"strip"
#export ac_cv_func_malloc_0_nonnull=yes

and then call ./configure these settings are not saved!!!! you can check it
by trying to run the ts_calibrate file generated on your pc, it'll run
because it is not in arm format. To solve it you should include the options
above in the ./configure sentence:

/configure CC=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc
CXX=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++
AR=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-ar
AS=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-as RANLIB=/opt/F...

Now when you have the tslib correctly compiled (and Qt) the problem of axis
persits. The solution is to use the new (not the one already present in
your board) ts_calibrate to generate a new calibration file:
ts_calibrate /usr/local/etc/pointercal (in my case)
and then, vi /etc/profile and add:
export TSLIB_CALIBFILE=/usr/local/etc/pointercal

After a reboot, the problem is solved!

davef
I think you'll find that if you write a .sh script with those export
variables followed by your ./configure line it will work properly. 

Those export variables are only valid when the script runs.  I think, as
you have found, there is an issue when you manually type in these lines in
a terminal session.  I forget the details.

A script file saves time and reduces errors as I found it takes me several
goes to cross-compile something properly.

Juergen Beisert
Carlos Leyva Guerrero,
what did you do with the export hell? When I try it here, the "configure"
ends with:

[...]
checking whether we are cross compiling... configure: error: in
`/home/jb/tslib-1.0':
configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

And this message is corrent as it compiles for ARM, but tries to run the
result on the host. And it is also correct, because "configure" works in a
different way!

In your case this should do the right thing:

export PATH=$PATH:/opt/FriendlyARM/toolschain/4.4.3/bin
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--host=arm-linux-gcc --build=<your-build- host-triple>

(my build host triple for example is 'i686-host-linux-gnu')

After that, all your settings are stored in the generated Makefiles and you
simply can run "make" without any further environment variables defined
(exception is PATH which still must point to your cross compiler)

Daniel
Hi All! 

I managed to complie tslib and qt4.7.4 under Ubuntu 11.10 32bit with
arm-linux-gcc 4.3.2. 
Now I transfered the complied Qt/lib files and the demos and tslib to my
mini2440 board. I follow this tutorial:
http://mini2440vietnam.blogspot.com/2011/04/upgrade-qt462-in-mini2440.html 


But when I try to modify the rcS file I get this error in console on my
host pc: 

VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 108K

cannot run '/etc/init.d/rcS': Permission denied

Please press Enter to activate this console. 
can't open /dev/tty2: No such file or directory

can't open /dev/tty3: No such file or directory

can't open /dev/tty4: No such file or directory

can't open /dev/tty2: No such file or directory

can't open /dev/tty4: No such file or directory

can't open /dev/tty3: No such file or directory
......  etc 

I tried to do this command after the modification : chmod -x rcS    

but the result is the same... 

What do you think? Where did I mistake? 

Thank you!!!

Ajit
Hi Daniel..
To open rcS file you have to use vi editor or talnet session on mini2440
console..

I sed vi editor..
 for this follow the follwing steps..

cd etc/init.d
vi rcS

Then rcS will open..
Edit it as you want 

for vi editor commands refer following link
http://www.cs.colostate.edu/helpdocs/vi.html

Enjoy

smith
The above link is not working... 
Use this---
http://qtinstall.blogspot.in/