LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-13-2012, 10:39 AM   #1
phil_999
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Touchscreen works but tslib does not recognize it


I have cross-compiled the latest commit of tslib from github ( https://github.com/kergoth/tslib/commits/master ). My touchscreen is hooked up to my embedded board and I enabled the drivers from the vendor. When I boot and look at the output of 'cat /dev/input/touchscreen' I can see plenty of output being generated from moving my fingers around the screen. The Kernel also outputs to the console nicely formatted messages for 'finger1' and 'finger2'.

I am not able to calibrate however. When I set my environment variables like shown below and run ts_calibrate, it spits out the message 'xres = 640, yres = 480 tslib: Selected device is not a touchscreen (must support ABS and KEY event types)' and does nothing more...

So Linux knows that my device exists and I can see scrolling output, but tslib can't calibrate. What am I doing wrong and how can I fix this?

# ls -rlt /dev/input/touchscreen
lrwxrwxrwx 1 root root 6 Jan 17 21:06 /dev/input/touchscreen -> event1
# chmod 777 /dev/input/touchscreen
# chmod 777 /dev/input/event1

# cat /dev/input/touchscreen | hexdump
0000000 9011 3883 565f 0001 0003 0030 0001 0000
0000010 9011 3883 565f 0001 0003 0032 0001 0000
0000020 9011 3883 565f 0001 0003 0035 04c9 0000
0000030 9011 3883 565f 0001 0003 0036 0c3f 0000
0000040 9011 3883 565f 0001 0000 0002 0000 0000
0000050 9011 3883 565f 0001 0000 0000 0000 0000
0000060 9011 3883 90a9 0001 0003 0030 0001 0000
0000070 9011 3883 90a9 0001 0003 0032 0001 0000

# cat /sys/devices/virtual/input/input1/uevent
PRODUCT=0/0/0/0
NAME="aura-touchscreen"
PROP=0
EV=9
ABS=650000 0
MODALIAS=input:b0000v0000p0000e0000-e0,3,kra30,32,35,36,mlsfw

# cat /etc/ts.conf
# Uncomment if you wish to use the linux input layer event interface
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear

export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_TSDEVICE=/dev/input/touchscreen
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
export TSTS_INFO_FILE=/sys/devices/virtual/input/input1/uevent
export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen
export PATH=$PATH:/usr/bin
ts_calibrate
xres = 640, yres = 480
tslib: Selected device is not a touchscreen (must support ABS and KEY event types)
 
Old 08-14-2012, 09:45 AM   #2
phil_999
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
I added the following lines to the driver so that ts_calibrate (tslib calibration utility) did not complain about the device not being a touchscreen.



set_bit(EV_KEY, aura.input_dev->evbit);
set_bit(ABS_X, aura.input_dev->absbit);
set_bit(ABS_Y, aura.input_dev->absbit);
set_bit(BTN_TOUCH, aura.input_dev->keybit);



I can now run the ts_calibrate utility and the screen displays a cursor and some text ‘Touch Cursor to Calibrate’. I can see the cursor but cannot seem to get it to accept my finger or a stylus as input right on top of it.



# ts_calibrate
xres = 640, yres = 480



I can also run the ts_test utility and touch the screen which causes tslib to print some events. It certainly acknowledges the touch events but the X and Y values are always 0, and the pressure value seems to be locked at the max value.

# ts_test


948233490.075589: 0 0 255
948233490.075589: 0 0 255
948233490.089995: 0 0 255
948233490.089995: 0 0 255



Any thoughts on why I am getting no real data here?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Touchscreen works in Fedora and OpenSUSE, but not Ubuntu, please help! marcusjb Linux - Hardware 11 04-30-2012 07:14 PM
Dual head setup with one touchscreen stretching over non-touchscreen display gutaker Linux - Hardware 0 03-13-2012 04:06 PM
Touchscreen Drivers - Toughbook CF-19 w/Red Hat 5.3 (Fujitsu USB Touchscreen) bsheridan Linux - Laptop and Netbook 0 11-17-2009 10:54 AM
Touchscreen works in Debian Lenny....kind of redk3y Linux - Hardware 0 03-28-2009 09:51 PM
TouchScreen Monitor works on Slackware longnam Linux - Hardware 1 03-20-2006 12:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration