Touchscreen Test Apps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Touchscreen Test Apps

15,666 Views
Subodh_K
Contributor I

Hi all,

I am working on a project which is based on imx6Q-sabresd board.And my platform is  linux system and SDK is yocto 1.6 daisy branch in my project.

In that i have integrated my LCD and Touchscreen . LCD is connected  on parallel port(RGB24) and Touchscreen is based on I2C.  So please any one give me idea how can i validate my touchscreen .

0 Kudos
16 Replies

5,153 Views
OtavioSalvador
Senior Contributor II

Bear on mind that tslib does not support multitouch so you need to be careful to not have it enabled.

0 Kudos

5,153 Views
Subodh_K
Contributor I

Hi all,

I am compiling Qt 4.8.6 package  for ARM from Toolchain (arm-poky-linux-gnueabi-) . I have made changes in configuration file qmake.conf as per my need

# qmake configuration for building with arm-poky-linux-gnueabi-g++

include(../../common/linux.conf)

include(../../common/gcc-base-unix.conf)

include(../../common/g++-unix.conf)

include(../../common/qws.conf)

# modifications to g++.conf

QMAKE_CC                  = arm-poky-linux-gnueabi-gcc

QMAKE_CXX                = arm-poky-linux-gnueabi-g++

QMAKE_LINK                = arm-poky-linux-gnueabi-g++

QMAKE_LINK_SHLIB     = arm-poky-linux-gnueabi-g++

# modifications to linux.conf

QMAKE_AR                  = arm-poky-linux-gnueabi-ar cqs

QMAKE_OBJCOPY       = arm-poky-linux-gnueabi-objcopy

QMAKE_STRIP             = arm-poky-linux-gnueabi-strip

QMAKE_LFLAGS             = -lts

QMAKE_INCDIR             = /home/subodh/tslib_arm2/include/

QMAKE_LIBDIR              = /home/subodh/tslib_arm2/lib/

QMAKE_CFLAGS_RELEASE      =   -O2 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

QMAKE_CXXFLAGS_RELEASE  =   -O2 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

load(qt_config)

And for configuring  I am using the command as:

./configure -embedded arm -xplatform qws/linux-arm-g++ \

-qt-mouse-tslib -qt-gfx-linuxfb \

-little-endian -prefix-install -depths 16,18,24 -optimized-qmake


for Build :

make

sudo make install


During configuration i am getting  issue like

The tslib functionality test failed!

You might need to modify the include and library search paths by editing

QMAKE_INCDIR and QMAKE_LIBDIR in

/home/subodh/qt-everywhere-opensource-src-4.8.6/mkspecs/qws/linux-arm-g++.

Please any one help me to debug the issue.



0 Kudos

5,153 Views
OtavioSalvador
Senior Contributor II

We have Qt5 and Qt4 working just fine in Dizzy; did you try it?         

0 Kudos

5,152 Views
igorpadykov
NXP Employee
NXP Employee

Hi john

at boot one can check that touchscreen device getting

registered under "/proc/bus/input/devices and

see touch events on "/dev/input/event1

For testing one can use utility ts_test (tslib package)

Some useful links below

http://boundarydevices.com/configuring-i-mx6-machines-different-screens-nitrogen6x-sabre-lite/

https://community.freescale.com/thread/317408

Best regards

igor

0 Kudos

5,152 Views
Subodh_K
Contributor I

Hi igor,

Thank you for your rely.

1) In cat /proc/bus/input/devices

i got this output:

I: Bus=0018 Vendor=0000 Product=0000 Version=0001

N: Name="LeadingUI-LU3010-Touch"

P: Phys=LeadingUI-Touch/input1

S: Sysfs=/devices/virtual/input/input0

U: Uniq=

H: Handlers=kbd event0 evbug evbug

B: PROP=2

B: EV=b

B: KEY=40000800 40 0 0 0

B: ABS=6618000 0

2) Im my case it is event0:

so when i do  cat /dev/input/event0 does not  give any output but after running cat command once i touch the touch pannel i get some garbage value on display.

3) In Tslib i am not getting ts_test utility so could you tell me the steps of it?

The issue is my cursor is not moving  with movement on touch panel .can u tell how to debug it ?

0 Kudos

5,153 Views
igorpadykov
NXP Employee
NXP Employee

Hi john

I think below may help

Lindus Embedded / Adding touch support in Yocto

poky - Poky Build Tool and Metadata

Actually for validation I would suggest to use ltib

L3.0.35_4.1.0_ER_SOURCE_BSP :

~igor

0 Kudos

5,152 Views
Subodh_K
Contributor I

Hi igor,

we can't switch to ltib because we are using Yocto 1.6 daisy as our SDK and almost we are done with all interfaces only getting issue in Touchscreen interface.

some where i got that we need to port the binary of getevent . But it did not solve my issue.

0 Kudos

5,153 Views
igorpadykov
NXP Employee
NXP Employee

Hi john

what LCD and particular ts controller is used? If is is standard,

it should work with configurations given in first replies. If this is non-standard,

then better validate it with LTIB/SKD, until you are yocto guru.

Best regards

igor

0 Kudos

5,153 Views
Subodh_K
Contributor I

Hi igor,

My LCD is Bonafide-1403A  and  Touchscreen controller is LU3060 and it is capacitive touchscreen.

In my case export TSLIB_TSDEVICE=/dev/event0

event0 is in location /dev/input/event0 and i exported all configuartion as you mentioned in reply but still i am getting same logs what i had earlier after

running the command ts_calibrate .

0 Kudos

5,153 Views
Subodh_K
Contributor I

Hi igor ,

Finally i got some output  using ts_calibrate and ts_test command .

These are the outputs:

a) ts_calibrate command

root@velu_wmsd:/home# ts_calibrate

xres = 480, yres = 272

tslib: Selected device is not a touchscreen (must support ABS_X and ABS_Y events)

Took 8 samples...

Top left : X = 11218800 Y = -152612066

Took 8 samples...

Top right : X = 11218800 Y = -152612066

Took 8 samples...

Bot right : X = 11218800 Y = -152612066

Took 8 samples...

Bot left : X = 11218800 Y = -152612066

Took 8 samples...

Center : X = 11218800 Y = -152612066

-2.047228 0.078922 0.005800

-4.697957 -0.079506 -0.005846

Calibration constants: -134167 5172 380 -307885 -5210 -383 65536

b) These are the outputs of ts_test

root@velu_wmsd:/home# ts_test

tslib: Selected device is not a touchscreen (must support ABS_X and ABS_Y events)

In this i am getting  a options of Drag ,Draw and Quit

But i am not able to select any options from it .I have a multi-touch supports in driver.

Please reply me soon to debug the issue.

0 Kudos

5,153 Views
igorpadykov
NXP Employee
NXP Employee

Hi john

I never heard about Bonafide-1403A  and  Touchscreen controller LU3060,

also could not find its datasheets. I believe you should perform

some debugging adding printfs to tslib sources and find reason for these

errors.

~igor

0 Kudos

5,153 Views
YanjunLuo
Contributor IV

tslib is a very good tool for touch panel test, it includes all tools you need, but need some config. For some simple test, you can try evtest, or you can simple enable the event debug on kernel config.

0 Kudos

5,152 Views
Subodh_K
Contributor I

Hi Yanjun,

Thank you for your reply.

when  i run the command  evetest

root@velu_wmsd:/bin# evtest /dev/input/event0

I got the following output :

Input driver version is 1.0.1

Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x1

Input device name: "LeadingUI-LU3010-Touch"

Supported events:

  Event type 0 (Sync)

  Event type 1 (Key)

    Event code 102 (Home)

    Event code 139 (Menu)

    Event code 158 (Back)

  Event type 3 (Absolute)

    Event code 47 (?)

      Value      0

      Min        0

      Max        9

    Event code 48 (?)

      Value      0

      Min        0

      Max       10

    Event code 53 (?)

      Value      0

      Min        0

      Max      720

    Event code 54 (?)

      Value      0

      Min        0

      Max     1280

    Event code 57 (?)

      Value      0

      Min        0

      Max    65535

    Event code 58 (?)

      Value      0

      Min        0

      Max      100

Testing ... (interrupt to exit)

After this when i Touch the Touch panel  i get following logs on console but cursor is still fixed not moving.

Event: time [SOCI2C]leadingui_touch_write -->

1413829042.071761, type 3 (Absolu[SOCI2C]I2C_Set_Done -->(0)

te), code 48 (?), value 19

Event[SOCI2C]leadingui_touch_read ++>

: time 1413829042.071761, type 3 [SOCI2C]leadingui_touch_read -->

(Absolute), code 58 (?), value 23[SOCI2C]leadingui_touch_read ++>

9

Event: time 1413829042.071761,[SOCI2C]leadingui_touch_read -->

-------------- Report Sync -----[SOCI2C]I2C_Set_Done ++>

-------

Event: time 1413829042.1[SOCI2C]leadingui_touch_write ++>

17699, type 3 (Absolute), code 58[SOCI2C]leadingui_touch_write -->

(?), value 233

Event: time 1413[SOCI2C]I2C_Set_Done -->(0)

829042.117699, -------------- Rep[SOCI2C]leadingui_touch_read ++>

ort Sync ------------

Event: tim[SOCI2C]leadingui_touch_read -->

e 1413829042.163471, type 3 (Abso[SOCI2C]leadingui_touch_read ++>

lute), code 48 (?), value 13

Eve[SOCI2C]leadingui_touch_read -->

nt: time 1413829042.163471, type [SOCI2C]I2C_Set_Done ++>

3 (Absolute), code 58 (?), value [SOCI2C]leadingui_touch_write ++>

136

Event: time 1413829042.16347[SOCI2C]leadingui_touch_write -->

1, -------------- Report Sync ---[SOCI2C]I2C_Set_Done -->(0)

---------

[SOCI2C]leadingui_touch_read ++>

Event: time 1413829042.209179, ty[SOCI2C]leadingui_touch_read -->

pe 3 (Absolute), code 57 (?), val[SOCI2C]I2C_Set_Done ++>

ue -1

Event: time 1413829042.209[SOCI2C]leadingui_touch_write ++>

179, -------------- Report Sync -[SOCI2C]leadingui_touch_write -->

0 Kudos

5,153 Views
YanjunLuo
Contributor IV

Your touch panel driver output something. But to work with GUI, you need more job, at least calibration. Which GUI are you using? I think you'd better stop the GUI, try to start the tslib and it supports the calibration. If the tslib works fine, you need check your GUI, it maybe need some config, like the touch panel device name, etc.

0 Kudos

5,153 Views
Subodh_K
Contributor I

Hi Yanjun,

I have compiled and port it to the board but when i run the command i getting some strange output.

root@velu_wmsd:/# ts_print

When i run the utility i get following errors :

Couldnt load module input

No raw modules loaded.

ts_config: Success

I checked config file too here is my config file contents:

a) vi /etc/ts.conf

# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface

# module_raw ucb1x00                                       

                                                                    

# Uncomment if you're using an HP iPaq h3600 or similar             

# module_raw h3600                                                  

                                                                    

# Uncomment if you're using a Hitachi Webpad                        

# module_raw mk712                                                  

                                                                    

# Uncomment if you're using an IBM Arctic II     

# module_raw arctic2                             

                                                 

#module pthres pmin=1                 

#module variance delta=30             

#module dejitter delta=100            

#module linear                        

                                      

module_raw input                      

module pthres pmin=1

module variance delta=30

module dejitter delta=100

module linear

b) vi /etc/profile

I have exported environment variable:

export TSLIB_TSDEVICE=/dev/input/event0                

export TSLIB_CALIBFILE=/etc/pointercal

export TSLIB_CONFFILE=/etc/ts.conf

export TSLIB_PLUGINDIR=/usr/lib/ts

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_CONSOLEDEVICE=none

Could you  please help me soon  to fix the issue?

0 Kudos

5,153 Views
YanjunLuo
Contributor IV

You need export something like below.

export V_ROOT=/root/tslib

export TSLIB_CONSOLEDEVICE=none

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_TSDEVICE=/dev/event0

export TSLIB_CALIBFILE=$V_ROOT/etc/pointercal

export TSLIB_CONFFILE=$V_ROOT/etc/ts.conf

export TSLIB_PLUGINDIR=$V_ROOT/share/ts/plugins

export QWS_MOUSE_PROTO=TPanel:/dev/event1

export LD_LIBRARY_PATH=$V_ROOT/lib

Then try to run ts_calibration, after calibration you should try ts_test, then you can drage the cursor or draw some lines.

0 Kudos