How to identify a touch screen (or mouse?) protocol with gpm

Install gpm (e.g. aptitude install gpm for Debian, Ubuntu, etc.) and run the following as root (you can sudo bash first)

( for i in `gpm -t types`; do sudo gpm -m /dev/input/whatever -t $i -T -D; done ) 2>&1 | tee /tmp/gpm.log

(where "whatever" is the device you're trying to identify.) Now press the left button or the touch screen repeatedly. Some drivers will spit out a lot of this:

*** debug [daemon/old_main.c(156)]: selected 0 times
*** debug [daemon/old_main.c(156)]: selected 0 times
*** debug [daemon/old_main.c(156)]: selected 0 times

...then...

*** debug [daemon/old_main.c(156)]: selected 1 times
*** debug [daemon/gpm_exited.c(30)]: Removing files /var/run/gpm.pid and /dev/gpmctl

And on to the next driver. Eventually you will see something more like this:

*** debug [daemon/old_main.c(156)]: selected 0 times
*** debug [daemon/old_main.c(156)]: selected 1 times
*** debug [daemon/getmousedata.c(89)]: Data c6 42 63 (50)
*** debug [daemon/old_main.c(156)]: selected 1 times
*** debug [daemon/getmousedata.c(89)]: Data c6 42 63 (50)
*** debug [daemon/old_main.c(156)]: selected 1 times
*** debug [daemon/getmousedata.c(89)]: Data c6 42 63 (50)
*** debug [daemon/old_main.c(156)]: selected 0 times
*** debug [daemon/old_main.c(156)]: selected 0 times

Now you need to hit control-C a couple of times to break the loop. Now run uniq < /tmp/gpm.log > /tmp/gpm.log.uniq before you try to make sense of the output, or just go to the bottom of the file and search backwards for "initialize". Or, you could grep the log for "initialize" and look at the last line. In my case:

# grep initialize /tmp/gpm.log | tail -n 1
*** debug [daemon/init_mice.c(39)]: initialize /dev/input/by-id/usb-SLT_Digital_USB_TouchController-event-if00 with proto evdev

Now I know which protocol is spoken by my touch overlay.

Add new comment

Default

  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • You may link to images on this site using a special syntax
  • Web page addresses and e-mail addresses turn into links automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.
  • Filtered words will be replaced with the filtered version of the word.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <q>

Issue

  • Lines and paragraphs break automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>

Drinking Game

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <br> <pre> <h2> <h3> <h4>
  • Images may be embedded like: [image:node_id align=alignment hspace=n vspace=n border=n size=label width=n height=n nolink=(0|1) class=name style=style-data node=id] Leave off any attributes you don't want.
  • [img_assist|...] tags will be displayed, maybe. Please don't make more of them.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.