public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Logitech Mouseman Dual Optical defaults to 400cpi
@ 2002-06-08 16:53 Chris Faherty
  2002-06-09  0:25 ` Chris Faherty
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Faherty @ 2002-06-08 16:53 UTC (permalink / raw)
  To: linux-kernel

I'm not sure which list to write about this.  I've written Logitech but they 
gave me back a non-answer.. something about clicking some options with their 
Windows software.

The Dual Optical mouse has a sensor(s), Agilent ADNS-2051, which is capable 
of 400cpi (default) and 800cpi.  Logitech decided to leave this setting up 
to the driver software, and so the mouse defaults to 400cpi and 100rps 
(report rate, which is 200rps max) if you use a generic HID driver.  Even on 
Windows if you don't install MouseWare, you will only see 400cpi.

I can't find any information on how to switch it into 800cpi mode.  I have 
hooked it up to a Windows machine with their MouseWare driver and used 
usbsniff to log what happens during a hotplug.  But I don't know what I am 
looking at, I don't understand USB communications.

Can someone suggest a remedy?  Here is a portion of the USB sniff log which 
writes to the mouse during hotplug:

00000157	0.32087600	>>>>>>> URB 6 going down...	
00000158	0.32089680	-- URB_FUNCTION_CLASS_INTERFACE:	
00000159	0.32093600	  TransferFlags          = 00000000 
(USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)	
00000160	0.32095520	  TransferBufferLength = 00000000	
00000161	0.32097360	  TransferBuffer       = 00000000	
00000162	0.32099200	  TransferBufferMDL    = 00000000	
00000163	0.32100800	 	
00000164	0.32101200	    no data supplied	
00000165	0.32103200	  UrbLink                 = 00000000	
00000166	0.32105120	  RequestTypeReservedBits = 22	
00000167	0.32106960	  Request                 = 0a	
00000168	0.32108880	  Value                   = 0000	
00000169	0.32110720	  Index                   = 0000	

and

00000208	0.32805280	>>>>>>> URB 8 going down...	
00000209	0.32807200	-- URB_FUNCTION_VENDOR_DEVICE:	
00000210	0.32810800	  TransferFlags          = 00000000 
(USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)	
00000211	0.32812640	  TransferBufferLength = 00000000	
00000212	0.32814480	  TransferBuffer       = 00000000	
00000213	0.32816320	  TransferBufferMDL    = 00000000	
00000214	0.32817760	 	
00000215	0.32818320	    no data supplied	
00000216	0.32820240	  UrbLink                 = 00000000	
00000217	0.32822080	  RequestTypeReservedBits = 00	
00000218	0.32824000	  Request                 = 02	
00000219	0.32825840	  Value                   = 000e	
00000220	0.32827760	  Index                   = 0004	

-- 
/* Chris Faherty <rallymonkey@bellsouth.net> */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-08 16:53 Logitech Mouseman Dual Optical defaults to 400cpi Chris Faherty
@ 2002-06-09  0:25 ` Chris Faherty
  2002-06-09  8:07   ` Brad Hards
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Faherty @ 2002-06-09  0:25 UTC (permalink / raw)
  To: linux-kernel

On Saturday 08 June 2002 12:53 pm, Chris Faherty wrote:

> I can't find any information on how to switch it into 800cpi mode.

Well, I managed to figure it out today.  Sending the special code to the 
MouseMan Dual Optical turns it into 800cpi mode.. much better!  Anyhow, I 
just put a test for this particular mouse in the hid_probe() and wrote the 
codes to the mouse.  Not sure if that's the best place.

This is for 2.2.20:

--- hid.c-orig  Sun Mar 25 11:37:37 2001
+++ hid.c       Sat Jun  8 17:55:02 2002
@@ -1523,6 +1523,19 @@

        printk(" on usb%d:%d.%d\n", dev->bus->busnum, dev->devnum, ifnum);

+#define USB_VENDOR_ID_LOGITECH          0x046d
+#define USB_DEVICE_ID_LOGITECH_DOPTICAL 0xc012
+    if ((hid->dev->descriptor.idVendor == USB_VENDOR_ID_LOGITECH) &&
+        (hid->dev->descriptor.idProduct == 
USB_DEVICE_ID_LOGITECH_DOPTICAL)) {
+        printk("Setting Logitech MouseMan Dual Optical for 800cpi\n");
+        usb_control_msg(hid->dev, usb_sndctrlpipe(hid->dev, 0),
+            0x0a, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
+            0x0000, 0x0000, NULL, 0, HZ);
+        usb_control_msg(hid->dev, usb_sndctrlpipe(hid->dev, 0),
+            0x02, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
+            0x000e, 0x0004, NULL, 0, HZ);
+    }
+
        return hid;
 }

-- 
/* Chris Faherty <rallymonkey@bellsouth.net> */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-09  0:25 ` Chris Faherty
@ 2002-06-09  8:07   ` Brad Hards
  2002-06-09 15:19     ` Chris Faherty
  0 siblings, 1 reply; 11+ messages in thread
