Some scanners go to sleep, and cannot wake up using SANE. This is because they shut down USB endpoint 0 to save power. This is in violation of the USB spec. This does not present a problem on windows, because the driver stays running, and so does not use endpoint 0 after the driver starts. We use endpoint 0 every time we open the device. The Fujitsu fi-6670 has this problem, for instance.
I am not sure this is your problem here, but it sounds like it. Perhaps you should stop changing the power-save-time option, and see if that helps? allan On Fri, Nov 16, 2012 at 11:04 AM, dabicho <tsukebumi at gmail.com> wrote: > Hello. > I am working on a system with a function to scan documents. > When this option is selected, a new process is started to look, open and > configure a scanner and scan the documents. > However after some time, sane_find_scanner takes a long time to return and > finds nothing. > It is needed to turn on and off the scanner or unplug and plug again the usb > cable. > > Why is this happening? > Is there any way I can workaround this in software? > > As part of the scanner configuration, I am doing > > sane_control_option(saneH, powerSaveTimeOpt, SANE_ACTION_SET_VALUE, > &powerTime, &rVal); > > where powerSaveTimeOpt has the correct value as returned by > sane_get_option_descriptor(saneH, j); // name is "power-save-time" > and powerTime has a value of 0 > As I found that was an issue with another avision scanner. But this is not > working this time. > > The scanner is > device `avision:libusb:001:012' is a Fujitsu fi-5015C flatbed scanner > Sane backends are > 1.0.22 > > Thank you for any light you can shed into this. > > -- > sane-devel mailing list: sane-devel at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel > Unsubscribe: Send mail with subject "unsubscribe your_password" > to sane-devel-request at lists.alioth.debian.org -- "The truth is an offense, but not a sin"
