touchscreen ts_calibrate

Started by anra, August 10, 2013, 07:32:20 PM

Previous topic - Next topic

anra

Hi
I am calibrating the Olimex touch Screen. I have followed the steps from tutorials....
I have stopped once I have installed tslib. At that point, it is necessary to use ts_calibrate to calibrate the screen. I can display the interface of ts_calibrate but it is unresponsive. I push over the crosshair using my finger but nothing happens. Of course, no pointercal file is created. I have to reset my board to start again.
On the other hand if I write on the terminal: cat /dev/input/event4 and then I push with my finger any place of the resistive surface I have an answer. It means there is not a hardware problem. Something happens about ts_calibrate. The ts_test has a similar behavior
At the same time I have my mouse and muy keyboard connected. Is that a problem for ts_calibrate...
any solution? thanks for your answer

anra

I have made a ssh connection and after writing in the terminal ts_calibrate I got:
xres:800, yres:480
tslib: Selected device is not a touchscreen (must support ABS and KEY event types)

Any ideas?

anra

I have tested the event4 using the command evtest. There is always un answer from a ABS event (when I touch the screen) but not from a key event (using my keyboard). I could be the origin of the message of error. But what is the solution?

anra

is there anyone who has been successful with the Olimex touch screen for a debian version  3.0.52+ ?

granite_crusher

#4
I succeeded twice: once with older official olimex debian image (i think realease 6, I don't remember what was kernel) and with latest olimex debian image release-7, where touch screen is installed and just need configuration. Do you use that image? or You compiled kernel yourself?

check out previous post about TS, I wrote there how event/input number variates due to other inputs (USB mouse/keyboard, etc) plugged in and present during boot. And I guess that is the problem, because number 4 for TS in event/input means you have connected keyboard,mouse etc (what did you have connected then you got that number?)... and if you are SHH'ing (through UART or network? USB dongle) into without these mouse and keyboard connected TS is recognised as event 1.

also when you SHH in, do  "dmesg | grep sun4i-ts" : this will show number of event TS is recognised after booting up. so if number match in event in input (environment configuration part) it should work.

anra

Hi granite
Where did you get the release 7?
I have bought a Olimex sd card with the image ready (debian 3.0.52). It is possible to know using the command: uname -a. Maybe they sold me an old release?

I am going to check without any usb input.... thanks

anra

hi granite
I have check without usb inputs.. you are right, in this case the touchscreen event is the event1. But changing the event4 by event1 in the /etc/environement file doesn't change the error message: "tsib selected device is not a touchscreen (must support ABS and KEy event types)"

ABS event are supported because I get un answer when I touch the screen. But if I connect the keyboard and write something there is not answer.... So event1 doesn´t support again key events... and consequently, I think, ts_calibrate doesn't work.

granite_crusher

the image is there, in Olimex wiki:
https://www.olimex.com/wiki/A13-OLinuXino#Linux
according your kernel version I guess it is the same image, so TS was installed, just not configured. maybe Installing it on top complicated things... or maybe You got in some part some typos? did you copy+pasted that error ereor message in your latest post ("tsib" or "tslib")? 
I couldn't succeed few times only because of typos... missing letter or one too much is really nasty thing. If you add things to /etc/environment they get working just after reboot, if you want to change environment without boot use export command.

anra

I didn't copy paste... it was a mistake writing...
If I can´t find a solution I will need to install the realise 7 in a new sd card and I will see if it works...

granite_crusher

hi anra,

I looked into this, and looks I can repeat/get same error message if I do mismatch event/input number intentionally (by some usb input) in environment variable. You have to be sure that these match just before starting calibration. If you have filled /etc/environment file before it's enough to do just "export TSLIB_TSDEVICE=/dev/input/event[your number : get it with "dmesg |grep sun4i-ts"]" and after do ts_calibrate, should work. As you will see in later steps X environment do not care  so much about event number (in conf file it uses "*" instead of static input number), but ts_calibrate, and ts_test requires match of numbers.

anra

hi granite
Thanks... yes, my TSLIB_TSDEVICE event matches the number from dmesg | grep sun4i-ts. If I touch the screen, I get an answer using the command: evtest /dev/input/event[number]  (or cat command). I think a touch event is called ABS event (not sure). It I plug my keyboard and I push a key, I dont get an answer with evtest. Consequently, I think the system is able to detect ABS event but not Key events..
On the other hand, I think, ts_calibrate needs to detect ABS and Key events in order to work. If one of them is not detected ts_calibrate doesn't work.
I would like to check other think: if the file pointercal is not big, could you write its content here? If ts_calibrate only is used to get the pointercal file I could use it and check if I can continue.... 

granite_crusher

well, as I did test and got that error in both ts_calibrate and ts_test. that KEY event error have nothing directly with keyboard. I just got other idea, didn't You forgot to provide flag while compiling? check if You have ts.conf in /usr/etc.
pointercal is very short, just one line: (it probably is not best calibration in the world:)
content of it:
-13272 11 53167752 -242 8639 -2342596 65536 800 480

(hmm, this is interesting 7 numbers not counting 800 and 480 which is LCD, I expected even number)

anra

Hi
I have used a new image (R7) using a 8Gb usd card. Now the touch screen is working.... Maybe the image installed in the sd card (I had bought) from Olimex https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-SD/open-source-hardware works but It dind't in my case (I can't say it was the image installed or my mistakes). My advice is to use the image from the R7.