Labels

Showing posts with label Touch screen. Show all posts
Showing posts with label Touch screen. Show all posts

13/04/2012

Modify booting scrip for Gumstix Overo Tide COM

The Tide COM has no NAND built in. When I try to change environment parameter, such as rotate screen or change default display, it just won't work.

The solution is to create a boot command file, e.g. ubootenvcmd, and add it into a boot.scr.

Here is how I do it:

1) create a ubootenvcmd file by using gedit. The content is something like:

setenv ethaddr 00:00:00:FF:FF:FF
setenv mpurate 720
setenv vram 4M
setenv linuxmem 176M
setenv defaultdisplay lcd43
setenv dvimode 480x272MR-16@60
setenv mmcargs ${mmcargs} omapfb.rotate=1
setenv bootcmd 'mmc init; run loaduimage; run mmcboot'
boot

2) install mkimage:
$ sudo apt-get install uboot-mkimage

3) create boot.scr file:
$ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Overo boot script" -d ubootenvcmd boot.scr

ps. remember to put the ubootenvcmd file in current directory.

4) copy boot.scr to your FAT partition of your SD card.

Done :)

07/12/2011

Rotate Gumstix Overo Touch screen

Go to u-boot environment settings,

Overo # setenv mmcargs setenv bootargs console=${console} mpurate=${mpurate} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.debug=y omapdss.def_disp=${defaultdisplay}  omabfp.rotate=1 root=${mmcroot} rootfstype=${mmcrootfstype}

Overo # saveenv
Overo # reset

ps: 1 --- 90°     2 --- 180°     3 --- 270°

------------------------------
Several month later when I tried to rotate my another gumstix fire + LG4.3" screen, it doesn't work!

finally, I found at this time, the default dvimode was 1024x768. I have to change it back to 4.3" screen resolution, which is 480x272.


#dvimode=480x272MR-16@60

25/08/2011

Gumstix touch screen problem


I re-installed file system (2Gb SD card) for my Overo gumstix. After i booted from SD, I found the touch screen did not work. So, I had a look in /dev/input directory. I can only see 'mice' in this folder, no 'touchscreen0'.

Then I tried different way to solve the problem. I tried:
$ nand erase 240000 20000
$ reset

When I booted gumstix, the back light of screen turned on, but nothing displays on the screen.  I can see 'touchscreen0' in /dev/input.  I tried '/usr/bin/ts_test'. This command can detect the position when i touched screen, but just no display.

I thought my screen was faulty.

After that, I took a look the u-boot environment:

# printenv
dvimode=1024x768MR-16@60
defaultdisplay=dvi

DVI? The touch screen I am using is LCD!

Ok, changed it to:
# setenv defaultdisplay lcd43
# saveenv
# boot

Haha, screen is working.

11/10/2010

Touch Screen (Gumstix)

Calibrate the screen:
$ cd /usr/bin
$ ts_calibrate

when I run my Qt project, the mouse curse is still incorrect. That's because the Qt does know which touch screen library can be used.
//$ export QWS_DISPLAY="VNC:LinuxFB"
$ export QWS_MOUSE_PROTO="tslib:/dev/input/touchscreen0"

Hint 1: in /~ directory, ".profile" contains commands to be executed after log on.
Therefore, I can add these two export files in ".profile" to load these two command lines automatically when I log in. Alternative, ".bashrc" file does the same job as ".profile" does.

Hint 2: In almost Linux system (except Ubuntu), system checks /etc/inittab file first when start pc. You can tell which run level is the default from it. Normally rc5 is the default run level. You can add you own applications in rc5.d/S99xxx. The system will run these applications automatically (before log in step).
EDIT:
system will run rcS.d first, then rc5.d

a) applications should be added after "rm nologin"

#! /bin/sh
#
# rmnologin     This script removes the /etc/nologin file as the last
#               step in the boot process.
#
# Version:    @(#)rmnologin  1.00  22-Jun-1998  miquels@cistron.nl
#

if test -f /etc/nologin.boot
then
        rm -f /etc/nologin /etc/nologin.boot
fi

# add from here
export QWS_DISPLAY="VNC:LinuxFB"
export QWS_MOUSE_PROTO="tslib:/dev/input/touchscreen0"
/home/czhang/m4 -qws &

: exit 0

b) applications should followed by '&' to make sure they all run on the background, and not affect the login step.

/home/czhang/m4 -qws &


Note: Qt has a build in vnc. we can remotely view the program running on gumstix screen.
I installed vncviewer on my ubuntu machine, and run as:
$ vncviewer 10.0.0.xx      (gumstix IP address)


----------------------------
To use standard USB mouse in gumstix, use following command:
$ export QWS_MOUSE_PROTO= Auto


16/02/2010

Install eGalax touch screen in Linux (Fedora)