From: Brad Hards @ 2002-06-09  8:07 UTC (permalink / raw)
  To: Chris Faherty, linux-kernel

On Sun, 9 Jun 2002 10:25, Chris Faherty wrote:
> On Saturday 08 June 2002 12:53 pm, Chris Faherty wrote:
> > I can't find any information on how to switch it into 800cpi mode.
>
> Well, I managed to figure it out today.  Sending the special code to the
Was that using Snoopy?

> MouseMan Dual Optical turns it into 800cpi mode.. much better!  Anyhow, I
> just put a test for this particular mouse in the hid_probe() and wrote the
> codes to the mouse.  Not sure if that's the best place.
>
> This is for 2.2.20:
Any objections to me taking this to 2.4 and 2.5?

> --- hid.c-orig  Sun Mar 25 11:37:37 2001
> +++ hid.c       Sat Jun  8 17:55:02 2002
> @@ -1523,6 +1523,19 @@
>
>         printk(" on usb%d:%d.%d\n", dev->bus->busnum, dev->devnum, ifnum);
>
> +#define USB_VENDOR_ID_LOGITECH          0x046d
> +#define USB_DEVICE_ID_LOGITECH_DOPTICAL 0xc012
> +    if ((hid->dev->descriptor.idVendor == USB_VENDOR_ID_LOGITECH) &&
> +        (hid->dev->descriptor.idProduct ==
> USB_DEVICE_ID_LOGITECH_DOPTICAL)) {
> +        printk("Setting Logitech MouseMan Dual Optical for 800cpi\n");
> +        usb_control_msg(hid->dev, usb_sndctrlpipe(hid->dev, 0),
> +            0x0a, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
> +            0x0000, 0x0000, NULL, 0, HZ);
> +        usb_control_msg(hid->dev, usb_sndctrlpipe(hid->dev, 0),
> +            0x02, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
> +            0x000e, 0x0004, NULL, 0, HZ);
> +    }
> +
>         return hid;
>  }
This could have been handled by a blacklist table quirk. Any reason why you 
chose to do it this way?

Brad

-- 
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-09  8:07   ` Brad Hards
@ 2002-06-09 15:19     ` Chris Faherty
  2002-06-10  0:57       ` Brad Hards
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Faherty @ 2002-06-09 15:19 UTC (permalink / raw)
  To: Brad Hards, linux-kernel

On Sunday 09 June 2002 04:07 am, Brad Hards wrote:

> Was that using Snoopy?

I believe that's what it was called.  The program was sniffusb 0.13.  I had 
problems get later versions to work.  Then I found a nice treatise on 
interpreting the log:

http://www.toth.demon.co.uk/usb/reverse-0.2.txt

> Any objections to me taking this to 2.4 and 2.5?

Feel free.  I wonder if MS Intellimouse 3.0 has the same resolution problem. 
AFAIK they use the same sensor.

> This could have been handled by a blacklist table quirk. Any reason why
> you chose to do it this way?

How does the blacklist work?  Originally I wanted to put the setting in 
mousedev but I wasn't sure how to access the usb_device from there.

-- 
/* Chris Faherty <rallymonkey@bellsouth.net> */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-09 15:19     ` Chris Faherty
@ 2002-06-10  0:57       ` Brad Hards
  2002-06-10 21:26         ` Vojtech Pavlik
  0 siblings, 1 reply; 11+ messages in thread
From: Brad Hards @ 2002-06-10  0:57 UTC (permalink / raw)
  To: Chris Faherty, linux-kernel

On Mon, 10 Jun 2002 01:19, Chris Faherty wrote:
> On Sunday 09 June 2002 04:07 am, Brad Hards wrote:
> > Was that using Snoopy?
>
> I believe that's what it was called.  The program was sniffusb 0.13.  I had
> problems get later versions to work.  Then I found a nice treatise on
> interpreting the log:
>
> http://www.toth.demon.co.uk/usb/reverse-0.2.txt
I'll have to check it out. There are a number of resources (including a nice 
Perl script that gets rid of much of the verbosity).
Later versions may be W2K, rather than for 98: 
http://sourceforge.net/projects/usbsnoop/

> > Any objections to me taking this to 2.4 and 2.5?
>
> Feel free.  I wonder if MS Intellimouse 3.0 has the same resolution
> problem. AFAIK they use the same sensor.
Probably not, because only low end manufacturers use reference designs 
directly. I have an intellimouse around here somewhere. Don't know anything 
about it, because it wouldn't have occurred to me to read the manual or 
install the windows drivers. Might have to check it out.

> > This could have been handled by a blacklist table quirk. Any reason why
> > you chose to do it this way?
>
> How does the blacklist work?  Originally I wanted to put the setting in
> mousedev but I wasn't sure how to access the usb_device from there.
Basically we declare a quirk (in drivers/usb/hid.h)
#define HID_QUIRK_LOGITECH_HIRES

and then associate the manufacturer and product IDs for the device with the 
quirk in hid-core.c (in hid_blacklist[])
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DOPTICAL, 
HID_QUIRK_LOGITECH_HIRES },

And then use (hid->quirk & HID_QUIRK_LOGITECH_HIRES) as the test instead of 
((hid->dev->descriptor.idVendor == USB_VENDOR_ID_LOGITECH) &&
(hid->dev->descriptor.idProduct == USB_DEVICE_ID_LOGITECH_DOPTICAL)) in the 
routine you actually want to vary.

The advantage is really apparent when Logitech brings out another device with 
different product ID (eg a different colour plastic) that has the same 
firmware and needs the same change. Much easier to add to the (now badly 
misnamed) blacklist than to add more and more conditions to the if().

I'll try for a patch later, that might make this a bit clearer.

Brad


