Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Helping in calibrating etp-4500ug for working in RPI3
QtWS25 Last Chance

Helping in calibrating etp-4500ug for working in RPI3

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
13 Posts 3 Posters 3.5k Views
  • 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.
  • T Offline
    T Offline
    tictactoe
    wrote on last edited by
    #1

    Hi
    I write a program with QT5.7 and cross compile to RPI3 . I use eglfs .
    I'm using an eGalax touchscreen(etp-4500ug) , trying to get it to work with Raspberry Pi and Qt5. it sounds like it needs to work with tslib. Touch is working but it is mirrored.
    I've been able to get tslib to work with this display using a tarball and two patches from:
    http://repository.timesys.com/buildsources/t/tslib/tslib-1.0/
    I have set the following environment variables:
    TSLIB_CALIBFILE="/etc/pointercal"
    TSLIB_CONFFILE="/etc/ts.conf"
    TSLIB_CONSOLEDEVICE="/dev/tty"
    TSLIB_FBDEVICE="/dev/fb0"
    TSLIB_TSDEVICE="/dev/input/event0"

    When I run ts_calibrate I get the "Segmentation fault" error.

    By regards

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      As silly as it may sound, run ts_calibrate through a debugger to see what's going wrong.

      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
      0
      • T Offline
        T Offline
        tictactoe
        wrote on last edited by
        #3

        Hi and Thanks you for reply
        I connect to raspberry through ssh and run ts_calibrate and get the "Segmentation fault" message .
        Recently I use below variable for TSLIB

         export LD_LIBRARY_PATH=/usr/local/qt5pi/lib
         export PATH=/usr/local/qt5pi/bin:$PATH
        # hides mouse cursor
         export QT_QPA_EGLFS_HIDECURSOR=1
         # enables tslib plugin for touch screen
         export QT_QPA_GENERIC_PLUGINS=Tslib
         # disables evdev mouse input (to avoid getting duplicated input from tslib AND evdev)
         export QT_QPA_EGLFS_DISABLE_INPUT=1
         
         export TSLIB_FBDEVICE=/dev/fb0
         export TSLIB_CONSOLEDEVICE=none
         export TSLIB_TSDEVICE=/dev/input/by-id/`ls /dev/input/by-id/ | grep "eGalax"`
         export TSLIB_CONFFILE=/etc/ts.conf
         export TSLIB_CALIBFILE=/etc/pointercal
         export TSLIB_PLUGINDIR=/usr/lib/arm-linux-gnueabihf/ts0
        

        But with the same error "Segmentation fault" ...

        Regards,
        tictactoe

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Like I wrote before, run it through the debugger. You can install gdb on your Pi.

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

          T 1 Reply Last reply
          0
          • T Offline
            T Offline
            tictactoe
            wrote on last edited by
            #5

            I install QT5.7 on ubuntu on vmware and cross compile it to the Pi and I can debug my program through it. Do you mean this?

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tictactoe
              wrote on last edited by
              #6

              I got what you say . But is a new project for me :-)
              I want to solve this problem easier than this.

              jsulmJ 1 Reply Last reply
              0
              • T tictactoe

                I got what you say . But is a new project for me :-)
                I want to solve this problem easier than this.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @tictactoe If you really do not want to use a debugger (this is actually something a programmer should learn) you can add qDebug() << "..." to your code at the places where you think the problem occurs. This can help to find out where the crash happens. But it isn't really easier than just using a debugger, which isn't rocket science.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tictactoe
                  wrote on last edited by
                  #8

                  I dont have any problem during on the running of my program . The only problem is the swapping the axes of X,Y of the touch controller.
                  I want to solve it

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tictactoe
                    wrote on last edited by tictactoe
                    #9

                    finally I cant run ts_calibrate and save calibration point in the /etc/pointercal .
                    The below list is the last updated of environment variable for tslib and eglfs

                    export QT_QPA_PLATFORM=eglfs
                    export QT_QPA_EGLFS_TSLIB=1
                    export QT_QPA_FB_DISABLE_INPUT=1
                    export QT_QPA_EGLFS_TOUCHSCREEN_PARAMETERS=/dev/input/event0:invertx=1
                    export TSLIB_FBDEVICE=/dev/fb0
                    export TSLIB_CONSOLEDEVICE=/dev/tty
                    export TSLIB_TSDEVICE=/dev/input/by-id/ls /dev/input/by-id/ | grep "eGalax"
                    export TSLIB_CONFFILE=/etc/ts.conf
                    export TSLIB_CALIBFILE=/etc/pointercal
                    export TSLIB_PLUGINDIR=/usr/local/lib/ts

                    I dont know about the "QT_QPA_GENERIC_PLUGINS" variable.
                    I have a problem of inverting the X axis in my QT program that run on RPI3 yet
                    how can I solve this?

                    Regards,
                    tictactoe

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Like I wrote before, run it through the debugger. You can install gdb on your Pi.

                      T Offline
                      T Offline
                      tictactoe
                      wrote on last edited by tictactoe
                      #10

                      @SGaist
                      Hi
                      I want to install gdb on RPI as you said before.
                      I want to use the below link for installing gdb on rpi and ubuntu. Is it correct ?

                      link text

                      Regards

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        Does look good yes

                        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
                        1
                        • T Offline
                          T Offline
                          tictactoe
                          wrote on last edited by
                          #12

                          I dont know how to debug my qt program with gdb. Can you give me link for this?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            It's the same as any other program. Note that you can remote debug from Qt Creator. It's explained in the Launching the Debugger chapter of Qt Creator's documentation.

                            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
                            1

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved