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:

Subscribe to RSS - gpm