1

I have a Touchscreen Panel working under Ubuntu and I need to find out where this device is writing the coordinates when touching the panel. Buffer? DMA REGISTER? USB REGISTER? Where can I get this information? How to get this information unter linux consol? How getting the physical memory location / buffer adress ?! ... Anybody has an idea?

fetteotter
  • 13
  • 4

1 Answers1

1

in general you can get the coordinates using the evtest tool, that reads input events i.e. in /dev/input/event see How to get Coordinates of Touchscreen Rawdata using Linux <- very good answer

Despite this other ways to get the data depend on your touchscreen (reading/writing /dev/ttySx ,...). Touch screens are in general implemented as USB HID devices or emulating a serial connection (https://wiki.ubuntu.com/Touchscreen)

Checking for touchscreen connectivity

When encountering a new device, the first order of business is to determine how the touchscreen is connected to your computer. If the touchscreen produces no events out of the box, check to see if it's an USB device or not:

lsusb

USB connection

Check the output for any reference to a touchscreen. If your touchscreen has an USB interface, and it isn't working, then you may need to blacklist the usbtouchscreen driver for it to work:

sudo modprobe -r usbtouchscreen

If your touchscreen begins to produce events, then you can permanently blacklist the usbtouchscreen driver:

echo "blacklist usbtouchscreen" | sudo tee -a /etc/modprobe.d/blacklist.conf

Some touchscreens might already have good or perfect calibrations, otherwise you'll need to continue to the calibration section.

Serial connection

If there is no reference to a touchscreen device in your lsusb output, the connection is most likely through one of your serial ports. The actual IRQ mapping varies between manufacturers. In the case of Itronix devices, the default is /dev/ttyS3. A simple way to check for connections is to check each one for events:

screen /dev/ttyS0

Touch anywhere on your screen to check for any character output. If nothing happens, quit screen by pressing Ctrl+A and then the \ key to quit. Continue with /dev/ttyS1, etc. until you get a response. Once you've determined the device, we can try a few different drivers. In the case of Itronix (and most other devices using the Touchkit driver), the correct driver is touchit213.

sudo inputattach --touchit213 /dev/ttyS3

Will work for most touchkit screens. The calibration or one or more axes may be swapped, but if the calibration is approximate then it's probably the correct driver. Press Ctrl+C to try a new mode. inputattach supports any of the following modes, which includes external touchscreens which may attach through a physical serial port:

  • --h3600ts -ipaq Ipaq h3600 touchscreend
  • --elotouch -elo ELO touchscreen, 10-byte mode
  • --elo4002 -elo6b ELO touchscreen, 6-byte mode
  • --elo271-140 -elo4b ELO touchscreen, 4-byte mode
  • --elo261-280 -elo3b ELO Touchscreen, 3-byte mode
  • --mtouch -mtouch MicroTouch (3M) touchscreen
  • --touchit213 -t213 Sahara Touch-iT213 Tablet PC
  • --touchright -tr Touchright serial touchscreen
  • --touchwin -tw Touchwindow serial touchscreen
  • --penmount -pm Penmount touchscreen
  • --fujitsu -fjt Fujitsu serial touchscreen

If your device is built into a laptop, you'll have the best luck with the mtouch, touchright, touchwin, or touchit213 drivers. Likewise, non-Elo external touchscreens will most likely use touchit213. If your device is a tablet with stylus-only input, fujitsu is a popular maker of embedded tablet devices.

To attach the touchscreen at startup, edit your /etc/rc.local to look like the following:

/usr/bin/inputattach --daemon --always -t213 /dev/ttyS3 exit 0

Replace -t213 with your appropriate driver and /dev/ttyS3 with the correct device.

Again, don't worry if the calibration isn't perfect, or if an axis is inverted or reversed - this will be addressed in the calibration section.

https://wiki.ubuntu.com/Touchscreen

Community
  • 1
  • 1
ralf htp
  • 9,149
  • 4
  • 22
  • 34