-- 
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-10  0:57       ` Brad Hards
@ 2002-06-10 21:26         ` Vojtech Pavlik
  2002-06-11  4:52           ` Chris Faherty
                             ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Vojtech Pavlik @ 2002-06-10 21:26 UTC (permalink / raw)
  To: Brad Hards; +Cc: Chris Faherty, linux-kernel

On Mon, Jun 10, 2002 at 10:57:20AM +1000, Brad Hards wrote:
> On Mon, 10 Jun 2002 01:19, Chris Faherty wrote:
> > On Sunday 09 June 2002 04:07 am, Brad Hards wrote:
> > > Was that using Snoopy?
> >
> > I believe that's what it was called.  The program was sniffusb 0.13.  I had
> > problems get later versions to work.  Then I found a nice treatise on
> > interpreting the log:
> >
> > http://www.toth.demon.co.uk/usb/reverse-0.2.txt
> I'll have to check it out. There are a number of resources (including a nice 
> Perl script that gets rid of much of the verbosity).
> Later versions may be W2K, rather than for 98: 
> http://sourceforge.net/projects/usbsnoop/
> 
> > > Any objections to me taking this to 2.4 and 2.5?
> >
> > Feel free.  I wonder if MS Intellimouse 3.0 has the same resolution
> > problem. AFAIK they use the same sensor.
> Probably not, because only low end manufacturers use reference designs 
> directly. I have an intellimouse around here somewhere. Don't know anything 
> about it, because it wouldn't have occurred to me to read the manual or 
> install the windows drivers. Might have to check it out.

Intellimouse 1.0 uses Agilent HDNS-2000, 2.0 uses ADNS-2001, and 3.0
uses a chip made by SGS Thompson, under a secret contract with Microsoft
that has only 400 dpi, but up to one meter per second maximal tracking
speed.

> > > This could have been handled by a blacklist table quirk. Any reason why
> > > you chose to do it this way?
> >
> > How does the blacklist work?  Originally I wanted to put the setting in
> > mousedev but I wasn't sure how to access the usb_device from there.
> Basically we declare a quirk (in drivers/usb/hid.h)
> #define HID_QUIRK_LOGITECH_HIRES
> 
> and then associate the manufacturer and product IDs for the device with the 
> quirk in hid-core.c (in hid_blacklist[])
> { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DOPTICAL, 
> HID_QUIRK_LOGITECH_HIRES },
> 
> And then use (hid->quirk & HID_QUIRK_LOGITECH_HIRES) as the test instead of 
> ((hid->dev->descriptor.idVendor == USB_VENDOR_ID_LOGITECH) &&
> (hid->dev->descriptor.idProduct == USB_DEVICE_ID_LOGITECH_DOPTICAL)) in the 
> routine you actually want to vary.
> 
> The advantage is really apparent when Logitech brings out another device with 
> different product ID (eg a different colour plastic) that has the same 
> firmware and needs the same change. Much easier to add to the (now badly 
> misnamed) blacklist than to add more and more conditions to the if().
> 
> I'll try for a patch later, that might make this a bit clearer.
> 
> Brad
> 
> 
> -- 
> http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-10 21:26         ` Vojtech Pavlik
@ 2002-06-11  4:52           ` Chris Faherty
       [not found]           ` <20020611045213.8B1FA59D354@kerberos.suse.cz>
  2002-06-12 19:22           ` Pavel Machek
  2 siblings, 0 replies; 11+ messages in thread
From: Chris Faherty @ 2002-06-11  4:52 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: linux-kernel

On Monday 10 June 2002 05:26 pm, Vojtech Pavlik wrote:

> Intellimouse 1.0 uses Agilent HDNS-2000, 2.0 uses ADNS-2001, and 3.0
> uses a chip made by SGS Thompson, under a secret contract with Microsoft
> that has only 400 dpi, but up to one meter per second maximal tracking
> speed.

Hmm interesting, that Microsoft has no 800dpi mouse.  Glad I picked Logitech 
then.  I assumed they were equivalent resolution since most reviews give the 
Intellimouse the nod, but I don't know how the heck a 400dpi can compete 
with a 800dpi.

Running the Logitech @ 800 on a black surface, it's flawless.  I just can't 
get it to fail a twitch test, despite having fewer pictures per second.  I 
did notice it doing a little pixel dance one time on a blue pad, but it's 
not ever done that with my black vinyl surface.

-- 
/* Chris Faherty <rallymonkey@bellsouth.net> */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
       [not found]           ` <20020611045213.8B1FA59D354@kerberos.suse.cz>
@ 2002-06-11  5:56             ` Vojtech Pavlik
  2002-06-11  6:30               ` Chris Faherty
       [not found]               ` <20020611062940.8172959D354@kerberos.suse.cz>
  0 siblings, 2 replies; 11+ messages in thread
From: Vojtech Pavlik @ 2002-06-11  5:56 UTC (permalink / raw)
  To: Chris Faherty; +Cc: Vojtech Pavlik, linux-kernel

On Tue, Jun 11, 2002 at 12:52:52AM -0400, Chris Faherty wrote:
> On Monday 10 June 2002 05:26 pm, Vojtech Pavlik wrote:
> 
> > Intellimouse 1.0 uses Agilent HDNS-2000, 2.0 uses ADNS-2001, and 3.0
> > uses a chip made by SGS Thompson, under a secret contract with Microsoft
> > that has only 400 dpi, but up to one meter per second maximal tracking
> > speed.
> 
> Hmm interesting, that Microsoft has no 800dpi mouse.  Glad I picked Logitech 
> then.  I assumed they were equivalent resolution since most reviews give the 
> Intellimouse the nod, but I don't know how the heck a 400dpi can compete 
> with a 800dpi.

Simply: If you move the Logitech too fast, it'll lose track. The reason
why the Duial Optical has two sensors to help exactly this problem - a
diagonally oriented sensor can cope up with 41% faster movement.

Thus they get about 50 centimeters per second maximum tracking speed. If
you move the mouse fast, it'll lose track, and the pointer will move
randomly.

With the Explorer 3.0, it's almost impossible to get it lose track, at
100 centimeters/second maximum tracking speed.

It might be that due to the 800 dpi resolution you won't need to move it
so fast ...

> Running the Logitech @ 800 on a black surface, it's flawless.  I just can't 
> get it to fail a twitch test, despite having fewer pictures per second.  I 
> did notice it doing a little pixel dance one time on a blue pad, but it's 
> not ever done that with my black vinyl surface.

Btw, for more frequent reporting it's enough to modify the irq interrupt
rate in the HID driver, works for any mouse.

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-11  5:56             ` Vojtech Pavlik
@ 2002-06-11  6:30               ` Chris Faherty
       [not found]               ` <20020611062940.8172959D354@kerberos.suse.cz>
  1 sibling, 0 replies; 11+ messages in thread
