Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1867316
  • 博文数量: 473
  • 博客积分: 13997
  • 博客等级: 上将
  • 技术积分: 5953
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-22 11:52
文章分类

全部博文(473)

文章存档

2014年(8)

2013年(38)

2012年(95)

2011年(181)

2010年(151)

分类: LINUX

2010-11-14 01:37:11

ELO Touchscreen Driver (using evtouch)

Ubuntu includes an Xorg xserver input driver in the package for Dapper, Feisty, Gutsy, Hardy, Intrepid, Jaunty and Karmic (for x86 and x86_64). This will work with many of the ELO touch-screen drivers, both serial and USB. evtouch seems to work much better than elographics for jaunty and karmic

[] Installation

sudo apt-get install xserver-xorg-input-evtouch

[] Configuration

Do NOT edit /etc/X11/xorg.conf. All touchscreen configuration should be done by changing the appropriate fdi file in /usr/share/hal/fdi/policy/20thirdparty/ or creating your own. Note: It is possible to use xorg.conf but it's redundant and I had a lot of freezing issues (e.g. X would freeze every 10 minutes) until I used this method. If you have a 2700, then you can just edit 50-elo-2700.fdi Note: in version 0.8.8 the file 50-elo-2700.fdi has an extra at the end which you must delete or it won't work.. Otherwise run the following command to get information about your touchscreen:

lshal | grep Elo

To create a new fdi, run:

sudo nano /usr/share/hal/fdi/policy/20thirdparty/50-elo.fdi

Then add the following lines. You can change the line to match the output of lshal | grep Elo but "Elo TouchSystems" is pretty generic and should match any Elo touchscreen..

 




evtouch
130
197
3945
3894
1
1




Note (on March 27th, 2010): In my case (ELO 2500u), the Y coordinates of my clicks were inverted. To fix that, replace:

        1

by:

        0

...End of note The last thing you have to do is create udev rules so the the touchscreen can correctly send events. Create the file /etc/udev/rules.d/69-touchscreen.rules and add the following lines:

# Elo Touchscreen
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="04e7", ATTRS{idProduct}=="0020", SYMLINK+="input/evtouch_event"

That's it! You'll probably have to modify the values for minx, maxx, miny, maxy to adjust calibration. If the calibration is inverted then change swapx or swapy to 0. You'll have to log out and log back in for the changes to take effect. Or maybe restart or maybe unplug the usb cable and plug it back in.. You might be able to run the calibration utility from System -> Preferences -> Calibrate Touchscreen but I haven't had any luck.. Note: (on March 27th, 2010): If when calibrating you get the error message: "No evtouch capable touchscreen found." It may mean that the vendor id --above is 04e7-- or the product id --above is 0020-- are incorrect. To get the correct values do the following:

sudo lshal > text
gedit text

Now on the text editor look for the string "ELO Touch". The editor will bring you to the section where you can get the correct product id and vendor id. To give you an idea, I have an ELO 2500U and the text looks like the following in my machine, where my value for vendor id is 0x4e7 and product id is 0x7: (only the most relevant lines appear next)

udi = '/org/freedesktop/Hal/devices/usb_device_4e7_7_07G59809'
usb_device.product = '2500U IntelliTouch® Touchmonitor Interface' (string)
usb_device.product_id = 7 (0x7) (int)
usb_device.serial = '07G59809' (string)
usb_device.speed = 12.0 (12) (double)
usb_device.vendor = 'Elo TouchSystems' (string)
usb_device.vendor_id = 1255 (0x4e7) (int)
usb_device.version = 1.1 (1.1) (double)

...End of Note

[] ELO Touchscreen Driver (using elographics)

Ubuntu includes an Xorg xserver input driver in the package for Dapper, Feisty, Gutsy, Hardy, Intrepid and Jaunty (for x86 and x86_64). This will work with many of the ELO touch-screen drivers, both serial and USB. E271-2210 and E271-2200 devices are supported. E281-2310 and compatible devices are supported with some features unavailable.

[] Installation

sudo apt-get install xserver-xorg-input-elographics

Note: Version 1.1.0-3 has . Until the package is updated a patched version (1.1.0-3ubuntu1) is .

[] Configuration

Edit `/etc/X11/xorg.conf` and add a new !InputDevice section similar to this one. This example comes from a screen test on a laptop that is configured so the external graphics device is on X screen 1 (note the screenNo option) rather than the default screen 0.

Section "InputDevice"
Identifier "ELO Touchscreen"
Driver "elographics"
Option "Device" "/dev/ttyUSB0"
Option "AlwaysCore"
Option "screenNo" "1"
Option "MinX" "4100"
Option "MaxX" "0"
Option "MinY" "0"
Option "MaxY" "4100"
Option "UntouchDelay" "5"
Option "ReportDelay" "1"
EndSection

Note: edit the Device value (/dev/ttyUSB0) to match the input device name the touch-screen input has. In this case, the device is a serial touch-screen connected via a serial-to-USB converter. You may have to invert the minimum and maximum X- and Y-scale values if the input values from the touch-screen are inverted. Use `man elographics" to see all the options and defaults. Add the input device to the !ServerLayout section so it looks similar to this:

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 768
Screen 1 "Screen1" Above "Screen0"
InputDevice "Synaptics Touchpad"
InputDevice "ELO Touchscreen"
EndSection

Save the file and log-out to restart the X server.

[] Calibration

Manual calibration is required. It is a case of repeatedly changing the minimum and maximum X and Y axis values in xorg.conf, restarting and testing. An alternative is to build and then run from a non-X terminal to determine minimum and maximum values to use in xorg.conf.

阅读(752) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~