Yocto / i.Mx.6: How to support touch on touchscreen monitor

cancel
Showing results for 
Search instead for 
Did you mean: 

Yocto / i.Mx.6: How to support touch on touchscreen monitor

3,907 Views
krishnab
Contributor II

I am working on Nitrogen6x board that runs on Yocto 2.1 with Qt 5.6.2 support. I have developed a Qt application that shall support the input options like USB Keyboard, Mouse and Touchscreen and shall support a Full HD resolution display.

I have connected a touchscreen monitor which supports Full HD resolution to the Nitrogen board using HDMI to VGA converter cable, and my application was working fine with the correct resolution and supports plug and play keyboard and mouse connections.

BUT, the touch response on the touchscreen monitor was not received by the Qt Framework and hence the touch interface was not working for me as expected.

When I plug the mouse am seeing the below information on my nitrogen board console:

~ # usb 1-1.1: new low-speed USB device number 8 using ci_hdrcinput: HID 413c:3010 as /devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1/1-1.1:1.0/0003:413C:3010.0006/input/input3 hid-generic 0003:413C:3010.0006: input: USB HID v1.00 Mouse [HID 413c:3010] on usb-ci_hdrc.1-1.1/input0

But, When I plug the touchscreen monitor am only seeing this:

~ # usb 1-1.1: new full-speed USB device number 7 using ci_hdrc

I was expecting that the touch screen interface will get automatically detected and will be passed as a input plugin to the Qt application.

I have run make menuconfig and have enabled USB Touch screen rebuilt the kernel. But, still am noticing the below error messages while the kernel is booting:

Galcore version 5.0.11.41671egalax_ts 2-0004: Failed to read firmware version egalax_ts: probe of 2-0004 failed with error -5ft5x06-ts 2-0038: reset fffffffe ft5x06-ts 2-0038: Could not detect touch screen -19.

Am some how missing to configure the right kernel options to detect the touchscreen. any help on this is appreciable. Thanks in advance.

7 Replies

989 Views
mstevens
Contributor II

I ran into the issue a number of months ago.  I did not bookmark the write up I followed (sorry).  I know that if you do not have all 3 of the options enabled it does not work.  It took me a while to get all of them. 

Below are snippets of my .config

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_EVBUG=m

CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_OF_TOUCHSCREEN=y

CONFIG_TOUCHSCREEN_USB_COMPOSITE=m

CONFIG_TOUCHSCREEN_EGALAX=m

CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y

#
# HID support
#
CONFIG_HID=y
CONFIG_HID_BATTERY_STRENGTH=y
CONFIG_HIDRAW=y
CONFIG_UHID=y
CONFIG_HID_GENERIC=y

CONFIG_HID_MULTITOUCH=m

#
# USB HID support
#
CONFIG_USB_HID=y
# CONFIG_HID_PID is not set
# CONFIG_USB_HIDDEV is not set

# CONFIG_I2C_HID is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set

Make sure you have the multitouch driver enabled in your kernel.   I built mine as a module. 

root@cgtimx6:/etc/X11/Xinit.d# lsmod
Module Size Used by
hid_multitouch 9247 0

....

Second make sure that the devices are recognized. 

root@cgtimx6:/etc/X11/Xinit.d# lsusb
Bus 002 Device 004: ID 0eef:b100 D-WAV Scientific Co., Ltd
Bus 002 Device 003: ID 0eef:b100 D-WAV Scientific Co., Ltd

Third check to see if the devices are created

root@cgtimx6:/etc/X11/Xinit.d# ls /dev/input/ -l
drwxr-xr-x 2 root root 60 Jan 1 00:00 by-id
drwxr-xr-x 2 root root 100 Jan 1 00:00 by-path
crw-rw---- 1 root input 13, 64 Jan 1 00:00 event0
crw-rw---- 1 root input 13, 65 Jan 1 00:00 event1
crw-rw---- 1 root input 13, 66 Jan 1 00:00 event2
crw-rw---- 1 root input 13, 63 Jan 1 00:00 mice
crw-rw---- 1 root input 13, 32 Jan 1 00:00 mouse0
crw-rw---- 1 root input 13, 33 Jan 1 00:00 mouse1
lrwxrwxrwx 1 root root 6 Jan 1 00:00 touchscreen0 -> event2

Check in your syslog to make sure that the devices are being recognized. Once you get the recognized, X just worked for me.   I run my QT app under X.  

I hope it helps.  If you want, I can provide you my .config   I don't promise it will work for you.

--Michael

989 Views
krishnab
Contributor II

Hi Micheal,

Thanks for your comprehensive reply.

After I posted this question, I have selected the below option:

Device Drivers -> HID Devices -> Special HID drivers -> HID Multitouch panels as an embedded driver (*) in my Kernel configuration, and then I have added my touchscreen's Vendor ID and Device/Product ID to my kernel drivers table and rebuilt the Kernel. My touchscreen is working as expected now.

After I read your post I have compared my .config file contents with the content you shared and I noticed some differences in the sections below:

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
CONFIG_INPUT_POLLDEV=y
# CONFIG_INPUT_SPARSEKMAP is not set
# CONFIG_INPUT_MATRIXKMAP is not set

#
# HID support
#
CONFIG_HID=y
# CONFIG_HID_BATTERY_STRENGTH is not set
# CONFIG_HIDRAW is not set
# CONFIG_UHID is not set
CONFIG_HID_GENERIC=y

#
# USB HID support
#
CONFIG_USB_HID=y
# CONFIG_HID_PID is not set
# CONFIG_USB_HIDDEV is not set

And my lsmod output does not show hid_multitouch module - because I built it as an embedded driver (not as a module).

0 Kudos

989 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi krishnab

please check boundary devices link for lcd and touchscreen configuration

http://boundarydevices.com/configuring-i-mx6-machines-different-screens-nitrogen6x-sabre-lite/ 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

989 Views
krishnab
Contributor II

Hi igor,

Thanks for your reply.

My Nitrogen 6x board is running the Yocto 2.1 (which has latest Kernel version 4.15), and I followed the procedure from the link: Krogoth-next Yocto Release - Boundary Devices 

I built the U-Boot on Yocto Platform by following the instructions from the link U-Boot on i.MX6 - Boundary Devices 

My Nitrogen board runs a Qt application which is driving a Full HD Monitor Dell S2440T with the resolution of 1920x1080 and am able to see my application come up with the correct resolution.

But the touch inputs from the monitor was not being recognized by the Qt application. Looks like am not passing right information to the Kernel to identify the Monitor as a touch screen input device so that my Qt application can detect the touch inputs.

0 Kudos

989 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi krishnab

one can check Qt wiki

Qt for Embedded Linux | Qt 5.8 

Best regards
igor

0 Kudos

989 Views
krishnab
Contributor II

Hi igor,

Initially I too suspected it could be some thing that I need to configure at Qt end. But I verified that even the default Yocto User Interface is unable to detect the monitor as touch screen. Looks like it is to be set at the Kernel configuration. The monitor make I was using has  IntelliTouch® Surface Acoustic Wave SAW Touch Screen touch panel. And I have selected the drivers that are related to Elo and USB Touchscreen in the yocto make menuconfig but still it is of no use.

0 Kudos

989 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi krishnab

for yocto BD has below wiki

touch screen - Boundary Devices 

Best regards
igor

0 Kudos