On Tuesday 24 of June 2003 23:16, Brad Hards wrote:
On Wed, 25 Jun 2003 00:34 am, Divide by Zero wrote:
I'm trying to extend the standard mouse_drv.o driver to enable it to read
battery and RF channel status from a wireless mouse. I have googled the
mouse protocol, so I know how to get the information from the mouse. The
problem is that I can't find any way to get this information thru XInput
from the driver to an application. Does anybody know how to read
additional info of this kind from a (core pointer) driver?
Why do this in X?
http://www.frogmouth.net/logitech-applet-0.3.tar.gz
Even if you do want to do it in X, you can't do it over the mouse protocol
- the information simply isn't there. You have to do vendor specific
transfers.
I'm writing about PS/2 mice, not USB. And the info is there, have a look here:
http://www.dqcs.com/logitech/PS2ppSpec.htm
and I have no problem retrieving it, for example using this simple patch over
mouse.c:
@@ -1416,6 +1416,9 @@
dw = (pBuf[2] 0x08) ? (pBuf[2] 0x0f) - 16 :
(pBuf[2] 0x0f);
break;
+case 5: /* wireless status type packet */
+xf86Msg(X_INFO, %s: battery level: %d, RF channel: %d\n,
pInfo-name,
+ pBuf[2] 0x07, (pBuf[2] 3) 0x07);
case 0: /* device type packet - shouldn't happen */
default:
buttons |= (pMse-lastButtons ~0x07);
(I have Logitech Cordless MouseMan Optical). What the problem is is getting
the info from the driver to a client (once it has been read from the mouse).
I hope that clears it out.
--
Divide by Zero (is not really dividing by zero)
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel