the touch of my app in mini2440 not work

hani
Hi,
I have mini2440 with these info:
=========================================================
[root@FriendlyARM /]# uname -a
Linux FriendlyARM 2.6.32.2-FriendlyARM #1 Tue Sep 21 18:09:15 HKT 2010
armv4tl unknown.
=========================================================
[root@FriendlyARM bin]# printenv
TSLIB_TSDEVICE=/dev/input/event0
USER=root
LD_LIBRARY_PATH=/usr/local/tslib/lib
TSLIB_TSEVENTTYPE=input
OLDPWD=/
HOME=/
TSLIB_FBDEVICE=/dev/fb0
PS1=[\u@\h \W]\# 
TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
TSLIB_CONSOLEDEVICE=none
LOGNAME=root
TERM=vt102
PATH=/sbin:/usr/sbin:/bin:/usr/bin
TSLIB_CONFFILE=/usr/local/etc/ts.conf
SHELL=/bin/sh
PWD=/usr/local/bin
QWS_MOUSE_PROTO=tslib:/dev/input/event0
TSLIB_CALIBFILE=/etc/pointercal

=========================================================
-> vi /etc/profile : 

export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_TSEVENTTYPE=INPUT
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
export LD_LIBRARY_PATH=/usr/local/tslib/lib

=========================================================
the ts_calibrate worked well
the demo is worked well
but my app just show and the touch not worked.at first i said maybe my app
has problem , so i copy the example of Qt4.6.3
(/opt/qt-everywhere-opensource-src-4.6.3/examples/widgets/calculator) on
the mini2440 board. as the same as my app just show the program and the
touch is disable.
where is the problem.

