Kensington Expert Mouse (serial interface)

From: Jon Raiford (raiford_at_mindspring.com)
Date: 10/15/03


Date: 14 Oct 2003 19:54:54 -0700

I'm trying to collect the information needed to create a mouse driver
for my Kensington Expert Mouse - a 4-button trackball that uses either
a serial or ps/2 connection. I've done some searching in Google and
see that there currently isn't any support for the third and fourth
buttons, although it does work fine in compatibility mode with two
buttons.

I have monitored the data being sent to a Win98 machine that has
Kensington's driver, which is different than what gets sent when it
runs in Microsoft compatibility mode. What I can't figure out is how
to find the sequence needed to tell the trackball to operate using
Kensington's protocol. Can anyone point me in the right direction?

Here is what I've found so far:
It does some initial negotiation using the control lines. Based on
what I've read on the Microsoft protocol, I'm guessing this is cycling
the DTR line. I have not been able to record what the trackball sends
in response, nor have I been able to record any data being sent to the
trackball from the computer (I'm guessing this has to do with my
techniques for monitoring the traffic). What I can see is the data
being sent from the trackball after a successful negotiation:

It seems that each event (button or movement) transmits the current
state of the trackball. In Microsoft compatibility mode, the 3rd and
4th buttons act the same as the 1st and 2nd buttons. Here is what I
am seeing when using Kensington's protocol at 1200bps @ 8N1:

Button 1: E0 80 80
Button 2: D0 80 80
Button 3: C0 80 80 A0
Button 4: C0 80 80 90
No Buttons (after btn 1 or 2 was pressed): C0 80 80
No Buttons (after btn 3 or 4 was pressed): C0 80 80 80

When combining buttons, the appropriate bits are OR'ed together (ex.
1+2+3+4 = F0 80 80 B0). This data seems to be consistent with the MS
spec except for the fourth byte based on this site:
http://www.epanorama.net/documents/pc/mouse.html.

Can anyone point me in the right direction? Please note that I am
very much still a newbie and hoping this will be my first (but not
last) contribution to Linux, so I will need a little bit of hand
holding :) Alternatively, does anyone have a decent rs232 monitor
that can record the control lines and all of the data? I don't mind
sending one of these trackballs for monitoring. NOTE: you will need
to set up a Win9x machine with Kensington's driver in order to see it
work - their Win2k+ driver doesn't work with the serial port
interface.

Jon