Xenarc USB touchscreen for Beagleboard/OMAP3 EVM

From eLinux.org
Jump to: navigation, search

XENARC is a 7" LCD touchscreen, which takes DVI for digital input and has a USB touchscreen interface. The touchscreen is detected as eGalax Inc. USB TouchController. 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 necessary steps.

(1) Enable HID, USB HID and 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 create xf86-input-evtouch_0.8.8.bb file in openembedded/packages/xorg-driver folder as shown below 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 \
"

You might also need to update openembedded/conf/checksums.ini

[http://www.conan.de/touchscreen/xf86-input-evtouch-0.8.8.tar.bz2]
md5=4d8e092356d8353002f60a4907046c13
sha256=eafc4a09729a4b2b6120430c71e1954c5cac299ad6adf2f9a40aee8a7b51e476

(3) Copy the generated binary evdev_drv.so to /usr/lib/xorg/modules/input/ o r install xf86-input-evtouch_0.8.8-r1.1_armv7a.ipk on your target. ARM binary built for Angstrom can be accessed here, http://elinux.org/upload/4/4a/Xf86-input-evtouch_0.8.8-r1.1_armv7a.ipk

(4) Create 69-touchscreen.rules as shown below and copy this to /etc/udev/rules.d/ folder. This is to 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 we are going to hardcode this event 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 (http://elinux.org/upload/5/59/Calibrator.patch) version of calibrator.c (http://www.harbaum.org/till/cnc/cx-t100/calibrator.c). this patch is required because ABS_X and ABS_Y key values are different for this touchscreen. Build calibrator.c. calibrator ARM binary can be accessed here, http://elinux.org/upload/9/97/Calibrator

(6) Do ./calibrator /dev/input/evtouch_event from Xterm and follow the instructions to click four points in the corners. 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")

(7) Copy paste the Min/Max/X/Y values output by calibrator to xorg.conf, important sections in xorg.conf looks as shown below

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                                  

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