From: Chris Faherty @ 2002-06-11  6:30 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: linux-kernel

On Tuesday 11 June 2002 01:56 am, Vojtech Pavlik wrote:

> Btw, for more frequent reporting it's enough to modify the irq interrupt
> rate in the HID driver, works for any mouse.

I want I want!  But I can't figure it out.  Can you give me an example of 
how I would change the irq interrupt rate so that my mouse reports at 200Hz 
in kernel 2.2.20?  Thanks.

-- 
/* Chris Faherty <rallymonkey@bellsouth.net> */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
       [not found]               ` <20020611062940.8172959D354@kerberos.suse.cz>
@ 2002-06-11  6:34                 ` Vojtech Pavlik
  0 siblings, 0 replies; 11+ messages in thread
From: Vojtech Pavlik @ 2002-06-11  6:34 UTC (permalink / raw)
  To: Chris Faherty; +Cc: Vojtech Pavlik, linux-kernel

On Tue, Jun 11, 2002 at 02:30:28AM -0400, Chris Faherty wrote:

> On Tuesday 11 June 2002 01:56 am, Vojtech Pavlik wrote:
> 
> > Btw, for more frequent reporting it's enough to modify the irq interrupt
> > rate in the HID driver, works for any mouse.
> 
> I want I want!  But I can't figure it out.  Can you give me an example of 
> how I would change the irq interrupt rate so that my mouse reports at 200Hz 
> in kernel 2.2.20?  Thanks.

Change the last argument of

FILL_INT_URB(hid->urbin, dev, pipe, hid->inbuf, 0, hid_irq_in, hid, endpoint->bInterval);

to 5. The normal value is 10. And it's milliseconds per poll of the
mouse. This may be made a quirk also.

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Logitech Mouseman Dual Optical defaults to 400cpi
  2002-06-10 21:26         ` Vojtech Pavlik
  2002-06-11  4:52           ` Chris Faherty
       [not found]           ` <20020611045213.8B1FA59D354@kerberos.suse.cz>
@ 2002-06-12 19:22           ` Pavel Machek
  2 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2002-06-12 19:22 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Brad Hards, Chris Faherty, linux-kernel

Hi!

> > > Feel free.  I wonder if MS Intellimouse 3.0 has the same resolution
> > > problem. AFAIK they use the same sensor.
> > Probably not, because only low end manufacturers use reference designs 
> > directly. I have an intellimouse around here somewhere. Don't know anything 
> > about it, because it wouldn't have occurred to me to read the manual or 
> > install the windows drivers. Might have to check it out.
> 
> Intellimouse 1.0 uses Agilent HDNS-2000, 2.0 uses ADNS-2001, and 3.0
> uses a chip made by SGS Thompson, under a secret contract with Microsoft
                                            ~~~~~~
> that has only 400 dpi, but up to one meter per second maximal tracking
> speed.

I guess they'll have to shoot us all, then ;-).
									Pavel
-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-06-12 19:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-08 16:53 Logitech Mouseman Dual Optical defaults to 400cpi Chris Faherty
2002-06-09  0:25 ` Chris Faherty
2002-06-09  8:07   ` Brad Hards
2002-06-09 15:19     ` Chris Faherty
2002-06-10  0:57       ` Brad Hards
2002-06-10 21:26         ` Vojtech Pavlik
2002-06-11  4:52           ` Chris Faherty
     [not found]           ` <20020611045213.8B1FA59D354@kerberos.suse.cz>
2002-06-11  5:56             ` Vojtech Pavlik
2002-06-11  6:30               ` Chris Faherty
     [not found]               ` <20020611062940.8172959D354@kerberos.suse.cz>
2002-06-11  6:34                 ` Vojtech Pavlik
2002-06-12 19:22           ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox