Hi,

More findings:

scanimage -L fails in usb_claim_interface (sanei_usb.c:603), because=20
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)=20
before a claim.

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

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

Regards,

R=E9mi Zara
--
R=E9mi Zara
http://www.remi-zara.net/
Le 6 d=E9c. 03, =E0 18:20, R=E9mi Zara a =E9crit :

>
> Le 6 d=E9c. 03, =E0 12:19, Henning Meier-Geinitz a =E9crit :
>
>> Hi,
>>
>> On Sun, Nov 30, 2003 at 01:46:37PM +0100, R=E9mi Zara wrote:
>>>> Environment variable: SANE_DEBUG_SANEI_SOMETHING, e.g.
>>>> SANE_DEBUG_SANEI_USB=3D255 or SANE_DEBUG_SANEI_SCSI=3D255.
>>>
>>> This is very interresting !
>>> With SANE_DEBUG_SANEI_USB=3D255, 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=20
> level necessary to make it find my scanner is anything >=3D 5, which=20=

> 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=E9mi Zara
--
R=E9mi Zara
http://www.remi-zara.net/


Reply via email to