Difference between revisions of "How to use 15 inch touchscreens"

Line 3: Line 3:
 
This guide is tested with the LCD-15.6TS (with ETT5003U controller), distributed by Olimex LTD. The setup included LCD-OLinuXino-15.6-FHD and A20-OLinuXino-MICRO.
 
This guide is tested with the LCD-15.6TS (with ETT5003U controller), distributed by Olimex LTD. The setup included LCD-OLinuXino-15.6-FHD and A20-OLinuXino-MICRO.
  
Important: for the hardware connection you would need to provide 5V and 12V to the touchscreen display. A free USB port is also required. The powering to the touchscreen is deliver through a standard 4-pin molex connector.  
+
Important: for the hardware connection you would need to provide 5V and 12V to the touchscreen display. A free USB port is also required. The powering to the touchscreen is deliver through a standard 4-pin molex connector.
  
 
After all hardware connections are established to get the touchscreen working under the official Linux image do the following:
 
After all hardware connections are established to get the touchscreen working under the official Linux image do the following:
  
1. Make sure the USB connection between the display and the board is established before powering the board. If it was connected already reboot the board.  
+
'''1.''' Make sure the USB connection between the display and the board is established before powering the board. If it was connected already reboot the board.
  
2. Identify the event number of the USB connection of the touschreen. You might plug-unplug the USB connection of the touchscreen to get the proper event number in the console (or use command dmesg | grep ETwo).
+
'''2.''' Identify the event number of the USB connection of the touschreen. You might plug-unplug the USB connection of the touchscreen to get the proper event number in the console (or use command dmesg | grep ETwo).
  
3. Create a new 20-ts.conf file or add a new section in the 20-ts.con file (remember to replace the USB event number with the number you got in point 1, we have used event2 as example)
+
'''3.''' Create a new 20-ts.conf file or add a new section in the 20-ts.conf file (remember to replace the USB event number with the number you got in point 1, we have used event2 as example)
  
The file location is: '''/usr/share/X11/xorg.conf.d/20-ts.conf'''
+
The file location is: /usr/share/X11/xorg.conf.d/20-ts.conf
  
 
The file should contain the following:
 
The file should contain the following:
  
  Section "InputClass"
+
Section "InputClass"
    Identifier "ETwo TouchScreen"
+
  Identifier "ETwo TouchScreen"
    MatchDevicePath "/dev/input/event2"
+
  MatchDevicePath "/dev/input/event2"
    MatchProduct "ETwoTouch Corp. ETwo TouchScreen"
+
  MatchProduct "ETwoTouch Corp. ETwo TouchScreen"
    Driver "tslib"
+
  Driver "tslib"
    Option "ScreenNumber" "0"
+
  Option "ScreenNumber" "0"
    Option "Rotate" "NONE"
+
  Option "Rotate" "NONE"
    Option "Width" "1920"
+
  Option "Width" "1920"
    Option "Height" "1080"
+
  Option "Height" "1080"
    Option "SendCoreEvents" "yes"
+
  Option "SendCoreEvents" "yes"
    Option "Type" "touchscreen"
+
  Option "Type" "touchscreen"
  EndSection
+
EndSection
  
 
'''Remember to replace the event2 number with the number you got in point 1. The configuration is suitable for the FullHD 15.6 inch display. If you are using the 1366x768 (HD-ready) display replace the driver option defaults with "Width" "1366" and "Height" "768".'''
 
'''Remember to replace the event2 number with the number you got in point 1. The configuration is suitable for the FullHD 15.6 inch display. If you are using the 1366x768 (HD-ready) display replace the driver option defaults with "Width" "1366" and "Height" "768".'''
  
4. Create a new environment file or edit the environment file (again we have used event2 as our USB event, remember to replace it with the number of event you get in point 1.)
+
'''4.''' Create a new environment file or edit the environment file (again we have used event2 as our USB event, remember to replace it with the number of event you get in point 1.)
  
The file location is: '''/etc/environment'''
+
The file location is: /etc/environment
  
  TSLIB_TSEVENTTYPE=raw
+
TSLIB_TSEVENTTYPE=raw
  TSLIB_CONSOLEDEVICE=none
+
TSLIB_CONSOLEDEVICE=none
  TSLIB_FBDEVICE=/dev/fb0
+
TSLIB_FBDEVICE=/dev/fb0
  TSLIB_TSDEVICE=/dev/input/event2
+
TSLIB_TSDEVICE=/dev/input/event2
  TSLIB_CALIBFILE=/etc/pointercal
+
TSLIB_CALIBFILE=/etc/pointercal
  TSLIB_CONFFILE=/usr/etc/ts.conf
+
TSLIB_CONFFILE=/usr/etc/ts.conf
  TSLIB_PLUGINDIR=/usr/lib/ts
