Re: Getting additional info from an XInput driver

2003-06-25 Thread Brad Hards
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 25 Jun 2003 12:48 pm, Divide by Zero wrote:
 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
My bad. I assumed USB - both of my cordless mice are USB only.

I can only suggest some kind of virtual device node. Maybe something like the 
way gpm works? There is no API I am aware of for this sort of stuff, so you 
can just dump it out as a two element struct (with some kind of magic sync 
number as well, maybe).  In the USB model, I just do the control transfer 
directly from the display application.

I am interested in how you end up implementing this - I'm working on a 
kcontrol applet for KDE that shows the channel and battery power, and it'd be 
cool to support this as well.

Brad
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE++VUOW6pHgIdAuOMRAqgnAJ9UB3Esa2t/otklo6vWm5ea7r+kKgCaA/5E
SO/Wr2PTvADFzF63CvpQxe8=
=NDTF
-END PGP SIGNATURE-

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Getting additional info from an XInput driver

2003-06-25 Thread Egbert Eich
Xinput isn't prepared to handle these very device dependent
informations very well.
I have a new xf86misc extension in mind which can be used to
configure device dependent parameters and retreive device dependent
information from devices.
Unfortunately I have been side tracked too much lately that I didn't
have time to look into this.
Once this extension is in place it may be used to reteive this
information.

  
  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).
  

Does this mouse use the Mouseman+  protocol?

We can add something like this to the driver but we may have to 
add a new mouse type for the Logitech mice as these bits may code 
something else on another (non-Logitech) mouse or is this an 
'official' extension of the Mouseman+ protocol?

Egbert.
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Getting additional info from an XInput driver

2003-06-24 Thread Divide by Zero
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


Re: Getting additional info from an XInput driver

2003-06-24 Thread Alex Deucher
I'm not sure Xinput really supports this sort of functionality right
now.  Support for this may be something for 5.0.

Alex

--- Divide by Zero [EMAIL PROTECTED] wrote:
 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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel