I have a Mustek BP 1200 CU PLUS scanner A4, that /proc/bus/usb/devices describe as:
T: Bus=01 Lev=02 Prnt=03 Port=03 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=055f ProdID=021c Rev= 1.00 S: Product=USB Scanner C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms 1) I installed cvs version of sane-backend and when I use scanimage the problem go in Segmentation Fault; to solve this I have to add a NULL POINTER check on the line 461 of the code so that: ------------- case USB_CLASS_PER_INTERFACE: if (dev->config[0].interface[interface].altsetting) switch (dev->config[0].interface[interface].altsetting[0]. bInterfaceClass) { ---------------- This because altsetting something got me a NULL, then altsetting[0] is dereferencing a null pointer. 2) at line 479 I have todo: -------------------------- if (!found) DBG (5, "sanei_usb_init: device 0x%04x/0x%04x, interface %d doesn't look like a " "scanner (%d/%d)\n", dev->descriptor.idVendor, dev->descriptor.idProduct, interface, dev->descriptor.bDeviceClass, 0); --------------- to quickly drop the altsetting[0] possibility of null pointer. 3) as for 1) in tools/sane-find-scanner.c at line 627 4) at backend/gt68xx_high.c I have commented out the check for the status, because in this point the program blocks forever ( for my scanner ). changing status = SANE_STATUS_GOOD for quickly replacement. NOTE: I not reported a patch with the point 1..4, but the steps to make a workaround for those that wants to use sane-backend for mustek bp 1200 cu plus if they encountry my same problem. In case case the possibility to have in points from 1 to 3 the dev->config[0].interface[interface].altsetting to NULL makes clear the absence of the control for pointer nullity. kernel : 2.6.14.5 SMP x86_64 libusb ( is used ?) : v. 0.1.10a lorenzo