Peripherals/Touch Screen: Difference between revisions
No edit summary |
|||
(69 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
The [[XO-4]] has a touchscreen built in. Several [[XO-1.75]] prototypes were fitted with touchscreens for development. |
|||
The remainder of this page describes adding a touchscreen to an XO-1. The parts are probably no longer available. --[[User:Quozl|Quozl]] 02:00, 13 August 2013 (UTC). |
|||
{{outdated}} |
|||
== Technology == |
== Technology == |
||
Different touch screen technologies: |
Different touch screen technologies: |
||
Line 13: | Line 18: | ||
== Adding a Touch Screen to the XO == |
== Adding a Touch Screen to the XO == |
||
The XO has a 7,5 inches display |
The XO has a 7,5 inches display which is quite hard to find. |
||
An alternative is buy a 8 inches, touch screen( |
An alternative is to buy a 8 inches, touch screen(not wide). |
||
I bought mine at http://www.iiic.hk.cn/ (product A172129A1) which is of 4-Wire Resistive technology with a outside dimension of 172*129 mm a viewing area of 162*123 mm and a active area of 160*121 mm. |
|||
I have bought mine at http://www.iiic.hk.cn/ |
|||
Then you have to open the XO computer and remove the screws |
Then you have to open the XO computer and remove the screws by the lcd corners, then remove the rubber over them to obtain more space between the top plastic and the display. |
||
The touch screen comes with an usb controller, |
The touch screen comes with an usb controller, where we must a iron soldier to connect it to the USB port of the XO. |
||
We could obtain some free space |
We could obtain some free space under the display that permits to install the USB controller. |
||
The photographs bellow ilustrate this: |
|||
<gallery> |
<gallery> |
||
Image:DSC02894.JPG| |
Image:DSC02894.JPG|Soldering the USB controller |
||
Image:touch1.JPG| |
Image:touch1.JPG|All the components |
||
Image:touch2.JPG| |
Image:touch2.JPG|Touch screen over the display |
||
</gallery> |
</gallery> |
||
<nowiki> |
<nowiki> |
||
</nowiki> |
|||
== How to do == |
|||
This are the steps that you must do to have your touch screen working. |
|||
== How to do == <br /> |
|||
== Get starting == |
|||
First of all you have to make a [[Compiling_C/C%2B%2B_program_for_the_OLPC|root in a jail]], in order to install gcc, Makeutils and all the tools to generate binary files in the PC linking across the XO versions of the components. Another possibility is to use a virtual machine image. |
|||
== Get starting == <br /> |
|||
bash-3.2# wget http://dev.laptop.org/~dilinger/testing/kernel-2.6.25-20080925.1.olpc.f10b654367d7065.src.rpm <br /> |
|||
bash-3.2# mkdir /usr/src/redhat<br /> |
|||
bash-3.2# mkdir /usr/src/redhat/SOURCES<br /> |
|||
</nowiki> |
|||
== Compiling the kernel module of the Touch Kit == |
== Compiling the kernel module of the Touch Kit == |
||
into the root in the jail we need to compile the device driver tkusb.ko linking it with the correct kernel, so you have to download the correct kernel soruces that match with you XO kernel version. In this case the kernel version of my XO is 2.6.25, to know wich kernel version you have run ''uname -r'' in a terminal. |
|||
The following script will download the kernel sources 2.6.25 and install it. |
|||
bash-3.2# wget http://dev.laptop.org/~dilinger/testing/kernel-2.6.25-20080925.1.olpc.f10b654367d7065.src.rpm <br /> |
bash-3.2# wget http://dev.laptop.org/~dilinger/testing/kernel-2.6.25-20080925.1.olpc.f10b654367d7065.src.rpm <br /> |
||
Line 55: | Line 58: | ||
bash-3.2# rpmbuild -ba --define "dist olpc1" --define "olpc 1" --define "head dc5079fafb767e4" --target=i586 /usr/src/redhat/SPECS/olpc-2.6.spec <br /> |
bash-3.2# rpmbuild -ba --define "dist olpc1" --define "olpc 1" --define "head dc5079fafb767e4" --target=i586 /usr/src/redhat/SPECS/olpc-2.6.spec <br /> |
||
Download the touch screen drivers from http://www.touchkit.com/drivers/linux/TouchKit-2.03.1712-32b-k26-x14.tar.gz |
|||
In the Makefile of the touch usb chanhe KDIR for KDIR := /usr/src/redhat/BUILD/kernel-2.6.25/linux-2.6.25.i586/ |
|||
In the Makefile of tkusb.c change KDIR for KDIR := /usr/src/redhat/BUILD/kernel-2.6.25/linux-2.6.25.i586/ (or the correct) |
|||
this returns an error after making make, it is solved by adding {} at the end of the table, view http://forum.eeeuser.com/viewtopic.php?pid=175102 |
|||
If make returns an error, you could solve it by adding {} at the end of the table ''usb_device_id tk_table[]'' defined in the file tkusb.c, view http://forum.eeeuser.com/viewtopic.php?pid=175102 |
|||
Now you could run make, and this will generate the file tkusb.ko wich is the kernel module that implements the device driver |
|||
== Installing the driver == |
|||
make! |
|||
== tests for exporting environment variables == |
|||
bash-3.2# cp tkusb.ko /lib/modules/<br /> |
bash-3.2# cp tkusb.ko /lib/modules/<br /> |
||
Line 69: | Line 72: | ||
Code:<br /> |
Code:<br /> |
||
<nowiki> |
|||
## TouchKit kernel module section begin ##<br /> |
|||
## TouchKit kernel module section begin ## |
|||
rmmod touchkitusb<br /> |
|||
</nowiki> |
|||
## This module may be renamed “usbtouchscreen”.<br /> |
|||
<br /> |
|||
insmod /lib/modules/tkusb.ko <br /> |
|||
<nowiki> |
|||
rmmod touchkitusb |
|||
</nowiki> |
|||
<br /> |
|||
<nowiki> |
|||
## This module may be renamed “usbtouchscreen” ## |
|||
</nowiki> |
|||
<br /> |
|||
<nowiki> |
|||
insmod /lib/modules/tkusb.ko |
|||
</nowiki> |
|||
<br /> |
|||
<nowiki> |
|||
## for Kernel 2.6.x only.<br /> |
## for Kernel 2.6.x only.<br /> |
||
</nowiki> |
|||
## TouchKit kernel module section end ##<br /> |
|||
<br /> |
|||
<nowiki> |
|||
## TouchKit kernel module section end ## |
|||
</nowiki> |
|||
<br /> |
|||
== The Xorg == |
|||
Modify /etc/profile to add LD_LIBRARY_PATH<br /> |
|||
Modify /etc/bash.bashrc adding the content of libs.sh<br /> |
|||
You need to modify the xorg.conf to view the touch screen as a human interface device (HID). |
|||
Add this to the /etc/xorg.conf: |
|||
Section "InputDevice"<br /> |
|||
Identifier "EETI"<br /> |
|||
Driver "egalax"<br /> |
|||
Option "Device" "/dev/tkpanel0"<br /> |
|||
Option "Parameters" "/var/lib/eeti.param"<br /> |
|||
Option "ScreenNo" "0"<br /> |
|||
EndSection<br /> |
|||
then you have to copy the file egalax_drv.so to the directory /usr/lib/xorg/modules/input/ |
|||
== Closing and testing == |
|||
<gallery> |
|||
Image:Closed1.JPG|Work finished |
|||
</gallery> |
|||
You can see a little video of the result here:<br> |
|||
http://www.youtube.com/watch?v=_1OQYJfsRNA |
|||
== Contact == |
|||
aguirrea at gmail.com<br /> |
|||
santiagoreyesgonzalez at gmail.com |
|||
== see also == |
|||
[[Touchscreen] |
|||
== External Links == |
== External Links == |
||
* [http://docs.paperless-school.com/TouchScreenTechnology Touch Screen Technology] |
* [http://docs.paperless-school.com/TouchScreenTechnology Touch Screen Technology] |
||
* [http://www.touchkit.com/LinuxDriver.htm Touchkit drivers for linux] |
|||
[[category:peripherals]] |
[[category:peripherals]] |
Latest revision as of 02:03, 13 August 2013
The XO-4 has a touchscreen built in. Several XO-1.75 prototypes were fitted with touchscreens for development.
The remainder of this page describes adding a touchscreen to an XO-1. The parts are probably no longer available. --Quozl 02:00, 13 August 2013 (UTC).
Technology
Different touch screen technologies:
- 4-Wire Resistive
- 5-Wire Resistive
- Capacitive
- Surface Acoustic Wave
- Infrared
- Strain Gauge technology
- embedded ccd in panel - can't find link but light detectors can be intermixed with light generators, maybe on an oled display, so the computer can detect when light reflected
- A simple light sensor could also work as a display pointer. A tethered pen could detect flashed target boxes, like the old Nintendo Light Gun. For continuous drawing, the screen could flash through a series of patterns where the pen either sees light or dark. Each screen location would thus have a unique binary code flash through it, which would be reported by the pen's narrow light sensor. This screen scan will start in a small box near where the pen was last to reduce search time, and the eyesore of flickering. -- Nintendo wii remote has been hacked to provide multi touch interface-- http://gizmodo.com/gadgets/clips/wiimote-hack-is-wireless-multitouch-tv-321329.php
Apparently most PDA’s use 4-Wire Resistive touch screen technology. However I am not positive on this.
Adding a Touch Screen to the XO
The XO has a 7,5 inches display which is quite hard to find. An alternative is to buy a 8 inches, touch screen(not wide). I bought mine at http://www.iiic.hk.cn/ (product A172129A1) which is of 4-Wire Resistive technology with a outside dimension of 172*129 mm a viewing area of 162*123 mm and a active area of 160*121 mm. Then you have to open the XO computer and remove the screws by the lcd corners, then remove the rubber over them to obtain more space between the top plastic and the display. The touch screen comes with an usb controller, where we must a iron soldier to connect it to the USB port of the XO. We could obtain some free space under the display that permits to install the USB controller. The photographs bellow ilustrate this:
How to do
This are the steps that you must do to have your touch screen working.
Get starting
First of all you have to make a root in a jail, in order to install gcc, Makeutils and all the tools to generate binary files in the PC linking across the XO versions of the components. Another possibility is to use a virtual machine image.
Compiling the kernel module of the Touch Kit
into the root in the jail we need to compile the device driver tkusb.ko linking it with the correct kernel, so you have to download the correct kernel soruces that match with you XO kernel version. In this case the kernel version of my XO is 2.6.25, to know wich kernel version you have run uname -r in a terminal. The following script will download the kernel sources 2.6.25 and install it.
bash-3.2# wget http://dev.laptop.org/~dilinger/testing/kernel-2.6.25-20080925.1.olpc.f10b654367d7065.src.rpm
bash-3.2# mkdir /usr/src/redhat
bash-3.2# mkdir /usr/src/redhat/SOURCES
bash-3.2# rpm -ivh kernel-2.6.25-20080925.1.olpc.f10b654367d7065.src.rpm
bash-3.2# yum install redhat-rpm-config
bash-3.2# yum install m4
bash-3.2# yum install rpm-build
bash-3.2# yum install unifdef
bash-3.2# yum install tar
bash-3.2# rpmbuild -ba --define "dist olpc1" --define "olpc 1" --define "head dc5079fafb767e4" --target=i586 /usr/src/redhat/SPECS/olpc-2.6.spec
Download the touch screen drivers from http://www.touchkit.com/drivers/linux/TouchKit-2.03.1712-32b-k26-x14.tar.gz In the Makefile of tkusb.c change KDIR for KDIR := /usr/src/redhat/BUILD/kernel-2.6.25/linux-2.6.25.i586/ (or the correct) If make returns an error, you could solve it by adding {} at the end of the table usb_device_id tk_table[] defined in the file tkusb.c, view http://forum.eeeuser.com/viewtopic.php?pid=175102 Now you could run make, and this will generate the file tkusb.ko wich is the kernel module that implements the device driver
Installing the driver
bash-3.2# cp tkusb.ko /lib/modules/
bash-3.2# mknod /dev/tkpanel0 c 180 180
Add the following to /etc/rc.local
Code:
## TouchKit kernel module section begin ##
rmmod touchkitusb
## This module may be renamed “usbtouchscreen” ##
insmod /lib/modules/tkusb.ko
## for Kernel 2.6.x only.<br />
## TouchKit kernel module section end ##
The Xorg
You need to modify the xorg.conf to view the touch screen as a human interface device (HID). Add this to the /etc/xorg.conf:
Section "InputDevice"
Identifier "EETI"
Driver "egalax"
Option "Device" "/dev/tkpanel0"
Option "Parameters" "/var/lib/eeti.param"
Option "ScreenNo" "0"
EndSection
then you have to copy the file egalax_drv.so to the directory /usr/lib/xorg/modules/input/
Closing and testing
You can see a little video of the result here:
http://www.youtube.com/watch?v=_1OQYJfsRNA
Contact
aguirrea at gmail.com
santiagoreyesgonzalez at gmail.com
see also
[[Touchscreen]