Results 1 to 8 of 8

Thread: tslib

  1. #1
    Join Date
    Feb 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default tslib

    Hello All,

    I have a touch screen linux driver here which provide events through the /dev/input subsystem.The driver is installed at /lib/modules/2.6.21-ts/kernel/drivers/input/touchscreen location

    I want to use this driver via tslib libraries.
    As of now I have Qtopia4.3.5 installed on my host and its cross compiled .so file copied on the target.I can execute Qt applications on the board.I remenber configuring Qt with ts feature enabled.
    My question is how do I go about installing tslib.I have the tar file downloaded.Do I need to install it on both the PC and board given that I have cross platform development here?
    I would really appreciate any help on this.
    Last edited by raman_31181; 12th September 2008 at 13:46.
    thanks,
    raman

  2. #2
    Join Date
    Aug 2007
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: tslib

    You have to cross compile Tslib sources. When compiling Qt you have to add paths to tslib's includes and libraries. Then you have to copy on board libts.so to /lib location and modules' .so files to /usr/lib/ts (by default). You can also copy executables of test programs which can help you to calibrate your touchscreen.

  3. #3
    Join Date
    Feb 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: tslib

    Thanks for the reply....
    How do I add paths for cross compiled tslib while compiling qt.There is no option in configure script to do that.

    Secondly is there any way to know that Qt has compiled for tslib?Any installed files which can actually help me confirm that?
    Last edited by raman_31181; 17th September 2008 at 07:59.
    thanks,
    raman

  4. #4
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: tslib

    Hi.
    Right, it doesn't spell it out for you in the .configure options, however you have to add the path to where any external libraries are located with -I and -L. See my post here.. http://www.qtcentre.org/forum/f-qtop...qte-15805.html. I have posted my configuration.

  5. #5
    Join Date
    Feb 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: tslib

    Thanks for help!!

    I have compiled Qt for arm with tslib using the following config

    ./configure -embedded arm -qt-mouse-linuxtp -qt-mouse-tslib -L /tmp/tslib/build/lib -I /tmp/tslib/build/include

    Now I have queries:
    1) which files should I copy on to the board and to which location?

    2)How do I configure tslib to use my touch driver after that

    My driver is at /dev/input/event0 location of the board
    thanks,
    raman

  6. #6
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: tslib

    hello,
    The kernel should already be setup for your specific touchscreen, in the kernel configuration options. If not, you must enable the ts support under - drivers-input devices-touchscreen. (kernel configurations - make menuconfig). By the looks of it, you already have the driver installed.
    I would recommend you test the touchscreen first, before you even install qtopia. There are binaries that can be run to test the touchscreen, in the /bin directory of the tslib (ts_print,ts_calibrate,ts_test). Just run these binaries without qtopia. Once you know that your touchscreen is working, then you can install it with qtopia ( as you already did). Then test the touchscreen in qtopia using the /demos or /examples
    When you run a qtopia application ( check the demos directory). Some of the demos use the mouse. When starting the application the tslib.so is loaded (library file) - whatever tslib you configured qtopia with.
    You should not have to copy anymore files.

  7. #7
    Join Date
    Feb 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: tslib

    I tried the following on my board

    ts7000:/home/ramandeep# export TSLIB_TSDEVICE=/dev/input/event0
    ts7000:/home/ramandeep# export TSLIB_CONFFILE=/etc/ts.conf
    ts7000:/home/ramandeep# export TSLIB_PLUGINDIR=/usr/local/lib/ts
    ts7000:/home/ramandeep# ts_test
    Segmentation fault
    ts7000:/home/ramandeep#

    get error on running any of tslib binaries be it ts_calibrate or ts_test.any ideas?
    thanks,
    raman

  8. #8
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: tslib

    Here are a couple of ideas.

    1) Make sure the tslib was configured and compiled correctly. Using the -host option for the configuration, mine was -host arm-linux, whatever target you are compiling for.
    2) Maybe the driver for the touchscreen is not installed. Did you make sure the touchscreen is enabled in the kernel configuration? - drivers - input - touchscreen.

    That's all I know, hope it leads in you the right direction.

Similar Threads

  1. how to enable touch screen in qt/embedded
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 8
    Last Post: 25th March 2011, 10:44
  2. how to do touch screen calibration for qtopia-core-opensource-4.3.2
    By avrecorder in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 15th September 2008, 12:49
  3. Touch screen problem in Qtopia
    By geetha in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 12th September 2008, 07:33
  4. Touch screen on t-Embedded 4.4 on i.MX31ADS
    By HT in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 7th June 2008, 09:06
  5. regarding a touch screen driver for qt-embedded
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd March 2007, 10:23

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.