+
TSLIB_PLUGINDIR=/usr/lib/ts
  
'''Again remember to replace the event2 number with the number you got in point 1.'''
+
Again remember to replace the event2 number with the number you got in point 1.
  
5. Now modify and install xf86-input-tslib driver.
+
'''5.''' Calibrate the display like root user
  
xf86-input-tslib allows us to use tslib device like our touchscreen as pointer device.
+
ts_calibrate
  
This driver is old a bit, so while it works with newer Xorg server, it faluts, because xf86InputSetScreen function is removed from Xorg, but driver tries to call it. I had just removed this call from driver's source code and the problem was solved.
+
'''6.''' Add the following 2 lines at the end of /root/.bashrc file:
  
Download source code, go to its directory:
+
service slim stop
 +
su - olimex -c startx &
  
git clone git://git.debian.org/git/collab-maint/xf86-input-tslib
+
'''7.''' Reboot the board
  
cd xf86-input-tslib
+
reboot
 
 
Get and apply required patches:
 
 
 
wget https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A13/TOUCHSCREEN/1-xf86tslib-sigfault.patch
 
 
 
wget https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A13/TOUCHSCREEN/xf86-input-tslib-port-ABI-12-r48.patch
 
 
 
wget https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A13/TOUCHSCREEN/xf86tslib-xorg-update.patch
 
 
 
patch -p0 < 1-xf86tslib-sigfault.patch
 
 
 
patch -p0 < xf86-input-tslib-port-ABI-12-r48.patch
 
 
 
patch -p0 < xf86tslib-xorg-update.patch
 
 
 
Configure, make and install:
 
 
 
./configure --prefix=/usr
 
 
 
make
 
 
 
make install
 
 
 
5. Reboot the board
 
 
 
6. Calibrate the display - if you are calibrating from the X graphical interface make sure that you are logged as user “olimex” (if calibrating without the X, the user is “root”).
 
 
 
    #su olimex
 
enter the olimex password:olimex
 
 
 
    #sudo ts_calibrate
 
calibrate the touch screen and reboot the board
 
 
 
    #sudo reboot
 
  
 
[[Main_Page]]
 
[[Main_Page]]

Revision as of 21:21, 25 May 2015

Instructions on the usage of the 15.6 inch SAW touchscreen (LCD-15.6TS) under Debian.

This guide is tested with the LCD-15.6TS (with ETT5003U controller), distributed by Olimex LTD. The setup included LCD-OLinuXino-15.6-FHD and A20-OLinuXino-MICRO.

Important: for the hardware connection you would need to provide 5V and 12V to the touchscreen display. A free USB port is also required. The powering to the touchscreen is deliver through a standard 4-pin molex connector.

After all hardware connections are established to get the touchscreen working under the official Linux image do the following:

1. Make sure the USB connection between the display and the board is established before powering the board. If it was connected already reboot the board.

2. Identify the event number of the USB connection of the touschreen. You might plug-unplug the USB connection of the touchscreen to get the proper event number in the console (or use command dmesg | grep ETwo).

3. Create a new 20-ts.conf file or add a new section in the 20-ts.conf file (remember to replace the USB event number with the number you got in point 1, we have used event2 as example)

The file location is: /usr/share/X11/xorg.conf.d/20-ts.conf

The file should contain the following:

Section "InputClass"
 Identifier "ETwo TouchScreen"
 MatchDevicePath "/dev/input/event2"
 MatchProduct "ETwoTouch Corp. ETwo TouchScreen"
 Driver "tslib"
 Option "ScreenNumber" "0"
 Option "Rotate" "NONE"
 Option "Width" "1920"
 Option "Height" "1080"
 Option "SendCoreEvents" "yes"
 Option "Type" "touchscreen"
EndSection

Remember to replace the event2 number with the number you got in point 1. The configuration is suitable for the FullHD 15.6 inch display. If you are using the 1366x768 (HD-ready) display replace the driver option defaults with "Width" "1366" and "Height" "768".

4. Create a new environment file or edit the environment file (again we have used event2 as our USB event, remember to replace it with the number of event you get in point 1.)

The file location is: /etc/environment

TSLIB_TSEVENTTYPE=raw
TSLIB_CONSOLEDEVICE=none
TSLIB_FBDEVICE=/dev/fb0
TSLIB_TSDEVICE=/dev/input/event2
TSLIB_CALIBFILE=/etc/pointercal
TSLIB_CONFFILE=/usr/etc/ts.conf
TSLIB_PLUGINDIR=/usr/lib/ts

Again remember to replace the event2 number with the number you got in point 1.

5. Calibrate the display like root user

ts_calibrate

6. Add the following 2 lines at the end of /root/.bashrc file:

service slim stop
su - olimex -c startx &

7. Reboot the board

reboot

Main_Page