EGalax touchscreen and Qt5
-
Hello,
I'm using an eGalax touchscreen, trying to get it to work with Raspberry Pi and Qt5. I've got it working with X11, but that doesn't help with eglfs; it sounds like it needs to work with tslib.
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 downloaded the tarball, applied the tslib-1.0-svn_updates-r50-r78.patch and tslib-1.0-egalax.patch patches, and built it.
(loosely following directions from http://handychen.blogspot.com/2011/03/try-egalaxy-usb-touch-for-tslib.html).
After screwing with some shared library paths and setting TSLIB_TSDEVICE=/dev/input/event1, I've been able to get the screen working with ts_calibrate and ts_test, but still not with Qt. Here's the output:
@$ qmlscene dragselection.qml
evdevtouch: Using device /dev/input/event1
min X: 0 max X: 0
min Y: 0 max Y: 0
min pressure: 0 max pressure: 0
device name: eGalax Inc. Touch
Protocol type A@Based on "this thread":http://qt-project.org/forums/viewthread/21126, I think I need to use the evdevmouse or tslib plugins rather than evdevtouch. However, I've tried this:
@$ qmlscene dragselection.qml -plugin Tslib:/dev/input/event1@
and
@$ qmlscene dragselection.qml -plugin EvdevMouse@
and the output is no different; it still appears to be using evdevtouch. Is there any way I can disable the evdevtouch plugin so my tslib or evdevmouse arguments might work?
-
Hi,
Have you tried just removing libqevdevtouchplugin.so from /your-QT5-install-path/plugins/generic ? -
Looks like the issue was that the Qt tslib plugin wasn't compiled. plugins/generic/libqtslibplugin.so was missing.
I fixed this by cross-compiling the plugin on the host against the tslib that I compiled on the pi, and copying the resulting plugins/generic/libqtslibplugin.so back to the pi.
The source for the plugin is in qtbase/src/plugins/generic/tslib.
-
I have exactly the same problem. I have finally got tslib compiled according to your explanation, but could you please provide more information about how you have compiled the libqtslibplugin? Or maybe even provide the final result in binary format?
And how do you have solved the shared libraries problem?
Greetings,
Florian -
[quote author="koalo" date="1374181845"]I have exactly the same problem. I have finally got tslib compiled according to your explanation, but could you please provide more information about how you have compiled the libqtslibplugin? Or maybe even provide the final result in binary format?
And how do you have solved the shared libraries problem?
Greetings,
Florian
[/quote]Hi koalo,
You can compile it by just giving make inside plugins/generic/tslib folder.
After that libqtslibplugin.so gets generated inside plugins/generic folder -
Hi sid,
When i a modified the qmake.conf file what u post i got the follwoing error/home/tal/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/include/c++/4.7.2/arm-linux-gnueabihf/bits/os_defines.h:40:22: fatal error: features.h: No such file or directory
compilation terminated.
make: *** [.obj/qtslib.o] Error 1 -
Hi Tannyveer,
Lets start from the beginning, First we need to build TSLIB. i will tell you whatever i did. Let me know wheter you are done with these steps or not.
For TSLIB:
@
export ac_cv_func_malloc_0_nonnull=yes
export CC=powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc
export CXX=powerpc-wrs-linux-gnu-ppc_603e-glibc_std-g++
@If you get a problem about an undefined reference to rpl_malloc, you
probably need to do:
@$ export ac_cv_func_malloc_0_nonnull=yes@
CC and CXX is your compiler. (In my case it is cross compilation so i gave the power pc tool chain compiler)After that:
@
./autogen.sh
./configure --host=powerpc-603e-linux --target=powerpc --prefix=/usr/local
make
make install
@
You need to modify --host and --target as per your system. --prefix is the path where the final library will be generated.If all OK, you will get following summary:
@
./configure --host=powerpc-603e-linux --target=powerpc --prefix=/usr/local
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for powerpc-603e-linux-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether powerpc-wrs-linux-gnu-ppc_603e-glibc_std-g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of powerpc-wrs-linux-gnu-ppc_603e-glibc_std-g++... gcc3
checking for powerpc-603e-linux-gcc... powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc
checking whether we are using the GNU C compiler... yes
checking whether powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc accepts -g... yes
checking for powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc option to accept ISO C89... none needed
checking dependency style of powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc... gcc3
checking how to run the C preprocessor... powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc -E
checking whether the C compiler supports -fvisibility=hidden... yes
checking whether to use -fvisibility=hidden... yes
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking build system type... i686-pc-linux-gnu
checking host system type... powerpc-603e-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by powerpc-wrs-linux-gnu-ppc_603e-glibc_std-gcc... /opt/WindRiver40/wrlinux-4/layers/wrll-toolchain-4.4a-323/powerpc/toolchain/x86-linux2/powerpc-wrs-linux-gnu/bin/ld
checking if the linker (/opt/WindRiver40/wrlinux-4/layers/wrll-toolchain-4.4a-323/powerpc/toolchain/x86-linux2/powerpc-wrs-linux-gnu/bin/ld) is GNU ld... yes
#Removed lots of stuffs here due to 6000 characters limit
checking for vprintf... yes
checking for _doprnt... no
checking for bzero... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for munmap... yes
checking for select... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strtoul... yes
checking whether linear modules is requested... yes
checking whether dejitter module is requested... yes
checking whether linear-h2200 module is requested... yes
checking whether variance module is requested... yes
checking whether pthres module is requested... yes
checking whether ucb1x00 module is requested... yes
checking whether corgi module is requested... yes
checking whether collie module is requested... yes
checking whether h3600 module is requested... yes
checking whether mk712 module is requested... yes
checking whether arctic2 module is requested... yes
checking whether input module is requested... yes
checking where to place modules... ${libdir}/ts/
checking whether to enable debugging... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating etc/Makefile
config.status: creating plugins/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating tslib-0.0.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root@ebx-all:/usr/local/QT_littlee/qt-everywhere-opensource-src-5.2.1/qtbase/bin/tslib-1.0 #
@Let me know if you are done with this. Then we will proceed with the intagration of TSLIB with the QT5
-
Hi Sid
Thanks for ur above post i succesfully compile the tslib plugin.
but my problem cannot be solved :
Still touchscreen cannot be respond my Qt application.I am using Raspberry Pi board:
Qt5 Installed:
Raspbian Os
egalax touch screen also installed
tslib i.e libqtslibplugin.so in my qtinstalled path
I also removed libqevtouchplugin.so in the generic path -
hi sid
i compiled tslib on my host system then copy the liqtslibplugin.so in my target raspberri pi system i.e in Qt_installed/plugins/generic folder.
ts_test
ts-calibration commands
was not found in my taget system. -
Hello Tannyveer,
TSLIB is a separate from QT, you need to download the source code and then compile it. Download it from here:
http://sourceforge.net/projects/tslib.berlios/ -
Hi Tannyveer,
If you have already compiled tslib library for RPI then there must be some tools generated along with the compilation. Check "tests" folder. If those tools like ts_test, ts_calibrate works fine then that means your tslib is working fine.If you compiled TSLIB in host system then transfer the required tools to RPI and then try running them.
Thanks
-
Ok then copy these libraries into your RPI and then add the path to environment variable LD_LIBRARY_PATH.
If you generated the tslib in your host pc, then they get generated inside /usr/local.
Copy these .so files to your RPI and add the path to LD_LIBRARY_PATH.
let me know what happens next.
-
Have you set the following environment variables:
@
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/ttyS1
export TSLIB_PLUGINDIR=/home/Sid/tslib_plugins
export TSLIB_CONFFILE=/home/Sid/ts.conf
@also try running ts_calibrate. Do you get same error?
Also some more tools are present like ts_print, ts_print_raw.
Try running them as well..