Xenarc USB touchscreen for Beagleboard/OMAP3 EVM

From eLinux.org
Revision as of 10:19, 21 April 2009 by Pratheeshg (Talk | contribs)

Jump to: navigation, search

XENAARC has a 7" LCD touchscreen (https://www.xenarcdirect.com/product.php?productid=16194), which takes DVI for digital input and USB touchscreen interface. The below are the steps followed to make touchscreen work with OMAP3 EVM or Beagleboard running Angstrom distribution. There are lots of information in the web - this page kind of tries to consolidate the information.


(1) Enable EVDEV support in linux kernel

(2) Build the evtouch driver(http://www.conan.de/touchscreen/evtouch.html) for X.org – if you are using OE just copy attached xf86-input-evtouch_0.8.8.bb file to openembedded\packages\xorg-driver folder and do a bitbake –b xf86-input-evtouch_0.8.8

openembedded\packages\xorg-driver\xf86-input-evtouch_0.8.8.bb

require xorg-driver-input.inc DESCRIPTION = "X.Org X server -- evtouch input driver" PR = "r1" SRC_URI = "http://www.conan.de/touchscreen/xf86-input-evtouch-0.8.8.tar.bz2 \ "

(3) Copy the generated binary evdev_drv.so to /usr/lib/xorg/modules/input/ or install xf86-input-evtouch_0.8.8-r1.1_armv7a.ipk on your target

(4) Copy 69-touchscreen.rules to /etc/udev/rules.d/ folder, this will make sure that touchscreen is always mapped to /dev/input/evtouch_event and even if you detach USB cable during a session. This is important as this event hardcoded in xorg.conf

69-touchscreen.rules

KERNEL=="event*", SUBSYSTEM=="input", SYSFS{idVendor}=="0eef", SYSFS{idProduct}=="0001", SYMLINK+="input/evtouch_event"


(5) Time to calibrate. calibrator.c is patched version of http://www.harbaum.org/till/cnc/cx-t100/calibrator.c. Some changes are needed because ABS_X and ABS_Y key values are different for our touchscreen. Build calibrator.c. Then do ./calibrator /dev/input/evtouch_event from Xterm and follow the instructions to click four points in the corners. bold "This program will printout Max/Min X/Y values which we need to copy to xorg.conf. Please note that you need to disable evtouch driver from xorg.conf during calibration , comment touchscreen section from ServerLayout in xorg.conf (#InputDevice "touchscreen" "SendCoreEvents")"

(5) Copy paste the values output by calibrator to xorg.conf

Section "InputDevice"

           Identifier "touchscreen"
           Driver "evtouch"
           Option "Device" "/dev/input/evtouch_event"
           Option "DeviceName" "touchscreen"
           Option "MinX" "274"
           Option "MinY" "281"
           Option "MaxX" "3839"
           Option "MaxY" "3883"
           Option "ReportingMode" "Raw"
           Option "Emulate3Buttons"
           Option "Emulate3Timeout" "50"
           Option "SendCoreEvents" "On"
           Option "Rotate" "CCW"
           Option "SwapY" "1"

EndSection


Section "ServerLayout"

       Identifier      "Builtin Default Layout"                                     
       Screen  "Builtin Default fbdev Screen 0" 
       InputDevice "touchscreen" "SendCoreEvents"       

EndSection


(6) Restart X and that’s about it.