Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Martin Heller on February 22, 2013, 06:35:04 AM
-
I am trying to install and calibrate an eGalax touch panel on the current tinycore with kernel 3.0.21-tinycore. As I am new to tinycore and touchscreens, this has been more difficult than first anticipated. The touch panel is "working", i.e. the pointer moves when touching the screen, but the calibration is off. I can influence the calibration with xinput and trial and error:
xinput set-prop --type=int --format=32 EETI "Evdev Axis Calibration" 535 3707 211 3461
but it is troublesome to get this right.
The driver from eGalax that I have downloaded the driver from eGalax website for kernel versions 2.6.36 and above has a calibration utility. However, this program cannot see the touch device. I think this is because it is looking for a hidraw* device which is not created when I attach the touch controller to the USB port.
The eGalax installation instructions starts by stating that I must enable the modules EVDEV, UINPUT and HIDRAW.
As far as I can tell, the hidraw module is not enabled in tinycore by default? Installing the tinycore headers and inspecting the .config file I get:
grep HIDRAW .config
# CONFIG_HIDRAW is not set
which I assume is what I must somehow change? I have tried to change the above line to
CONFIG_HIDRAW=y
and follow the instructions at from the "Creating a Custom Kernel" wiki page. Admittedly, this is not something I've tried before, and apparently, I am doing something wrong:
make oldconfig
results in "can't find file Kconfig" (sorry, I can't post the console output as I get an error from the forum saying "Sorry, you are not allowed to post external links").
Questions: do I need to recompile the kernel to enable HIDRAW? If yes, does a step-by-step guide exist that will enable me to get a HIDRAW enabled kernel that is compatible with the default distribution of tinycore?
-
Perhaps it would be easier to use another calibration program?
http://www.freedesktop.org/wiki/Software/xinput_calibrator
-
Hi Martin Heller
First try curagas suggestion. Then, if you really feel you need to compile a kernel, go to the search page and search for
make menuconfig
or
make oldconfig
Editing the config file by hand is ill advised, since some options interact with other options.
The 3.0.21 source and config files can be found under the kernel directory here:
http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/src/
-
Also, before recompiling the kernel you could look into gpm:
http://git.schottelius.org/?p=gpm;a=blob;f=doc/drivers/README.evabs;h=92965abbff0399b140bc5d5e54d77224daf40a75
-
Perhaps it would be easier to use another calibration program?
Thanks for the suggestion. I have downloaded xinput_calibrator from the above link and compiled the program. However, my display size is 600x480 and this is apparently too small for xinput_calibrator (or the program does not detect the screen size correctly). When I run xinput_calibrator, I only see the top left part of the gray screen with red crosses, i.e. only the top left callibration mark is visible (and half of the text box in the center of the screen).
Do you know if I can somehow pass my display size to xinput_calibrator?
-
Hi Martin Heller
First try curagas suggestion. Then, if you really feel you need to compile a kernel, go to the search page and search for
make menuconfig
Thanks. I have manaed to compile a new kernel with hidraw enabled. Booting this kernel enables the eGalax calibration utilities eGTouchU and eCalib to calibrate the touch screen. The eGTouchU program has a drawing test that works perfectly after callibration.
Sadly, the eGTouchU program seems to be the only program that uses the calibration. The desktop and any other program are still uncallibrated. Suggestions are very welcome, I have attached the xorg.conf file, the system log and the log from the eGalaxD deamon.
[EDIT]: Added missing quote tag. Rich
-
Do you know if I can somehow pass my display size to xinput_calibrator?
It seems to take a --geometry option. ie --geometry 640x400
But since you now have the numbers, it's just a configuration matter. man evdev does not list a Parameters option, so maybe try to enter the minX etc options directly to xorg.conf instead of having them in the external file.
-
It seems to take a --geometry option. ie --geometry 640x400
Not the default branch of xinput_calibrator. However, there is a patch by floe at
git clone https: / / github.com / floe / xinput_calibrator.git
which includes a --geometry flag. Using the flag, all the callibration crosses are visible, but the result of the calibration is highly dependent on the current callibration. For example, repeated calibration gives very odd results:
tc@box:~/mod-xinput_calibrator$ xinput_calibrator --geometry 640x480+0+0 Calibrating EVDEV driver for "EETI" id=9
current calibration values (from XInput): min_x=829, max_x=4173 and min_y=-33, max_y=3620
Doing dynamic recalibration:
Setting new calibration data: 1068, 4609, -363, 3344
--> Making the calibration permanent <--
Install the 'xinput' tool and copy the command(s) below in a script that starts with your X session
xinput set-int-prop "EETI" "Evdev Axis Calibration" 32 1068 4609 -363 3344 tc@box:~/mod-xinput_calibrator$ xinput_calibrator --geometry 640x480+0+0 Calibrating EVDEV driver for "EETI" id=9
current calibration values (from XInput): min_x=1068, max_x=4609 and min_y=-363, max_y=3344
Doing dynamic recalibration:
Setting new calibration data: 1802, 5003, -803, 2722
--> Making the calibration permanent <--
Install the 'xinput' tool and copy the command(s) below in a script that starts with your X session
xinput set-int-prop "EETI" "Evdev Axis Calibration" 32 1802 5003 -803 2722 tc@box:~/mod-xinput_calibrator$ xinput_calibrator --geometry 640x480+0+0 Calibrating EVDEV driver for "EETI" id=9
current calibration values (from XInput): min_x=1802, max_x=5003 and min_y=-803, max_y=2722
Doing dynamic recalibration:
Setting new calibration data: 3049, 5275, -1140, 1560
--> Making the calibration permanent <--
Install the 'xinput' tool and copy the command(s) below in a script that starts with your X session
xinput set-int-prop "EETI" "Evdev Axis Calibration" 32 3049 5275 -1140 1560 tc@box:~/mod-xinput_calibrator$
-
Perhaps it would be easier to use another calibration program?
I have now also tried the xvtouch utility which I can install as a TinyCore extension:
tc@box:~$ sudo xvtouch /dev/input/event5 -v -c
open /dev/input/event5
Device /dev/input/event5 = eGalax Inc. USB TouchController Input device ID: bus 0x3 vendor 0xeef product 0x1 version 0x210
XOpenDisplay(':0')
calib(X,Y) (-55,2099)min (4165,2018)max
Screen 640x480
Touch the mouse pointers
However, there are no "mouse pointers" visible. All I see is the above in the terminal window. Does anybody have experience calibrating a touch device with xvtouch?
-
Thanks for your sharing! helpful for me~ :-*