0

I have been stuck on making ubuntu to recognize an old Elo TouchScreen. After a lot of reading/testing i managed to detect the touchscreen using screen:

sudo screen /dev/ttyS4 

ttyS4 = COM5 where the touchscreen is connected. After executing this command i get to touch the screen and it draws weird characters on the screen, which in my understanding is that ubuntu recognize the device. Then i'm suppossed to attach the touchscreen with inputattach:

inputattach -elo /dev/ttyS4

But nothing happens. Either i get not action at all or it just get stuck without any result, and i even can't draw anymore when touching the screen again. Before it was even telling me:

inputattach: can't set line discipline

Which according to https://forums.gentoo.org/viewtopic-p-6406944.html is fixed by going into my kernel config and make sure the serial line discipline is enabled.

Sounds easy but i 'm not an experimented user so can you tell me how do i do that or if there is any suggestion or alternative solution that i could take?

Specs: Ubuntu 18.04. Device: Point Of Sale Model 430/435 with B55/B75 M/B wich according to user manual has an elotouch monitor. Video driver only doing 640X480 resolution and it suppossed to do at least 800X600.

I have also tried to install several linux drivers from elo website without any luck. Originally this device was running WinXp SP2 but a friend brought me and ask me to update the device to a better OS. So it's been a kind of long but fun journey :)

Any help will be appreciated.

Update #1 I didn't know i could add 2 options at the same time to the inputattach command. So i tried: --daemon --always like this:

sudo inputattach --daemon --always -elo /dev/ttyS4

And it started to work, it recognized each touch. So i went to edit the inputattach file located at /lib/udev/rules.d/60-inputattach.rules in order to save the configuration for every boot, and added the line:

SUBSYSTEM=="tty", KERNEL=="ttyS4", ACTION=="add|change", RUN+="/lib/udev/inputattach --elo /dev/%k" I rebooted, the line is still there but not effects at all, just not working and i can't manage to make it work again :(

Tried to add several lines to that file:

SUBSYSTEM=="tty", KERNEL=="ttyS4", ACTION=="add|change", RUN+="/lib/udev/inputattach --elotouch /dev/%k"

SUBSYSTEM=="tty", KERNEL=="ttyS4", ACTION=="add|change", RUN+="/lib/udev/inputattach --elotouch /dev/%k --daemon --always"

SUBSYSTEM=="tty", KERNEL=="ttyS4", ACTION=="add|change", RUN+="/lib/udev/modprobe elo" RUN+="/lib/udev/inputattach --elotouch /dev/%k --daemon --always"

Still no luck. I keep getting response with screen command, but apart from that nothing happens :( I'm close to the solution and sure i'm missing something basic here... Thanks again


UPDATE #2 Reason why it stopped to give me response: I mixed the commands variations. The one that recognize when touching the screen was another. Summing it up:

I went ahead and tried several combinations of inputattach first entering modprobe elo and then tested again without it. And my conclusion is that modprobe elo //does nothing on my end

So, the only combination when i get response is: (no need of modprobe or screen commands before. Since modprobe does nothing and screen is only for detecting the right port COM4 = ttyS4 in my case)

sudo inputattach --daemon --always --mtouch /dev/ttyS4 

--mtouch = MicroTouch (3M) touchscreen. (you can find all the inputattach compatible devices typing: inputattach --help.

The response is not good enough. Each time i touch the screen it seems like if i'm using a normal mouse and left cliking and selecting some area. (I guess this is what the mtouch device does), so it isn't good enough for me.

However, I tried to calibrate the screen using:

sudo apt-get install xinput-calibrator
sudo xinput_calibrator

I see the 4 points in each corner but is impossible to touch it in the right place in order to calibrate it. So what i did is connected a normal usb mouse and calibrated the screen clicking with it. After that, each touch isn't accurate yet but i least i have values for X and Y Max/Min.

So after more research my second solution was trying to calibrate it myself calculating the TransformationMatrix but I have no idea how. So far:

xinput --list

//Gives me the device name and the id MicroTouch Serial Touch Screen | ID=12

Then xinput --list-props 12 gives me the TransformationMatrix that i'm supposed to add to the file: /etc/X11/xorg.conf.f/99-calibration.conf like this:

Section "InputCalls"
Identifier "calibration 
MatchProduct "MicroTouch Serial Touch Screen"
Option "TransformationMatrix" "1 0 0 0 1 0 0 0 1" #Got this values after calibrating the screen clicking with my mouse on each corner point (xinput_calibrator)
Option "MinX" "299"
Option MaxX"  "65492"
Option "MinY" "705
Option "MinX" "66058"
EndSection

Problems:

  • Even though i don't mind, this is not my device driver and maybe is just not going to work properly.
    • I'm not sure how to re-calculate that TransformationMatrix to the proper calibration axis.
    • Even if i managed to recalculate that Matrix, I don't know where the xorg config file is, since is not in /user/share/X11/xorg.conf.d neither and i'm not sure that the file i created is actually doing something.
  • -

If i can figure out this last problems, next step will be to add the final configuration to my //lib/udev/rules.d/60-inputattach.rules so it can be loaded every boot by default.

But it seems i'm stuck. I'm gonna try doing more research and in the mean time the other idea i have is to just test with each device listed in inputattach --help and see if i get any different response. Otherwise will be back to winxp :( Hope this journey could be useful for anyone since i have been talking to my own LOL :p

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.