EETI eGTouch Linux Programming Guide v2.5n
EETI eGTouch Linux Programming Guide v2.5n
5N
2021/03/12
TABLE OF CONTENTS
TABLE OF CONTENTS......................................................................................... 0
Sec 1: Introduction ............................................................................................ 2
1.1 GuideLine .............................................................................................. 2
1.2 Support From Vendor ......................................................................... 2
Sec 2: Before install .......................................................................................... 3
2.1 Check kernel module .......................................................................... 3
2.2 Conditions to patch kernel source code ......................................... 5
2.3 Check device ........................................................................................ 5
Sec 3: Install Driver Package ........................................................................... 7
3-1 Install Process...................................................................................... 7
3-2 Tools....................................................................................................... 9
Sec 4: Touch Input Event Sequence ............................................................ 10
4-1 Two different event sequences ....................................................... 10
4-2 How to read touch event ................................................................... 11
Sec 5: eGTouchL.ini Parameter Explanations ........................................... 12
5-1 Parameter Table ................................................................................. 12
Sec 6: Annotation ............................................................................................ 17
6-1 DetectRotation Note .......................................................................... 17
6-2 Rotation and Beep for Embedded System ................................... 17
Sec 7: Multi-Monitor Setting .......................................................................... 18
7-1 Numerous Devices ............................................................................ 18
7-2 Monitor Name ..................................................................................... 18
7-3 Calibration Method. ........................................................................... 19
Sec 8: FAQ ......................................................................................................... 20
8-1 Touch not working ............................................................................ 20
8-2 Touch position and direction don’t match rotated display ....... 22
8-3 OS can not map touch position to screen position.................... 22
8-4 Touch is working, but click some items without reaction......... 23
8-5 eGTouchD can NOT find UART interface device......................... 23
8-6 My UART device receive unexpected data from eGTouchD ..... 23
8-7 GNOME Gesture ................................................................................ 24
Sec 9: Support .................................................................................................. 25
eGTouch Programming Guide v2.5N
2021/03/12
1
eGTouch Linux Programming Guide v2.5N
2021/03/12
Sec 1: Introduction
1.1 GuideLine
EETI provides all kinds of touch solution. EETI eGTouch is a touch daemon driver for EETI
touch controller. Only is available for kernel 2.6.24 upward.
Support interfaces:
1. USB
2. RS232
3. PS/2
Having below features:
1. Precise points.
2. Great calibration precision for Resistive controller.
3. Capable for 10+ points report.
4. Following Linux Standard Multitouch-protocol point report.
5. Rightclick, beep sound, constant touch filter, etc.
6. Support multi devices.
7. Available for detecting X-window rotation to do rotating coordinate.
8. Provide manually modify driver’s behavior.
This document would assist you to install eGTouch.
如果您有任何驱动程序使用上的问题,请参照此文件的第 8 节,該节列出常见的问题,对您可
能很有用,如果仍然无法解决您的问题,请参见第 9-1 节,取得 EETI 的支持。
2
eGTouch Linux Programming Guide v2.5N
2021/03/12
Necessary:
1. EVDEV
2. UINPUT
3. HIDRAW ( USB Interface )
4. HID_MULTITOUCH ( USB Interface & Kernel 3.0 upwards )
Remove:
CONFIG_TOUCHSCREEN_USB_COMPOSITE
( For USB Interface & PID 0001 controller )
You could check this by “make menuconfig” command or modify Kconfig file. Below is an
example of “make menuconfig”:
Necessary:
[Device Drivers] / [Input device support] / [Device Drivers] / [Input device support] /
[Event interface] [Miscellaneous devices]
/ [User level driver support]
3
eGTouch Linux Programming Guide v2.5N
2021/03/12
Necessary:
[Device Drivers] / [HID Devices] / [Device Drivers] / [HID Devices] /
[/dev/hidraw raw HID device support] Special HID drivers / HID Multitouch panels
( for USB Interface ) ( If Kernel Version 3.0 upwards
& for USB Interface )
Remove:
[Device Drivers] / [Input device support] /
[Touchscreens] / [USB Touchscreen Driver]
( PID 0001 USB controller)
4
eGTouch Linux Programming Guide v2.5N
2021/03/12
If your system meets all below two conditions, please refer to Appendix 10-1 to
do kernel blacklist patch first, or driver would NOT be functional.
1. Interface USB
2. X.org version < 1.8.7 or no X-window
If your system meets all below three conditions, please refer to Appendix 10-2 to
do kernel HIDCORE patch first, or driver would NOT be functional.
1. Interface USB
2. Kernel version 3.8.x to 3.12.x
3. ControllerType Resistive or SCAP
5
eGTouch Linux Programming Guide v2.5N
2021/03/12
6
eGTouch Linux Programming Guide v2.5N
2021/03/12
7
eGTouch Linux Programming Guide v2.5N
2021/03/12
5. To blacklist usbtouchscreen module run from the beginning of system operation. You
could also manually modify /etc/modprobe.d/blacklist.conf to add usbtouchscreen
into blacklist.
6. If Xorg Version is 1.8.7 upwards, put 52-egalax-virtual.conf xorg rule file into
/usr/share/X11/xorg.conf.d folder
We could check event node which was assigned to the virtual device and read/get
input event through this device node, e.g. /dev/input/eventX.
8
eGTouch Linux Programming Guide v2.5N
2021/03/12
3-2 Tools
As you have X-window, these tools are available for use.
Please execute these tools under “root” permission!
eGTouchU The tool eGTouchU is a utility tool which could help you modify
x86 system only driver’s parameter through UI. The detail descriptions please refer to the
document “EETI eGTouch Utility Guide” in driver package.
eCalib The tool eCalib is a calibration tool with command line. Please type
“eCalib -h” to see the usage content.
9
eGTouch Linux Programming Guide v2.5N
2021/03/12
The eGTouchD daemon sends input event through kernel feature UINPUT so that the
client program can get these events from /dev/input/eventX.
10
eGTouch Linux Programming Guide v2.5N
2021/03/12
Type = EV_SYNC
Code = SYN_REPORT
Value = 0
A Sync report event, all data will be valid after this event is received.
11
eGTouch Linux Programming Guide v2.5N
2021/03/12
The file eGTouchL.ini has a parameter list which would be loaded by driver. Driver’s
behavior could be changed by these parameters. Please DON’T modify the front title as
setting up eGTouchL.ini.
DeviceNums How many devices you want to plug-in to the system. If you
want more than one device, please modify this value.
1 Only one device [Default]
2-10 More than one device. [Max = 10]
12
eGTouch Linux Programming Guide v2.5N
2021/03/12
SplitRectMode Split the display into Specific Rect. Touch would just show on the
specific Rect.
0 No change (Full Display) [Default]
1-8 Driver in-built split Rect
13
eGTouch Linux Programming Guide v2.5N
2021/03/12
2 1 5
7 8
3 4 6
9 Customized Rect.
CustomRectLeft Theses parameters are valid as SplitRectMode=9. You can
CustomRectRight customize the Rect by these parameters.
CustomRectTop
CustomRectBottom
0-4095 Four sides of the customized Rect
14
eGTouch Linux Programming Guide v2.5N
2021/03/12
0 Disable Beep
1 Make a beep sound as ”Touch Down”
2 Make a beep sound as ”Touch Up”
3 Make a beep sound as both two above conditions.
BeepDevice Choose the beep sound device
0 No device
1 Send beep sound by from system buzzer
2 Send beep sound by from sound card ( Only for x86 system )
3 Send beep sound from both devices.
BeepFreq You can modify buzzer beep frequency here.
X (Only for buzzer) The buzzer beep time length (ms). [Default = 200]
VKEYEnable Enable this option if there’s virtual key on your touch sensor.
0 Disable [Default]
1 Enable
VKEYReportMod Virtual Key Sensitivity.
X Smaller value means more sensitive. On the other hand, larger is less sensitive
VKEY_X Y 1. The value of X refer to the vkey package reported by
controller as touching the specified virtual key on your
sensor.
2. The value of Y refer to the keyevent code in input.h which
you want to report to system. You can choose the keyevent
you want and fill in the code.
Example A: 1. As controller report vkey package [0], we’ll send keyevent
VKEY_0 139 code [139] to system.
2. The event code [139] in input.h refers to MENU_KEY.
Note: 139 is a decimal number.
15
eGTouch Linux Programming Guide v2.5N
2021/03/12
Note: If you’re not sure controller’s vkey package value, please contact EETI vendor.
16
eGTouch Linux Programming Guide v2.5N
2021/03/12
Sec 6: Annotation
We recommand use lightdm to startup eGTouch driver until now, if your system not using
lightdm, please install lightdm first. You can install by this command: ”apt-get install lightdm”.
Since the ready time sequence of Xlib is different among diverse startup. We’re sorry that we
couldn’t provide solution correspond to all startup. If there’s any further problem as setting up
please contact us for technical support.
Notice:
When you execute ”setup.sh ”to install eGTouch driver, please set ”y” to enable functions.
And so on. If you are using an embedded system ( ex: ARM CPU), you need support for sound
card beep. There’s a necessary condition: ALSA lib support since eGTouch send beep sound
by ALSA lib.
If you need this support and your system got target library, please contact us for a customized
driver. Thanks.
17
eGTouch Linux Programming Guide v2.5N
2021/03/12
After modifying the parameter, please reboot your system or restart driver to make it valid.
After modifying the parameter, please reboot your system or restart driver to make it valid.
18
eGTouch Linux Programming Guide v2.5N
2021/03/12
19
eGTouch Linux Programming Guide v2.5N
2021/03/12
Sec 8: FAQ
Use hexdump and touch screen, if connection is OK, it will print some information.
$ sudo hexdump /dev/ttySX , in this example, X should be 0 or 1.
If you have trouble in this step, please check the hardware connection of your device
and controller.
20
eGTouch Linux Programming Guide v2.5N
2021/03/12
[PCAP example]
If you have trouble in this step, please check the required modules have been installed
correctly. (Refer to 2.1 Check kernel module)
If you are using UART interface, please also have a check to 8.5 section.
[Resistant touch example] Select eGalax Virtual Device for Single and touch screen.
If you see data printing from screen, you may check has inbox touch driver has been
blocked correctly. (Refer to 2.2 section)
If you do not see data printing from screen, please refer to 9.1 section, describe your
issue and contact us.
21
eGTouch Linux Programming Guide v2.5N
2021/03/12
2. Reboot device.
3. Reboot device.
22
eGTouch Linux Programming Guide v2.5N
2021/03/12
After modifying the parameter, please reboot your system or restart driver to make it valid.
23
eGTouch Linux Programming Guide v2.5N
2021/03/12
24
eGTouch Linux Programming Guide v2.5N
2021/03/12
Sec 9: Support
This may takes few seconds, and you will find an eeti.tar.gz file in your current path.
Please attach eeti.tar.gz, describe your issue and contact us by mail: [email protected]
25
eGTouch Linux Programming Guide v2.5N
2021/03/12
If your system’s X-window version is 1.8.7 upwards, kernel version is not 3.8 to 3.12,
and EETI touch controller type is not USB Resistive/SCAP touch, please IGNORE this
section.
Please refer below instructions to do kernel blacklist patch, or driver would NOT be
functional.
Please append following RED section into your source code.
If your kernel is 2.6.33 downwards, please follow section 8-1.1
If your kernel is 2.6.34 upwards, please follow section 8-1.2
26
eGTouch Linux Programming Guide v2.5N
2021/03/12
1. / S o u r c e C o d e / d r i v e r s / i n p u t / e v d e v . c
static struct input_device_id evdev_blacklist[] =
{ /* Added by EETI */
{
.flags = INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR,
.bustype = BUS_USB,
.vendor = 0x0EEF,
},
{}, /* Terminating entry */
};
27
eGTouch Linux Programming Guide v2.5N
2021/03/12
28
eGTouch Linux Programming Guide v2.5N
2021/03/12
3. / S o u r c e C o d e / d r i v e r s / i n p u t / j o y d e v . c
static const struct input_device_id joydev_blacklist[] =
{
{
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
.evbit = { BIT_MASK(EV_KEY) },
.keybit = { [BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH) },
}, /* Avoid itouchpads and touchscreens */
{
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
.evbit = { BIT_MASK(EV_KEY) },
.keybit = { [BIT_WORD(BTN_DIGI)] = BIT_MASK(BTN_DIGI) },
}, /* Avoid tablets, digitisers and similar devices */
{
.flags = INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR,
.bustype = BUS_VIRTUAL,
.vendor = 0x0EEF,
}, /* Added by EETI */
{} /* Terminating entry */
};
29
eGTouch Linux Programming Guide v2.5N
2021/03/12
1. / S o u r c e C o d e / d r i v e r s / i n p u t / e v d e v . c
static bool evdev_match(struct input_handler *handler, struct input_dev *dev)
{
/* Avoid EETI USB touchscreens */
#define VID_EETI 0x0EEF
if ((BUS_USB == dev->id.bustype) && (VID_EETI == dev->id.vendor))
return false;
return true;
}
30
eGTouch Linux Programming Guide v2.5N
2021/03/12
.connect = mousedev_connect,
.disconnect = ousedev_disconnect,
.fops = &mousedev_fops,
.minor = MOUSEDEV_MINOR_BASE,
.name = "mousedev",
.id_table = mousedev_ids,
};
3. / S o u r c e C o d e / d r i v e r s / i n p u t / j o y d e v . c
static bool joydev_match(struct input_handler *handler, struct input_dev *dev)
{
/* Avoid touchpads and touchscreens */
if (test_bit(EV_KEY, dev->evbit) && test_bit(BTN_TOUCH, dev->keybit))
return false;
/* Avoid tablets, digitisers and similar devices */
if (test_bit(EV_KEY, dev->evbit) && test_bit(BTN_DIGI, dev->keybit))
return false;
31
eGTouch Linux Programming Guide v2.5N
2021/03/12
32