Note: I comment qtopia and i wrote cat /dev/input/event0 and my touch is
worked . but when the app is open touch does not work :( WHYYYYYY o.O

davef
First go to /dev/input and type
   
   cat event0

then touch the screen.

What do you see displayed on the screen?

Also, tells as all the entries in /dev/input as it looks like you are not
actually export(ing) the touchscreen only the mouse.

Does your keyboard work?

hani
hi and thanks for reply
[root@FriendlyARM /udisk]# cd /dev/input/
[root@FriendlyARM input]# ls  
event0  mice
===============================================
[root@FriendlyARM input]# cat event0
7�G7H�7!H7��7&am
p;#65533;��7��7.�

after each touch show me characters like these
===============================================
i don't know how to use keyboard. if you say the keyboard on bottom of my
lcd? no it does not show any keyboard to me.
i change this to:
export QWS_MOUSE_PROTO="tslib:/dev/input/event0
IntelliMouse:/dev/input/mice"

but not worked.(but ts_calibrate worked)
where is my mistake :(

davef
Here is what I use:

MINI2440_TOUCHEVENT=/dev/input/touchscreen

# Qt relevant settings
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice
Tslib:${MINI2440_TOUCHEVENT}"

expands to:

export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice
Tslib:/dev/input/touchscreen

But you haven't got /dev/input/touchscreen

Do you know what type of touchscreen you have?  Number on the back and
whether is it 1-wire or the resistive type.

If 1-wire search <1-wire touchscreen> on this site.

davef
It has been years since I used 2.6.32.2 

I recall that the touchscreen did not show up as /dev/touchscreen, but as
something else.

Also, there were different kernel versions depending on which touchscreen
you used or has that changed?

hani
hi
i don't have any touchscreen in my dev directory
[root@FriendlyARM /dev]# ls
adc                 mixer               pcmC0D0c            tty15          
    tty32               tty5                ttySAC0
audio               mtd0                pcmC0D0p            tty16          
    tty33               tty50               ttySAC1
backlight           mtd0ro              ptmx                tty17          
    tty34               tty51               ttySAC2
buttons             mtd1                pts                 tty18          
    tty35               tty52               urandom
camera              mtd1ro              pwm                 tty19          
    tty36               tty53               vcs
console             mtd2                random              tty2           
    tty37               tty54               vcs1
controlC0           mtd2ro              root                tty20          
    tty38               tty55               vcs2
cpu_dma_latency     mtd3                rtc                 tty21          
    tty39               tty56               vcs3
device              mtd3ro              rtc0                tty22          
    tty4                tty57               vcs4
dsp                 mtd4                shm                 tty23          
    tty40               tty58               vcsa
fb0                 mtd4ro              timer               tty24          
    tty41               tty59               vcsa1
full                mtdblock0           tty                 tty25          
    tty42               tty6                vcsa2
i2c                 mtdblock1           tty0                tty26          
    tty43               tty60               vcsa3
input               mtdblock2           tty1                tty27          
    tty44               tty61               vcsa4
kmsg                mtdblock3           tty10               tty28          
    tty45               tty62               watchdog
leds                mtdblock4           tty11               tty29          
    tty46               tty63               zero
log                 network_latency     tty12               tty3           
    tty47               tty7
loop                network_throughput  tty13               tty30          
    tty48               tty8
mem                 null                tty14               tty31          
    tty49               tty9
===========================================================
help me plz. what can i do now? how to enable the touch in my program?
do you have an example for mini2440 with source code. maybe my Qt and
compiler have mistake.

davef
> Do you know what type of touchscreen you have?  Number on the back and
> whether is it 1-wire or the resistive type.

I am trying to help, how about answering my question?

The kernel has to know which touchscreen you are using.  The 2.6.32.2 that
I used years ago had different config files for the different touchscreens.

OK, I had a look here:
https://www.mediafire.com/folder/9cs8fenf225et//2440Board#4tssbkjb68p4m
and I see lots of images for the various touchscreens.  Which one are you
using?

hani
Hi and especial thanks davef for help. I have tiny 6410 too. i test all of
them in 6410 and the touch is work in my application. ( the same way in
mini2440) i guess maybe my Linux is not correct. maybe my base problem is
my Linux on mini2440.
You asked me about touchscreen. I know my touch screen is in
/dev/input/event0 because when i changed it the ts_calibrate not worked. I
don't have 1-wire in my device. ( I don't see anything like this)my kernel
is 2.6.32 also. I guess maybe i should change the Linux and use another
image.because i can run the touch in 6410 very easily.
"and I see lots of images for the various touchscreens.  Which one are you
using?" i think i used zImage_x35. i don't know whats the different

really really thanks again

davef
You have to know which LCD you have connected to the mini2440.

There are different images for different sizes and manufacturers.

< Number on the back (of the LCD).

You must picked zImage_35 for a good reason.

Qt apps run on the mini2440, maybe not as quickly as on the mini6410, but
you should be able to get them to work.  I use the Qt /demo/browser app on
my mini2440.

There is a good site, Goggle <mini2440vietnam>

davef
edit:

You must have picked zImage_x35 for a good reason.

hani
thank you devef, i have a question: what is the difference between
zImage_N35 zImage_P35 zImage_T35 zImage_TD35 zImage_W35 zImage_X35 ?
i know my lcd is 3.5 inch. i searched in internet and find just these :
zImage_n35 - Support for NEC 3.5 "LCD in the kernel file
zImage_x35 - Support for SONY 3.5 "LCD in the kernel file
zImage_w35 - Support for 3.5 " landscape LCD in the kernel file
zImage_T35 - Support for TPO 3.5 "LCD in the kernel file
zImage_a70 - Support group Chong 7 "LCD in the kernel file
zImage_L80 - Support for Sharp 8 "LCD (or compatible model) of the kernel
file
zImage_vga1024x768 - Support VGA expansion module (resolution of 1024x768 @
70Hz) of the kernel file
but for the other version i cant find any thing.
and how do i know which LCD i have?

davef
The difference is totally due to the touchscreen on your particular
mini2440.

Unfortunately my mini2440s are in another location, however ... I would use
a nutdriver and carefully remove the nuts holding the LCD to the main
board.  I believe you then will be able to see a number on the backside. 
Maybe, the number is on the printed circuit board.

I would have thought any documentation would tell you which one you have.

> but for the other version i cant find any thing.

Do you know that there is another version?

I think there is a w35i (?) which is a 1-wire touchscreen. That is why I
mentioned it before.

I suppose another way to find out which you have is to try all the images
on it, until you get one that works.

Mine are n35 which was one of the earliest touchscreens that came with the
mini2440.

Post a picture of the backside of the LCD board.

hani
yes, you say exactly right, when i see the back of my LCD i see this" the
type of LCD is T35" . really thanks. i didn't see that. so i go to change
the Linux to zImage_T35 and say the result here.

davef
I asked you 3 days ago which touchscreen you had.  You need to carefully
read and understand if you are asked questions.

Is this a school project, work or a hobby?

hani
dont mock me. the Lcd is attached to board and when you say about this i
dont know the type of lcd is write on the back. this device is bought in
2010 and they give it to me in this year, it is my job and i am new in
embedded device. cause of this i am so confused in it. 
i changed the linux to zImage_T35 . but my project not worked.
[root@FriendlyARM /]# printenv
TSLIB_TSDEVICE=/dev/input/event0
USER=root
TSLIB_TSEVENTTYPE=INPUT
LD_LIBRARY_PATH=/usr/local/tslib
HOME=/
QTDIR=/usr/local/Qt
TSLIB_FBDEVICE=/dev/fb0
PS1=[\u@\h \W]\# 
TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
TSLIB_CONSOLEDEVICE=none
LOGNAME=root
TERM=vt102
PATH=/sbin:/usr/sbin:/bin:/usr/bin
TSLIB_CONFFILE=/usr/local/etc/ts.conf
SHELL=/bin/sh
QWS_DISPLAY=LinuxFB:mmWidth=105:mmHeight=140
PWD=/
TSLIB_CALIBFILE=/etc/pointercal
QWS_MOUSE_PROTO=Tslib:/dev/input/event0

[root@FriendlyARM /]# /udisk/prj3 -qws
/udisk/prj3: error while loading shared libraries: libts-1.0.so.0: cannot
open shared object file: No such file or directory

i used 
[root@FriendlyARM /]# ln -s /usr/local/Qt/lib/libts-1.0.so.0
/usr/local/lib/libts-1.0.so.0
 but not worked.

hani
edit> Do you know what type of touchscreen you have?  Number on the back
and whether is it 1-wire or the resistive type. 
yes you say it but i don't understand the meaning of back. i dont know the
number wrote on the back. SORRY

hani
it solved. but again my first problem occured. demo touch is worked. my
program touch is NOT WORKED. so the linux zImage_T35 does not SOLVED MY
PROBLEM and i have problem again :(

davef
I wasn't mocking you.  Just pointing out that when you don't answer
questions that people put to you that the process becomes even more
difficult to resolve.

I never expected you to just know the number was on the back that is why I
suggested you look.

Now that you possibly have a working image on the board are you saying that
you still don't see the directories or files that you were originally
looking for?

/udisk/prj3: error while loading shared libraries: libts-1.0.so.0: cannot
open shared object file: No such file or directory

This problem has been discussed several times over the last few months.

Now is when I ask ... which tutorial are you trying to follow?

hani
You say right and i said Really Sorry. that problem is solved. I said the
first problem is occurred again. 
this is my tutorial
:https://importgeek.wordpress.com/2012/04/09/compiling-qt-and-tslib-for-m...
this is look like mini2440vietnam. 
at first : i install Linux on mini2440 as mentioned in mini2440vietnam then
copy the tslib file to mini2440. the the base problem occured :
http://www.friendlyarm.net/forum/topic/6417#30311
i guess maybe i should test the other zImage. (i installed zImage_x35
before but not worked)

hani
suddenly happen strange ting to me, i installed Linux zImage_X35 and copy
the tslib. then run my project, i run with NO touch. then i run the demo
but not run and show me the error :./wigglyMain: error while loading shared
libraries: libts-0.0.so.0: cannot open shared object file: No such file or
directory.
the strange happening is why my program run and does not show this error
but the main demo show error? maybe my program does not use this library
and cause of these the touch does not work? (I know how to solve the
libts-0.0.so.0 problem. my main Question is why my program run without this
error?)

davef
If your touchscreen says T35 then you have to run zImage_T35.  

my main Question is why my program run without this
error?)

Programs have to be written so they are capable of "throwing error
messages".  Maybe "my program" is NOT written like "main demo".

Could you check that you can do a ts_calibrate before you trying to run any
Qt programs?

hani
I installed zImage_T35 but my problem does not solve. you say correct. 
"Maybe "my program" is NOT written like "main demo"". but i set compiler in
Qt like mini2440vietnam. and compile it.
the ts_calibrate is run. but my application does not have touch :( again

davef
"my program" could compile but still not "throw error messages".

Is there a program called ts_test on your mini2440?

I had a quick read of the tutorial you mentioned.  He seems to have had
many questions to answer.

Getting Qt programs to run on the mini2440 is NOT an easy task.  Here is a
link to another forum that got lots of traffic a few years ago.

http://billforums.station51.net/

I had lots of issues trying to get a Qt type web browser to work.  

I have been using the Pengutronix mini2440 BSP for the past 4-5 years with
success, running several demo Qt programs on it.

You said you are doing this for work.  Do they hope to develop applications
using Qt for this platform?

hani
Sorry for everything and Thanks for help.

"Is there a program called ts_test on your mini2440?"
there is no file naming ts_test in mini2440.

"I had a quick read of the tutorial you mentioned.  He seems to have had
many questions to answer."
i searched in my tutorial about my problem but there were not any good
answer to help me.

"Getting Qt programs to run on the mini2440 is NOT an easy task."
i do the same for tiny6410 and it worked. but in mini2440 not worked :( and
thanks for link. i saw that and searched in that. but can not find good
answer.

"You said you are doing this for work.  Do they hope to develop
applications using Qt for this platform?"
yes. cause of its cost is cheaper. it is so smaller for basic job in
industrial working.
--->Do you have a better suggestion? (a bout the another device like this)

davef
Here is one problem that we had with getting Qt to work, basically it is
getting the correct library path, as discussed here:

http://www.friendlyarm.net/forum/topic/4853

QMAKE_LFLAGS =
-Wl,-rpath-link=/home/orbit/OSELAS.BSP-Pengutronix-Mini2440-2012.12.0/platform-m
ini2440/sysroot-target/usr/lib

So, for you:

QMAKE_LFLAGS = -Wl,-rpath-link=/path/to/your/usr/lib

I am not suggesting that this is your problem.

hani
i used it and see the post like this in another site 
"QMAKE_LFLAGS = -Wl,-rpath-link=/path/to/your/usr/lib"

davef
The mini2440 hardware design and build quality are quite good.  I have only
had the power jack and SD card holder fail on me.

The mini2440 uses a processor that is now obsolete.  The mini2541 has a
more current processor but I don't much on-line support for it.

The mini2440 was popular 3-5 years ago and still seems to be used in
educational environments.

I won't make any suggestions here but if you want to discuss further I
would give you my email address.

davef
What other site?

hani
I forget the site, I will find it in my history. If I have your email, is
too good.

hani
Hi again. sorry i cant find that site explain a bout :"QMAKE_LFLAGS =
-Wl,-rpath-link=/path/to/your/usr/lib" . just i remember that site about
hacking to install tslib and Qt 4.6.3 on Ubuntu.and a bout mini2451. thanks
for suggestion. (If i find the answer, i put it here and thanks for your
support)

davef
Don't worry about it.  Interesting that you mention the mini2451.  If there
is a site giving some support for the mini2451 that would be interesting.

Email:
dave_festing at hotmail dot com

Tell me what you hope to design and what resources you have, that might
help me make better suggestions.

Abhishek Ekhare
Hi Hani,
I am facing EXACTLY the same "touchscreen not working issue" like you.
And, like you, i also have referred to the same link
(https://importgeek.wordpress.com/2012/04/09/compiling-qt-and-tslib-for-m...).

Did you get your touchscreen to work ??
If yes, please tell me how you got the touchscreen to work.

Thank you in advance.