[sane-devel] hp2300c

Frank Zago fzago at austin.rr.com
Wed Feb 25 20:50:15 GMT 2004


Hi,

I just bought a el cheapo hp2300c scanner since there is no SANE drivers.
I looked at the windows driver, and found the "GL646U" strings. Same as the hp 
3690 it seems.

So I ran "sane-find-scanner -v -v -v" and it didn't detect that chipset. 
However, after making a few subtle changes to check-usb-chip.c, 
sane-find-scanner actually detects a GL646. See diff:


--- check-usb-chip.c    29 Dec 2003 16:32:30 -0000      1.7
+++ check-usb-chip.c    26 Feb 2004 02:28:25 -0000
@@ -1043,8 +1043,8 @@ check_gl646 (struct usb_device *dev)
      printf ("    checking for GL646 ...\n");

    /* Check device descriptor */
-  if ((dev->descriptor.bDeviceClass != USB_CLASS_PER_INTERFACE)
-      || (dev->config[0].interface[0].altsetting[0].bInterfaceClass != 0x10))
+  if ((dev->descriptor.bDeviceClass != 0xff)
+      || (dev->config[0].interface[0].altsetting[0].bInterfaceClass != 0xff))
      {
        if (verbose > 2)
         printf
@@ -1060,14 +1060,14 @@ check_gl646 (struct usb_device *dev)
                 dev->descriptor.bcdUSB);
        return 0;
      }
-  if (dev->descriptor.bDeviceSubClass != 0x00)
+  if (dev->descriptor.bDeviceSubClass != 0xff)
      {
        if (verbose > 2)
         printf ("    this is not a GL646 (bDeviceSubClass = 0x%x)\n",
                 dev->descriptor.bDeviceSubClass);
        return 0;
      }
-  if (dev->descriptor.bDeviceProtocol != 0)
+  if (dev->descriptor.bDeviceProtocol != 0xff)
      {
        if (verbose > 2)
         printf ("    this is not a GL646 (bDeviceProtocol = 0x%x)\n",



This change looks legitimate to me and the scanner really has a GL646 inside.

Frank.




More information about the sane-devel mailing list