Touchscreen

I am trying to configurate and to use a touchscreen with microtouch
protocol.

I have some questions. What are the basic steps to configure it?
I have read the devi-microtouch command, but when I launch it, it says
I need a /etc/system/trap/calib.localhost file.

Must I launch the calib command before launching devi-microtouch?
What is the format of that calib.localhost file?

Any help of people who have used and configurated a touch screen would be appreciated. My touch screen use the serial port. I am using 6.2.1 NC.

Thank you very much

You want to launch calib after you start devi-microtouch.

I have the touchscreen connected to serial port 1.
So, I have used:

devi-microtouch microtouch fd -d/dev/ser1

But nothing happens.
I am trying to use mouse and the touchscreen at the same time.
Is there any problem?

The touchscreen works at 9600,8,n,1 and I have tested it in Windows and
I have tested that when I touch the screen, data is received to serial
port 1 (in qnx with qtalk).

Any idea of what can be wrong?

Thank you very much.

Have you configured the port to the correct speed? I am not sure that devi-microtouch will change the baud rate. You can use stty to configure the port.

I have configured the port to the correct speed.
After starting devi-microtouch microtouch fd -d/dev/ser1,

With stty < /dev/ser1, I get:

Name: /dev/ser1
Type: serial
Opens: 2
+raw -hupcl
min=05 time=00
par=none bits=8 stopb=1 baud=9600 rows=0,0

When I touch the screen it seems as sometimes recognized it but theç
pointer go to the right-down side and doesnt move anymore.

Could be a problem in calibration file. What I dont understand is that
to start devi-microtouch a need a calib.localhost file that I can only
write it with calib, so I must start calib before I use devi-microtouch and
to calibrate with the mouse… :open_mouth:

My calib file (for a 800x600) is:

0x0: 799x599:0 797 -2 598 0

Thank you very much

It is a T-R121B 3M MicroTouch 12.1" resistive type touch screen

The calib utility sends a photon event out (which is caught by the input driver) that puts the driver into “raw” mode for absolute coordinate devices (i.e. touchscreens). Therefore there is no “chicken&egg” thing going on, as the calib utility simply displays a coordinate on the screen, and then reads the raw data from the device that is the result of your touching it. It then uses this to build the calibration file.

I am yet investigating why the touchscreen doesnt work with the
devi-microtouch driver.

As soon as I launch devi-microtouch, I look in pidin that only
two threads, number 2 and 3 are running…I dont know if this could be
a problem or could be a help to know if there is a problem.

I use a PS2 mouse and keyboard, in Windows everything is allright.
In qtalk I can see that when I touch on screen, characters are sended to
dev/ser1.

After booting from photon, I only write :

devi-microtouch microtouch fd -d/dev/ser1. I dont know if I need
something more or if I need to launch devi-hirun with different arguments
as QNX do in the startup to recognize the touchscreen…
I am quite confused…

Thank you very much

In order to debug you can try launching the driver with verbosity, and telling the abs filter to leave coordinates unchanged. You can then see if the coordinates look sensible.

devi-microtouch -vvvv microtouch fd -d/dev/ser1 abs -c

Thank you rgallen. That gives me more information and can show
you what I get typing:

devi-microtouch -vvvv microtouch fd -d/dev/ser1 abs -c

Looking up microtouch in module table
Looking up fd in module table
fd_parm: d
optarg: /dev/ser1
Looking up abs in module table
Calibration filename: /etc/system/trap/calib.DCC_NLES
Adding filter module: abs
Resetting module fd
Opened a serial device
Resetting module microtouch
Resetting module abs
Did not find calib info for [639x479]
Calibration parameters
sxl : 0 sxh : 639
syl : 0 syh : 479
rxl : 0 rxh : 0
ryl : 0 ryh : 0
interrogate bus, returning abs
interrogate bus, returning abs
Attempting to determine graphics region dimensions
Found graphics region owned by local hardware
Graphics region dimensions are 0:0 799:599
Issuing devctrl to abs
Did not find calib info for [799x599]
Calibration parameters
sxl : 0 sxh : 799
syl : 0 syh : 599
rxl : 0 rxh : 0
ryl : 0 ryh : 0

Some questions:

What file is asking for when it says did not find calib info for [639x439] ?

When I press on screen the raw data changes but no button in
recognized.

In the Help of QNX, in the “Writing an Input Device” section it says
the calibration file is needed in /etc/config/trap, while calib write it in
/etc/system/trap. Which one is correct ? :open_mouth:

I show you (I hope it helps you) the raw data I get when I press on screen from lower right side to upper right side (only one time).