I am using the hexdump -C to show realtime data from a pointing device on a linux box. The information it returns is 16 bytes of hex per line. Like this:
000001b0 a9 1c fd 4e f1 2c 0f 00 01 00 3e 00 01 00 00 00 |...N.,....>.....| 000001c0 a9 1c fd 4e 0e 2d 0f 00 01 00 3e 00 00 00 00 00 |...N.-....>.....| 000001d0 a9 1c fd 4e 16 2d 0f 00 00 00 00 00 00 00 00 00 |...N.-..........| 000001e0 aa 1c fd 4e b1 9a 05 00 01 00 3d 00 01 00 00 00 |...N......=.....| 000001f0 aa 1c fd 4e ce 9a 05 00 01 00 3d 00 00 00 00 00 |...N......=.....| 00000200 aa 1c fd 4e d5 9a 05 00 00 00 00 00 00 00 00 00 |...N............|
My question is, how do I know how to translate this string to the coordinate data from the mouse pointer?
Most USB input devices conform to the USB HID specification. The Xorg
evdev(4)driver should be able to Just Use nearly any pointing device.If you’re writing your own driver, libusb might be a good starting point.