bpk1981in
Posts: 15
Joined: Mon Sep 14, 2015 1:38 pm

Rpi with waveshare35a LCD Qt Touch Issue

Thu Mar 30, 2017 3:00 am

Hi,

I am using raspberry pi 3 with waveshare 3.5 LCD. I have to run my qml app (Qt Quick2) on touch screen. I can run my qml on hdmi with no issues. I have used the LCD-show drivers from http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A) and was able to switch from hdmi to LCD. Touch and everything else is working well on LCD. I can navigate to start menu, open some apps and can do all other stuff with touch. But still the qml app runs only on hdmi, but can't get into LCD. After searching, I have identified that to get qml on LCD, I need to do hdmi mirroring and by following the instructions from https://github.com/AndrewFromMelbourne/raspi2fb I was able to do the mirroring. Now after doing some settings in /boot/config.txt, I can get the qt/qml app running on full screen. All is well so far. But I am facing a typical issue. The qt app screen is transparent. The moment I try to touch on qt app screen, qt app screen goes into background (only the portion I have touched disappears) and the icons available on desktop are coming into foreground. I have attached the screen shots of the same. As you can see here, even the qt app is running, I was able to see the time bar, network connectivity symbols, Show button, help button etc., on the back end which are present on desktop. The moment I touch some where on qt app, that portion of qt screen is becoming invisible and I was able to see the Rpi desktop image. I have been struggling to identify the problem. But no solution till now.

I am doing the following export statements before running the qt/qml app

Code: Select all

export QT_QPA_PLATFROM=eglfs
export QT_QPA_FB_TSLIB=1
export QT_QPA_EGLFS_TSLIB=1
export QT_QPA_EVDEV_TOUCHSCREEN=/dev/input/event0:rotate=90
export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0:rotate=90
export TSLIB_EBDEVICE=/dev/fb1
export TSLIB_TSDEVICE=/dev/input/event0
Please let me know what additional settings I need to make

Regards,
Pavan
Attachments
20170329_165926_opt.jpg
20170329_165926_opt.jpg (28.04 KiB) Viewed 2964 times
20170329_165912_opt.jpg
20170329_165912_opt.jpg (26.94 KiB) Viewed 2964 times

bpk1981in
Posts: 15
Joined: Mon Sep 14, 2015 1:38 pm

Re: Rpi with waveshare35a LCD Qt Touch Issue

Fri Mar 31, 2017 3:15 pm

I got my issue resolved partially. I need to use LCD-hdmi mode and add the following into /boot/config.txt

Code: Select all

hdmi_force_hotplug=1
hdmi_cvt=480 320 60
hdmi_group=2
hdmi_mode=87
dtoverlay=waveshare35a
This made to show my qt app full screen with out any icons visible in background. But now touch does n't work. If touch at one position on the screen, it is getting reflected at another position in the screen. Can someone please let me know what additional configuration I need to do?

Regards,
Pavan

bpk1981in
Posts: 15
Joined: Mon Sep 14, 2015 1:38 pm

Re: Rpi with waveshare35a LCD Qt Touch Issue

Sun Apr 02, 2017 11:48 am

My touch is rotated exactly 90 degrees. I have tried to use lcd_rotate=1., but it did n't worked. Please let me know how can I get the touch back to 90 degress

Regards,
Pavan

bpk1981in
Posts: 15
Joined: Mon Sep 14, 2015 1:38 pm

Re: Rpi with waveshare35a LCD Qt Touch Issue

Mon Apr 03, 2017 5:31 pm

I have an update...

As already informed, I am using hdmi mode and added the settings mentioned in my previous mode. Now I am using raspi2fb to mirror the hdmi display to lcd. Now I can see the hdmi display on my LCD absolutely fine and touch is also working properly. But when I run my qml application, touch is getting shifted to exactly 90 degrees. Its a strange problem. With out QML app running, touch is working absolutely fine. But when QML app is launched, in the app, touch is shifted to 90 degress. If I stop the QML app, again touch is working normally.

I hope some one had a similar issue where hdmi mirroring is done using "raspi2fb" and QML (Qt Quick2) is being run and touch is having issue. Please help me out. Below is the content of my /boot/config.txt

Code: Select all

start_x=1
gpu_mem=128
core_freq=250
sdram_freq=400
over_voltage=0
dtparam=spi=on
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
dtoverlay=waveshare35a
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
hdmi_force_hotplug=1
hdmi_cvt=480 320 60
hdmi_group=2
hdmi_mode=87

bpk1981in
Posts: 15
Joined: Mon Sep 14, 2015 1:38 pm

Re: Rpi with waveshare35a LCD Qt Touch Issue

Tue Apr 04, 2017 4:40 am

I have cross compiled qt for Raspberry Pi by following instructions from https://wiki.qt.io/RaspberryPi2EGLFS
Only thing I have changed instead of using

Code: Select all

git clone git://code.qt.io/qt/qtbase.git -b 5.6
I have used

Code: Select all

git clone git://code.qt.io/qt/qtbase.git -b 5.7
because my Qt Quick2 needs Qt5.7 or higher. If it is the problem with Qt compilation that touch is getting shifted 90 degrees, please let me know the correct procedure for cross compiling Qt

Regards,
Pavan

bpk1981in
Posts: 15
Joined: Mon Sep 14, 2015 1:38 pm

Re: Rpi with waveshare35a LCD Qt Touch Issue

Tue Apr 04, 2017 5:07 pm

Guys,

I have tried to compile qt 5.8 by following instructions from http://www.tal.org/building_qt_5_for_raspberrypi_jessie. Still the issue is the same. I am really stuck at this particular touch issue. I know there are experienced people around who can guide me to get out of this issue. Please help me out.

Thanks in advance

rohinmalhotra
Posts: 1
Joined: Sun Apr 30, 2017 11:23 am

Re: Rpi with waveshare35a LCD Qt Touch Issue

Sun Apr 30, 2017 11:28 am

Hey! @bpk1981in

I am facing the same issue...Did you get around to solve your problem?

Return to “Troubleshooting”