The installation on Fedora is much easier than on Ubuntu.
(Install on Ubuntu: http://oestudyard.blogspot.com/2009/11/install-egalax-touch-screen-in-linux.html)

Check Linux kernel version and X version in a terminal window.
$ uname - r   # To check kernel version
or
$ X - version # To check X version


Download touch screen file:
http://home.eeti.com.tw/web20/eGalaxTouchDriver/linuxDriver.htm


When I do setup.sh, I got error message:

 (*) Linux driver installer for eGalax Touch controller

(I) Check user permission: root, you are the supervisor.
(I) Begin to setup the eGalax Touch driver.
(I) Extract eGalax Touch driver archive to /usr/local/eGalaxTouch32.
(I) Create eGalaxTouch utility shortcut in /usr/bin.
(I) Create TKCal tool shortcut in /usr/bin.
(I) Check X window version: 1.6.x
(I) Copy X module: x16/egalax_drv.so to /usr/lib/xorg/modules/input.

(Q) Which interface controller do you use?
(I) [1] RS232 [2] PS/2 [3] USB : 3
(I) Using interface: USB
(I) Found a HID compliant touch controller.

(I) Removed eGalax Touch driver archive from /usr/local/eGalaxTouch32.
(I) Removed eGalaxTouch utility shortcut.
(I) Removed TKCal tool shortcut.
(I) Removed X module.
(E) No X configuration file found.


That is because  Fedora releases since Fedora 10 do not create a /etc/X11/xorg.conf file, used to configure the X server, by default. 

Right, I need to create xorg.conf file manually.
goto system --- administrator --- add/remove software
install system-config-display

After that, do sh setup.sh again.
root
run eGalaxTouch to calibrate the touch screen.
Done!!!



27/11/2009

Install eGalax touch screen in Linux (Ubuntu)

Linux *Ubuntu 下安装触摸屏驱动
** special thanks to Kekezu **
(Install on Fedora: http://oestudyard.blogspot.com/2010/02/install-egalax-touch-screen-in-linux.html)

I made this touch screen (8" 800Y-Y-V USB control) works on Ubuntu 9.04 2.6.28-16-generic.

Step1) Download required packages and TouchKit utility
$ sudo apt-get install linux-source
$ cd ~
$ wget http://shop-on-line.tvielectronics.com/download/TouchKit-2.06.2905-32b-k26.tar.gz


Step2) Installing TouchKit utility
$ sudo chmod -x TouchKit-2.06.2905-32b-k26.tar.gz
$ sudo tar -xzvf TouchKit-2.06.2905-32b-k26.tar.gz
$ cd eGalaxTouch32
$ sudo sh setup.sh

Utility will be installed to /usr/local/eGalaxTouch32/

Step3) Building the tkusb module

$ cd /usr/src
$ uname -r  # Checks linux kernel version
$ sudo chmod -x linux-source-2.6.xx.tar.bz2  # Change xx
$ sudo tar -xjvf linux-source-2.6.xx.tar.bz2 
$ sudo cp ./linux-headers-`uname -r`/Module.symvers ./linux-source-2.6.xx   
$ sudo ln -s linux-source-2.6.xx /usr/src/linux
$ cd /usr/src/linux
$ sudo make oldconfig
$ sudo make prepare
$ sudo make modules SUBDIRS=scripts/mod/
$ cd /usr/local/eGalaxTouch32/USBSrc

$ sudo gedit Makefile


Around line 16, find

KDIR := /lib/modules/$(shell uname -r)/build

Replace this line with

KDIR := /usr/scr/linux


$ sudo gedit tkusb.h
around line 25, find
include ams/semaphore.h

Replace this line with

include

$ sudo make all
$ sudo cp tkusb.ko /lib/modules

Step4) Modifying file /etc/X11/xorg.conf

$ sudo gedit /etc/X11/xorg.conf

Change Option "Device" to "usbauto" in InputDevice section of touch screen

Part of the file xorg.conf

...
Section InputDevice
Identifier "EETI"
Option    "Device"    "usbauto"
...
EndSection
...

PS: someone told me that the xorg.conf file has been deprecated in favor of a more XML type configuration on his Ubuntu 9.10. He ended up to create an empety xorg.conf file.


Step5) Making startup script to load the module

$ sudo gedit /etc/init.d/addTouchKit

Content of file addTouchKit

#! /bin/sh
rmmod /lib/modules/'uname -r'/kernel/drivers/hid/usbhid/usbhid.ko
insmod /lib/modules/tkusb.ko
sleep 1
insmod /lib/modules/'uname -r'/kernel/drivers/hid/usbhid/usbhid.ko


$ sudo update-rc.d addTouchKit defaults
$ sudo chmod 441 /etc/init.d/addTouchKit

Now panel is installed. Reboot your computer.

Step6) Starting utility and calibrating the panel

$ cd /usr/local/eGalaxTouch32
$ ./eGalaxTouch

Here are some screen shots of the touch screen calibration window





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am a student. If you feel this page is quite useful, 
do you mind click the ad (just once) on the right hand side :)
I appreciate your support ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~