Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#358549 - 07/05/2013 20:00 Trying to install touchscreen driver on RPi
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
This one's especially for Mark or one of the other Linux gurus here. smile

I've received my first Raspberry Pi last week and am now slowly taking my first baby steps with Linux and the command line. I was able to create the necessary SD card and set the keyboard to belgian keyboard through the command line without too much trouble.

The reason I've bought this RPi is to function as a terminal in my home automation system. See, I have an in-wall touch screen monitor (this one : iEi ISDM-150G-USB-R11/T-R)) which works with DVI for the video signal and USB for the touch control. I've used this monitor in the past with Windows and it works fine as a touch screen.

But now I want to use it with the RPi and basically, all it'll have to to it keep a certain web page open full screen, which links to the LAN IP address of the home automation system. Via the browser, most of the settings are available then (light on/off, blinds up/down etc...) I want to use to RPi for this because of it's low power consumption and as said, all I want it to do is keep that webpage open and put the monitor in standby after one minute of not using it, so I can:
-touch the monitor to wake it up
-enable the desired function (eg. lights in kitchen on)
-leave the monitor be so it goes back to sleep after one minute to preserve power.

For this I have to install the Linux driver for the touch screen. This is where things get ugly. I have absolutely ZERO experience with installing stuff though the command line and about everything I've tried failed.

This is what I've tried so far:
There's lots of subdirectories in the /Linux folder of the installation CD, but I used the /Debian folder because I figured Wheezy on the RPi is Debian anyway, right?
I used the Debian_K26.tar.gz file (there's also a Debian_K24.tar.gz) because I figured this is the file that is probably the most recent.

(For easier reference, I've copied the entire /Debian folder to my dropbox account. here's the link to view it)

I followed the instructions in that installation notes PDF, but they don't work. I get all sorts of errors.

I was able to un-tar the archive (don't laugh! smile )
I was able to get into SU mode (which isn't straightforward with a RPi)
I was able to run the "make new" command in the "/touchkit/include" folder successfully.
But then when I go back to the "/touchkit" folder to type "make all", it doesn't work any more. Then the errors start showing up.

Anybody can point me in the right direction? Thanks!
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#358551 - 08/05/2013 00:23 Re: Trying to install touchscreen driver on RPi [Re: BartDG]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
This is a bit more specialized than "simply a Linux question." smile
You are trying to set up a specialized chunk of hardware on a Raspberry Pi. The RP is nothing special -- Linux is pretty much the same regardless of the hardware platform. But I know nothing of the touchscreen or its driver. Hopefully somebody else here can chime in about that though.

Cheers

Top
#358554 - 08/05/2013 06:24 Re: Trying to install touchscreen driver on RPi [Re: mlord]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
What are the errors?

What OS have you got on the RPi? (I'm assuming debian...but...you never know).

At a guess you're probably missing the kernel headers or something, but without seeing the errors it's pretty difficult to know.

Top
#358555 - 08/05/2013 10:14 Re: Trying to install touchscreen driver on RPi [Re: sn00p]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
Ok, understandable. Thanks for trying to help me out!

I'm running the most recent version of "Raspbian Wheezy", which is indeed an for RPi optimized version of Debian.

This is what the installation file of the Debian Linux driver says:


Installation Note
1. Please extract the driver source code firstly. Unzip “debian.tar.gz” to a
temp working folder.
2. Enter terminal mode and change to root account by this command. ( su )
3. Rebuild the TouchKit driver.
3.1) Locate the extracted directory. And go to the subdirectory
/touchkit/include then type make new
3.2) change the directory to /touchkit then type make all
The touchKit driver will be rebuild. ( Some packages must be
installed and well configured ).
3.3) type make install to begin to install at the same directory /touchkit
4. Edit the daemon configuration file “/etc/tpaneld.conf” if there is no device
port you want. The configuration should contain some parameters
description as below
MouseMode = DRAWING
DblClickSpeed = 18
DblClickArea = 30
RclickTool = 0
Sound = 0
Port = /dev/ttyS0
Port = /dev/ttyS1
Port = /dev/psaux
Port = /dev/tkpanel0
Port = /dev/tkpanel1
The daemon tpaneld will scan the ports list in the configuration file to
check if touchscreen controller exists or not.
/dev/tkpanel0 and /dev/tkpanel1 are used for USB model.
5. Reboot



And this is the result if I enter these commands:

Code:
pi@raspberrypi ~ $ su
Wachtwoord: 

root@raspberrypi:/home/pi# cd touch/touchkit/include
root@raspberrypi:/home/pi/touch/touchkit/include# make new
rm -f configSTR.h configSTR.mak configINT.h configINT.mak touch.tcl
tclsh ../utility/tcl2h.tcl configSTR.tcl > configSTR.h
tclsh ../utility/tcl2mak.tcl configSTR.tcl > configSTR.mak
tclsh ../utility/tcl2h.tcl configINT.tcl > configINT.h
tclsh ../utility/tcl2mak.tcl configINT.tcl > configINT.mak
tclsh ../utility/ini2tcl.tcl touch.ini > touch.tcl

root@raspberrypi:/home/pi/touch/touchkit/include# cd ..
root@raspberrypi:~# cd /home/pi/touch/touchkit

root@raspberrypi:/home/pi/touch/touchkit# make all
for n in include driver utility xf86drv diag usb; do				\
		make -C $n || exit 1;		\
	done
make[1]: Map '/home/pi/touch/touchkit/include' is entered
make[1]: There's nothing to do there for 'all'.
make[1]: Map '/home/pi/touch/touchkit/include' is abandoned
make[1]: Map '/home/pi/touch/touchkit/driver' is entered
for t in tpaneld; do				\
		if [ -f $t ];  then			\
			cp -f $t bin;				\
		fi;								\
	done
make[1]: Map '/home/pi/touch/touchkit/driver' is abandoned
make[1]: Map '/home/pi/touch/touchkit/utility' is entered
for t in PanelInfo WriteConf; do				\
		if [ -f $t ];  then			\
			cp -f $t bin;				\
		fi;								\
	done
make[1]: Map '/home/pi/touch/touchkit/utility' is abandoned
make[1]: Map '/home/pi/touch/touchkit/xf86drv' is entered
make -s proceed
make[2]: Map '/home/pi/touch/touchkit/xf86drv' is entered
###############################################################
##  XF86 src does NOT exist; use precompiled binary instead  ##
###############################################################
make[2]: Map '/home/pi/touch/touchkit/xf86drv' is abandoned
if [ 11 -gt 400 ]; then				\
		if [ -f touchkit_drv.o ]; then			\
			cp -f touchkit_drv.o bin;			\
		fi;								\
	else									\
		if [ -f xf86TouchKit.so ]; then			\
			cp -f xf86TouchKit.so bin;			\
		fi;								\
	fi
make[1]: Map '/home/pi/touch/touchkit/xf86drv' is abandoned
make[1]: Map '/home/pi/touch/touchkit/diag' is entered
make[1]: Nothing to do here for 'all'.
make[1]: Map '/home/pi/touch/touchkit/diag' is abandoned
make[1]: Map '/home/pi/touch/touchkit/usb' is entered
make -C /lib/modules/3.6.11+/build SUBDIRS=/home/pi/touch/touchkit/usb modules
make: An unknown map is entered
make: *** /lib/modules/3.6.11+/build: File or map does not exist. Stopped.
make: An unknown map is abandoned.
make[1]: *** [build_module] Error 2
make[1]: Map '/home/pi/touch/touchkit/usb'is abandoned
make: *** [all] Error 1

root@raspberrypi:/home/pi/touch/touchkit# make install
(*) Install touch panel daemon [/usr/bin/tpaneld]
/bin/sh: 6: pushd: not found
/bin/sh: 9: popd: not found
(*) Install configuration utility [/usr/bin/touchcfg]
(*) Install XFree86 driver [/usr/X11R6/lib/modules/input/touchkit_drv.o]
cp: Cannot create normal file ‘/usr/X11R6/lib/modules/input/touchkit_drv.o’ : File or folder does not exists
chmod: cannot access ‘/usr/X11R6/lib/modules/input/touchkit_drv.o’: File or folder does not exist
make[1]: *** [_install] Fout 1
make: *** [install] Error 2

root@raspberrypi:/home/pi/touch/touchkit# 


Does that tell you what you need to know?
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#358558 - 08/05/2013 15:33 Re: Trying to install touchscreen driver on RPi [Re: BartDG]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: Archeon
I used the Debian_K26.tar.gz file (there's also a Debian_K24.tar.gz) because I figured this is the file that is probably the most recent.

The K26 and K24 are most likely in reference to the kernel versions of 2.6.X and 2.4.X.

Top
#358559 - 08/05/2013 15:50 Re: Trying to install touchscreen driver on RPi [Re: BartDG]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Code:
make[1]: Map '/home/pi/touch/touchkit/xf86drv' is entered
make -s proceed
make[2]: Map '/home/pi/touch/touchkit/xf86drv' is entered
###############################################################
##  XF86 src does NOT exist; use precompiled binary instead  ##
###############################################################
make[2]: Map '/home/pi/touch/touchkit/xf86drv' is abandoned

That big banner message there says you need the source to XF86 (xfree86), to compile this driver, and without it, you'll have to use a pre-compiled binary. I don't, off the top of my head, know what the correct devel package is for that.

Code:
make -C /lib/modules/3.6.11+/build SUBDIRS=/home/pi/touch/touchkit/usb modules
make: An unknown map is entered
make: *** /lib/modules/3.6.11+/build: File or map does not exist. Stopped.
make: An unknown map is abandoned.
make[1]: *** [build_module] Error 2
make[1]: Map '/home/pi/touch/touchkit/usb'is abandoned
make: *** [all] Error 1

I'm not sure about this -- looks like the directory doesn't exist? Maybe fallout from the above.

Code:
root@raspberrypi:/home/pi/touch/touchkit# make install
(*) Install touch panel daemon [/usr/bin/tpaneld]
/bin/sh: 6: pushd: not found
/bin/sh: 9: popd: not found

pushd and popd are built-in shell commands. They don't exist in "sh", but they do in "bash". So, my guess here is that you might try running the make stuff again in a bash shell. I know nothing about changing shells on an RPi, as I don't have one.

Code:
(*) Install configuration utility [/usr/bin/touchcfg]
(*) Install XFree86 driver [/usr/X11R6/lib/modules/input/touchkit_drv.o]
cp: Cannot create normal file ‘/usr/X11R6/lib/modules/input/touchkit_drv.o’ : File or folder does not exists
chmod: cannot access ‘/usr/X11R6/lib/modules/input/touchkit_drv.o’: File or folder does not exist
make[1]: *** [_install] Fout 1
make: *** [install] Error 2

This is fallout from not having the XF86 source available.

Top
#358562 - 08/05/2013 17:10 Re: Trying to install touchscreen driver on RPi [Re: canuckInOR]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
Originally Posted By: canuckInOR

That big banner message there says you need the source to XF86 (xfree86), to compile this driver, and without it, you'll have to use a pre-compiled binary. I don't, off the top of my head, know what the correct devel package is for that.


Ok, so I need to install xfree86 on the RPi?
Hmmm, this is a challenge. smile I have no idea what XFree86 is, or what is does for that matter. But it's mere name to me inplies that it's meant for x86 CPU's, which the RPi doesn't have.

Also, when I read on the Xfree86 site, it says it's an open-source implementation of the X Window System. But doesn't the RPi already have X Window? (the command to start the graphical interface is "startx" anyway)

Also, a side question: how can I tell if certain software is already installed on the PI? Is there an easy way to do that? I'm guessting the Aptitude Package Manager does this, but it's text only and not very straightforward. (well, to me anyway)

Second question: if I end up not being able to compile this driver because XFree86 cannot be installed on the PI, this means I have to use a pre-compiled binary. Is such a file also present in de /Debian directory of the installation CD, or do I have to find this somewhere else? Maybe in a directory of a different Linux distro. I've now uploaded the whole /Linux directory to my Dropbox, so you can see every Linux driver that's available to me. Click!


Originally Posted By: canuckInOR

pushd and popd are built-in shell commands. They don't exist in "sh", but they do in "bash". So, my guess here is that you might try running the make stuff again in a bash shell. I know nothing about changing shells on an RPi, as I don't have one.


This is strange, because when I check what shell comes with the PI (echo $SHELL), it says /bin/bash. Maybe it's a "bash light"?

Thanks for your feedback!
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#358563 - 08/05/2013 17:58 Re: Trying to install touchscreen driver on RPi [Re: BartDG]
julf
veteran

Registered: 01/10/2001
Posts: 1307
Loc: Amsterdam, The Netherlands
Originally Posted By: Archeon
[quote=canuckInOR]Also, when I read on the Xfree86 site, it says it's an open-source implementation of the X Window System. But doesn't the RPi already have X Window? (the command to start the graphical interface is "startx" anyway)


Yes, but only the binaries. Your software seems to be asking for the source package.

Top
#358564 - 08/05/2013 18:34 Re: Trying to install touchscreen driver on RPi [Re: julf]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Kernel 2.4 or 2.6? (Your Pi is running 3.6.) Monolithic XFree86? (Modular XOrg has been around for ages.) I'm sorry to say that unless you can find a driver package for a much newer environment, you're not likely to get this thing to work.

Can you plug the thing in to your Pi and then issue the "lsusb" command? Maybe its VID and PID are nowadays supported by one of the mainstream Linux USB touchscreen drivers.

Peter

Top
#358566 - 08/05/2013 18:40 Re: Trying to install touchscreen driver on RPi [Re: BartDG]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: Archeon
I have no idea what XFree86 is, or what is does for that matter. But it's mere name to me inplies that it's meant for x86 CPU's, which the RPi doesn't have.

IIRC, it did get its name due to it being a port of X Windows to the x86 platform, but it's no longer restricted to running on the x86 platform.

Quote:
Also, a side question: how can I tell if certain software is already installed on the PI? Is there an easy way to do that? I'm guessing the Aptitude Package Manager does this, but it's text only and not very straightforward. (well, to me anyway)

Yes, aptitude will do what you're asking. When you start it up, it'll present you with a short (collapsed) tree. Expand/collapse entries in the tree using Enter. That's about all I know of it -- I use 'apt-get' and other command-line tools for everything else.

Quote:
Second question: if I end up not being able to compile this driver because XFree86 cannot be installed on the PI, this means I have to use a pre-compiled binary. Is such a file also present in de /Debian directory of the installation CD, or do I have to find this somewhere else?

You would have to find it somewhere else. You might want to google for this + RPi -- maybe someone else has already done this? You *might* be able to use one of the other pre-compiled binaries (those .sh files are shell scripts that contain uuencoded binaries), but it would be a total crap-shoot.

Originally Posted By: Archeon
Originally Posted By: canuckInOR

pushd and popd are built-in shell commands. They don't exist in "sh", but they do in "bash". So, my guess here is that you might try running the make stuff again in a bash shell. I know nothing about changing shells on an RPi, as I don't have one.

This is strange, because when I check what shell comes with the PI (echo $SHELL), it says /bin/bash. Maybe it's a "bash light"?

Oh -- brain fart on my part. make runs commands in /bin/sh. That's often a symlink to some other shell. For example, on my desktop:
Code:
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2010-05-12 11:54 /bin/sh -> dash

More than likely, your /bin/sh is *not* pointing at bash. So, you can fix it by either changing that symlink (ln -fs bash /bin/sh) or by mucking with the makefile.

Top
#358567 - 08/05/2013 18:51 Re: Trying to install touchscreen driver on RPi [Re: peter]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
Originally Posted By: peter
Kernel 2.4 or 2.6? (Your Pi is running 3.6.) Monolithic XFree86? (Modular XOrg has been around for ages.) I'm sorry to say that unless you can find a driver package for a much newer environment, you're not likely to get this thing to work.

I've been reading up on this, and I start to fear the same. It seems XFree86 has stopped in 2008 as a project. This was about the same time I bought this monitor, so that makes sense. (and it seems the drivers date back to 2006, which is ancient of course)
Originally Posted By: peter

Can you plug the thing in to your Pi and then issue the "lsusb" command? Maybe its VID and PID are nowadays supported by one of the mainstream Linux USB touchscreen drivers.

Very good point. I haven't tried connecting the Pi yet, because the touch screen display is already installed into the wall and I'd have to remove it in order to do that. But I'll give it a try tomorrow.
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#358585 - 10/05/2013 11:35 Re: Trying to install touchscreen driver on RPi [Re: peter]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
Originally Posted By: peter

Can you plug the thing in to your Pi and then issue the "lsusb" command? Maybe its VID and PID are nowadays supported by one of the mainstream Linux USB touchscreen drivers.

Ok, hooked the Pi to the touch screen monitor and connected the USB. Ran the lsusb command, and this is what came up:

Code:
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen


Device 004 is the unifying receiver of my wireless Logitech K800 keyboard, which works nicely after adding a config file. The added benefit here is that I only use up one USB port for both keyboard and mouse.

Device 005 is the touch screen monitor. Does this string give you the info you need?
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#358586 - 10/05/2013 12:13 Re: Trying to install touchscreen driver on RPi [Re: BartDG]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: Archeon

Code:
Bus 001 Device 005: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen

Device 005 is the touch screen monitor. Does this string give you the info you need?

Yes. That touchscreen is supported by the Linux kernel as a standard USB touchscreen, and/or as a HID mouse. You shouldn't need any special drivers for it.

Peter

Top
#358587 - 10/05/2013 12:59 Re: Trying to install touchscreen driver on RPi [Re: peter]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
Nice, so there is hope after all! smile
No to just get it working... How do I go about this?

Oh, and canuckInOR, thank you for your post as well, it was helpful! I must have overlooked it yesterday, sorry about that!

Edit: I'm getting closer! Thanks to this blogpost I was already able to make it work. The only problem is the screen is not calibrated now, and the "xinput_calibrator" utility doesn't work as it should. I can run it, but after tapping the 4 points on the screen, I don't receive the message with the calibration data. So I can't put it in a configuration file. No idea what's going wrong here: the configuration utility just seems to quit back to desktop after the tapping of the 4 points.

But I can tell you that, after the calibration, I can use the screen as it should ; it's just that the values are not remembered after reboot. I'll look further into this and keep you guys updated. smile


Edited by Archeon (10/05/2013 14:23)
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top
#358588 - 10/05/2013 14:52 Re: Trying to install touchscreen driver on RPi [Re: BartDG]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Is the calibration config file simple enough that you can just edit the file yourself and experiment with it, rather than needing to run the calibrator utility?

Or can you plug the touchscreen into a Linux PC with a working calibrator and copy the config file over?
_________________________
Tony Fabris

Top
#358589 - 10/05/2013 15:57 Re: Trying to install touchscreen driver on RPi [Re: tfabris]
BartDG
carpal tunnel

Registered: 20/05/2001
Posts: 2616
Loc: Bruges, Belgium
No, but I'm getting closer. I managed to find the values and put them in a file. Now the only remaining problem is the reversing of the axis. Stay tuned. smile

Edit : And... success!!! I got it to work!! Yay! smile

Now, the only thing I still want to know is if there is a way to RIGHTclick on icons with touchscreen. This was possible with the Windows driver, so I'm hoping this is possible in Linux as well... But those are problems for later, right now, I'm very chuffed. smile
_________________________
Riocar 80gig S/N : 010101580 red
Riocar 80gig (010102106) - backup

Top