Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Location of TSLIB(libts.so) and QT PLUGIN(libqtslibplugin.so)

    Mobile and Embedded
    3
    25
    7145
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sidii last edited by

      Hi All,
      I have generated the library from tslib source.
      After that i included it in the QT configure command by giving -tslib switch.

      Now my question is where i need to place the libts.so and QT plugin: libqtslibplugin.so
      so that they can be called?

      I created a simple QT program containing Main Window with QPushButton. When i deploy it to my embedded system then nothing happens when i press the QPushbotton.

      Even this qDebug statement is also not getting called:

      @QTsLibMouseHandler::QTsLibMouseHandler(const QString &key,
      const QString &specification)
      : m_notify(0), m_x(0), m_y(0), m_pressed(0), m_rawMode(false)
      {
      qDebug() << "QTsLibMouseHandler" << key << specification;
      @

      The above code is located in qtbase/src/plugins/generic/tslib/qtslib.cpp

      So where should i place the TSLIB library and libqtslibplugin.so so that it can be used by my simple QUI application.

      Kindly help

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        IIRC, libqtslibplugin.so should be in /path/to/your/target/Qt/plugins/generic/ and tslib.so itself must be in a known path like /usr/local/lib/

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • S
          Sidii last edited by

          Dear SGaist,

          Thanks a lot for reply, i was desperately looking for the answer. I tried but it didn't work. I am now telling my setup, then you tell me where i am wrong:

          My Simple Button Application is kept inside:
          /home/Sid

          LinuxFB plugin is inside:
          @/home/Sid/platforms/libqlinuxfb.so@

          QT's plugin for touch support is inside:
          @/home/Sid/plugins/generic/libqtslibplugin.so@

          QT plugins and libts.so [that i built from source code] are inside:
          @/home/Sid@

          And /home/Sid is added to LD_LIBRARY_PATH so i am able to see the application with a single button. But when i press, i can't see any change in button state like getting pressed. It remains as it is. Also qDebug statement
          @qDebug() << "QTsLibMouseHandler" << key << specification;@
          is also not getting called.

          Other environment settings that i am doing is also given below:

          @
          export QT_QPA_PLATFORM=linuxfb
          export QT_PLUGIN_PATH=/home/Sid/plugins/generic
          export QT_QPA_GENERIC_PLUGINS=tslib
          export QT_QPA_FONTDIR=/home/Sid/fonts
          export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/Sid
          export TSLIB_FBDEVICE=/dev/fb0
          @

          Kindly tell me what i am missing.

          Thanks

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Did you configure tslib on your target ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • S
              Sidii last edited by

              yes i generated both QT libraries and TSLIB libraries for target: power pc.
              Also when i do

              @ file libts.so@

              I get following:

              @libts.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped
              @

              so both QT libraries and TSLIB are in same format.

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                I mean, properly setup TSLIB, initialized it ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • S
                  Sidii last edited by

                  I checked that TSLIB has some inbuilt tools that also got generated while compiling the src code, like ts_test, ts_calibrate.

                  i am not getting what you mean by "initialized it", do you mean to test the functionality using these tools or there is some another way of initializing it. Kindly explain how to proceed.

                  I also found that there is touch screen connected to the embedded board but there is no input folder/node inside the device folder.

                  Generally all the touchscreen/input related devices are listed inside:
                  @/dev/input/something_here@

                  But there is no input node in my system.
                  Is there any other way to interact with the LCD touch screen?

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    Not knowing anything about your LCD screen, I can't tell how it should show up or whether it's connected correctly on your system.

                    The tslib tools are there to help you set the various environment variable needed by the library to work properly

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sidii last edited by

                      Dear SGaist, thanks for your reply. It seems it is a serial device. Is it possible to get the x,y coordinates from the screen and then map it to the QT Screen so that i can know what button is clicked? I have done serial programming in QT for GPS devices, but i have no idea of mapping to the Framebuffer to know what widget is getting touch.

                      Just give me some pointers so that i can think in that direction.
                      Thanks :)

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Didn't you succeed configuring tslib ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply Reply Quote 0
                        • S
                          Sidii last edited by

                          no because there is no dedicated driver, it is a serial device :(

                          1 Reply Last reply Reply Quote 0
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            How does the system see it ? /dev/ttyS0 or something like that ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply Reply Quote 0
                            • S
                              Sidii last edited by

                              yes you are correct, also i found that when i do
                              @cat ttyS1@

                              then some junk characters are printed on putty terminal whenever i touch the lcd.
                              But i am not able to see x,y coordinates. I think some baud rate mismatch is there.

                              1 Reply Last reply Reply Quote 0
                              • SGaist
                                SGaist Lifetime Qt Champion last edited by

                                hexdump will give you a cleaner output.

                                Well, AFAIK, setting TSLIB_TSDEVICE to /dev/ttyS1 should get you started, no ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Sidii last edited by

                                  I tried setting the same:

                                  @
                                  export QT_QPA_PLATFORM=linuxfb
                                  export QT_PLUGIN_PATH=/home/Sid/plugins/generic
                                  export QT_QPA_GENERIC_PLUGINS=tslib
                                  export QT_QPA_FONTDIR=/home/Sid/fonts
                                  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/Sid
                                  export TSLIB_FBDEVICE=/dev/fb0
                                  export TSLIB_TSDEVICE=/dev/ttyS1 -------->>SEE THIS
                                  export TSLIB_PLUGINDIR=/home/Sid/tslib_plugins
                                  export TSLIB_CONFFILE=/home/Sid/ts.conf

                                  @

                                  But when i run ./ts_test, i get no output :(
                                  The program keeps running without any output unit i give Ctrl+C

                                  1 Reply Last reply Reply Quote 0
                                  • SGaist
                                    SGaist Lifetime Qt Champion last edited by

                                    Did you run ts_calibrate first ?

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      Sidii last edited by

                                      Yes, no output from ts_calibrate also..

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Sidii last edited by

                                        and if i do

                                        @./ts_print@

                                        i get following output:

                                        selected device is not a touchscreen I understand

                                        1 Reply Last reply Reply Quote 0
                                        • SGaist
                                          SGaist Lifetime Qt Champion last edited by

                                          Which module are you using ?

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            Sidii last edited by

                                            Sorry i did not get you. Module??

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post