On Sun, 16 Jun 2002, Pozsar Balazs wrote: > I had the same problem, and I figured out two things: > - Sometimes the mouse is confused and imps2 init will fail if I do not > send a reset to it. > - moving the mouse before, or during initialization will make it fail. This is a problem I think, for all mouse (non trivial) initialization: What happens is that when you move the mouse it sends motiondata, as datastreaming is on per default. When you afterwards try to communicate (init) with the mouse and read the responds you read motiondata instead of the expected answar and bail out. So any mouseinitialization where a respond is expected/needed should first turn off datastreaming and flush the fd. Then begin to communicating with the mouse. When ended turn on the datastreaming again. > The attached patch solved all my problems, so can try it, but this is not > official :) The reason for succes with the patch, is that by waiting for mouse_id_code after reset (00) you effectually flush the fd, and then starts initialization and read the responds correct. The patch have the faults that A) datamotion packets can legally take the value of 0. B) moving the mouse while initializing can cause the same problem. But it will solve the problem in most cases. Peter -- E-Mail: pebl@xxxxxxxxxx Real name: Peter Berg Larsen Where: Department of Computer Science, Copenhagen Uni., Denmark