Skip to contentSkip to conversation

Logitech Mouseman Dual Optical defaults to 400cpi

DISCUSSION Chris Faherty 4 participants 11 messages Jun 8, 2002 – Jun 12, 2002

lore
Share & tools
lore
#0 lore raw

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	
Signature · 1 line
/* Chris Faherty <[email protected]> */
#1 lore raw
Quoted 1 line · Chris Faherty

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 Sat Jun 8 17:55:02 2002 renamed from hid.c-orig Sun Mar 25 11:37:37 2001 +4 -0
@@ -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;

}

Signature · 1 line
/* Chris Faherty <[email protected]> */
#2 lore raw
In reply to Chris Faherty
Quoted 4 lines · Chris Faherty
Quoted 1 line · Chris Faherty

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?

Quoted 5 lines

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?

Quoted 12 lines
hid.c Sat Jun 8 17:55:02 2002 renamed from hid.c-orig Sun Mar 25 11:37:37 2001 +5 -0
@@ -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");

hid.c Sat Jun 8 17:55:02 2002 line 1541

Quoted 10 lines
hid.c Sat Jun 8 17:55:02 2002 renamed from hid.c-orig Sun Mar 25 11:37:37 2001 +8 -0
+        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

Signature · 1 line
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
#3 lore raw
In reply to Chris Faherty
Quoted 1 line · Brad Hards

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

Quoted 1 line

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.

Quoted 2 lines

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.

Signature · 1 line
/* Chris Faherty <[email protected]> */
#4 lore raw
In reply to Chris Faherty
Quoted 8 lines · Chris Faherty
Quoted 1 line · Brad Hards

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/

Quoted 4 lines
Quoted 1 line

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.

Quoted 5 lines
Quoted 2 lines

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

Signature · 1 line
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
#5 lore raw
In reply to Chris Faherty
Quoted 14 lines · Brad Hards
Quoted 8 lines · Chris Faherty
Quoted 1 line · Brad Hards

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/

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 35 lines
Quoted 5 lines
Quoted 2 lines

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

Signature · 6 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#6 lore raw
In reply to Chris Faherty
Quoted 4 lines · Vojtech Pavlik

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.

Signature · 1 line
/* Chris Faherty <[email protected]> */
#7 lore raw
In reply to Chris Faherty
Quoted 11 lines · Chris Faherty
Quoted 4 lines · Vojtech Pavlik

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

Quoted 4 lines

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.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#8 lore raw
In reply to Chris Faherty
Quoted 2 lines · Vojtech Pavlik

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.

Signature · 1 line
/* Chris Faherty <[email protected]> */
#9 lore raw
In reply to Chris Faherty
Quoted 8 lines · Chris Faherty
Quoted 2 lines · Vojtech Pavlik

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.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#10 lore raw
In reply to Chris Faherty

Hi!

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

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

                                            ~~~~~~
Quoted 2 lines

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

Signature · 2 lines
(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