Results 1 to 2 of 2

Thread: Touchscreen and Driver Installed but tslib Cannot Calibrate

  1. #1
    Join Date
    Jul 2012
    Posts
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Touchscreen and Driver Installed but tslib Cannot Calibrate

    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?

    Qt Code:
    1. # ls -rlt /dev/input/touchscreen
    2. lrwxrwxrwx 1 root root 6 Jan 17 21:06 /dev/input/touchscreen -> event1
    3. # chmod 777 /dev/input/touchscreen
    4. # chmod 777 /dev/input/event1
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. # cat /dev/input/touchscreen | hexdump
    2. 0000000 9011 3883 565f 0001 0003 0030 0001 0000
    3. 0000010 9011 3883 565f 0001 0003 0032 0001 0000
    4. 0000020 9011 3883 565f 0001 0003 0035 04c9 0000
    5. 0000030 9011 3883 565f 0001 0003 0036 0c3f 0000
    6. 0000040 9011 3883 565f 0001 0000 0002 0000 0000
    7. 0000050 9011 3883 565f 0001 0000 0000 0000 0000
    8. 0000060 9011 3883 90a9 0001 0003 0030 0001 0000
    9. 0000070 9011 3883 90a9 0001 0003 0032 0001 0000
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. # cat /sys/devices/virtual/input/input1/uevent
    2. PRODUCT=0/0/0/0
    3. NAME="aura-touchscreen"
    4. PROP=0
    5. EV=9
    6. ABS=650000 0
    7. MODALIAS=input:b0000v0000p0000e0000-e0,3,kra30,32,35,36,mlsfw
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. # cat /etc/ts.conf
    2. # Uncomment if you wish to use the linux input layer event interface
    3. module_raw input
    4. module pthres pmin=1
    5. module variance delta=30
    6. module dejitter delta=100
    7. module linear
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. export TSLIB_TSEVENTTYPE=INPUT
    2. export TSLIB_TSDEVICE=/dev/input/touchscreen
    3. export TSLIB_CALIBFILE=/etc/pointercal
    4. export TSLIB_CONFFILE=/etc/ts.conf
    5. export TSLIB_PLUGINDIR=/usr/lib/ts
    6. export TSLIB_FBDEVICE=/dev/fb0
    7. export TSLIB_CONSOLEDEVICE=none
    8. export TSTS_INFO_FILE=/sys/devices/virtual/input/input1/uevent
    9. export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen
    10. export PATH=$PATH:/usr/bin
    11. ts_calibrate
    12. xres = 640, yres = 480
    13. tslib: Selected device is not a touchscreen (must support ABS and KEY event types)
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jul 2012
    Posts
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Touchscreen and Driver Installed but tslib Cannot Calibrate

    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?

Similar Threads

  1. touchscreen tslib kernel event debugging qt application
    By sean_h in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 14th September 2012, 08:30
  2. Calibrate a MouseMan touchscreen on Qt4 Embedded
    By RazZziel in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 2nd March 2012, 01:08
  3. qt tslib touchscreen y-axis reversed
    By gosk in forum Qt Programming
    Replies: 2
    Last Post: 6th September 2011, 17:19
  4. How to Calibrate Touchscreen
    By yagabey in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 16th March 2010, 14:07
  5. QTEmbedded tslib -> tsharc touchscreen
    By Honta in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 11th February 2009, 06:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.