Re: PS/2 and IMPS/2 mice
On Thu, Dec 05, 2002 at 02:39:15PM +0100, Raffaele Sandrini wrote:
> I did several tests here with our different PS/2 mice. I had the problem,
> that not every mouse was
> usable trough XFree86 with the same config.
> I found out that i am able to use every PS/2 mouse with eather ther "PS/2"
> driver or the "IMPS/2"
> driver (im talking about the "Protocol" option in the XF86Config of Xfree
> All older mice _only_ worked with the PS/2 driver and all newer mouse
> (logitech weel mouse, M$ weel
> mouse and co) worked _only_ with the IMPS/2 Driver. That means that i am not
> abel to use the PS/2
> driver vor every mouse.
The ImPS/2 protocol has an extra byte: the mouse sends packets of 4 bytes as
opposed to 3 for straight PS/2. So the protocols are not compatible.
However, it should be possible to initialise an ImPS/2 mouse into
straight PS/2 mode. X 4.2 doesn't reset the mouse before initialising
it, so not all mice listen to their initialisation sequences.
> As we have _many_ systems here and i don't want to stick a mouse deffinitly
> to a computer I need
> something wich is able to probe if there is a newer or older mouese
> connected to the system and
> wrtites the correct values to the XF86Config.
> Is there something like that in the Debian dirsti wich could be
> automatically run on sartup? If not,
> does somebody have an idea how i could solve that issue?
You need to do it before X starts, or X will grab /dev/psaux.
You need tools to write byte values to /dev/psaux and read them back
in. You can use echo -ne '\nnn' (nnn = octal value) to write and od
-tx1 -w1 to read, but it's a bit of a pain in the butt because the
reader has to be running in the background writing to the console
while you run the writer in the foreground. I wrote a couple of little
programs that suited me, probably someone else will be able to suggest
a better method.
What you have to do is:
- send FF to /dev/psaux. This resets the mouse. It should then respond
with FA AA 00.
- send the following sequence: F3 C8 F3 64 F3 50 F2
The mouse should respond with FA to each byte and then give an
additional byte, which is 00 for a standard PS/2 mouse, 03 for an
intellimouse and 04 for a 5-button mouse.
- send F4 to enable the mouse.
If this is a pain I might write a program to do it if nobody can
suggest easier console tools than what I know about.