[sane-devel] Snapscan on Mac OS X 10.3

Rémi Zara remi_zara at mac.com
Sun Dec 7 15:27:02 GMT 2003


Hi,

More findings:

scanimage -L fails in usb_claim_interface (sanei_usb.c:603), because 
the systems tells us the device is already taken by another process.
This might be due to the fact that we do an open (sanei_usb: 541) 
before a claim.

Now the fun thing is if I do a printf just before the claim (and this 
printf isn't even flushed before usb_claim_interface), then scanimage 
-L finds the scanner. Increasing the debug level also does some 
printfs, and make the thing work, too.

Doing a usleep(100) (or sleep(100)) does not work...

Regards,

Rémi Zara
--
Rémi Zara
http://www.remi-zara.net/
Le 6 déc. 03, à 18:20, Rémi Zara a écrit :

>
> Le 6 déc. 03, à 12:19, Henning Meier-Geinitz a écrit :
>
>> Hi,
>>
>> On Sun, Nov 30, 2003 at 01:46:37PM +0100, Rémi Zara wrote:
>>>> Environment variable: SANE_DEBUG_SANEI_SOMETHING, e.g.
>>>> SANE_DEBUG_SANEI_USB=255 or SANE_DEBUG_SANEI_SCSI=255.
>>>
>>> This is very interresting !
>>> With SANE_DEBUG_SANEI_USB=255, scanimage -L finds my snapscan e40 !
>>> Set it back to 0, and it does not find it anymore.
>>> Set it back to 255, and here it is !
>>> Either something's wrong with debugging, either there is maybe some
>>> timing problems ?
>>
>> Usually that's a timinig issue. Maybe a problem in libusb?
>>
>
> Hi,
>
> The problem might indeed be in libusb, since I found that the debug 
> level necessary to make it find my scanner is anything >= 5, which 
> activates debugging in libusb:
>
> in sanei_usb_init (void)
>
> #ifdef DBG_LEVEL
>   if (DBG_LEVEL > 4)
>     usb_set_debug (255);
> #endif /* DBG_LEVEL */
>
> Regards,
>
> Rémi Zara
--
Rémi Zara
http://www.remi-zara.net/





More information about the sane-devel mailing list