[sane-devel] proper use of GT68XX_FLAG_NO_POWER_STATUS?
Stef
stef.dev at free.fr
Sun Mar 17 20:31:54 UTC 2013
On 16/03/2013 13:38, Nico Hoffmann wrote:
>
> Hi,
>
> i've have maybe a rather stupid question, but here we go:
>
> I own an older scanner plustek optic slim 1200, which uses the gt68xx
> backend. For years, it worked fine with sane. Since several month (at
> least with sane-backends 1.0.23), I can not use this scanner anymore,
> because it fails with following message:
>
> | # ./scanimage -x 10cm -y 10 cm > bla.img
> | [gt68xx] sane_open: power control failure: check power plug!
> | scanimage: open of device gt68xx:libusb:004:006 failed: Error during
> device I/O
>
> One must know: The plustek optic slim 1200 is powrered by USB
> only. There is no possibillity to plug in a power adapter...
>
> So I asked google and got a hint to "GT68XX_FLAG_NO_POWER_STATUS".
>
> I found it in sane-backends-1.0.23/backend/gt68xx_low.h:
>
> #define GT68XX_FLAG_NO_POWER_STATUS (1 << 7) /*
> get_power_status_doesn't work */
>
> I am not familiar with the use of such flags, but for my
> understanding, actually this flag should be set. At least, one bit in
> it is set (and, despite of that, I get the power plug error).
>
> I set
>
> #define GT68XX_FLAG_NO_POWER_STATUS (0 << 7)
>
> and recompiled sane, but no change.
>
> Additionally, I erased all appearances of
> "GT68XX_FLAG_NO_POWER_STATUS" in gt68xx_devices.c and gt68xx_gt6816.c,
> and recompiled it again, but no change.
>
>
> So my stupid question is: How I have to change the sources to
> get this scanner working?
>
>
> kind regards,
>
> N.
>
Hello,
you don't need to change the meaning of the flag. You have to add
it to the description matching your scanner in the devices description
in gt68xx_devices.c . You can find the right by the vendor/product ids
at the end of the file.
But maybe SANE isn't the problem. Sometimes I have problems with
some motherboards and USB powersaving, and I have to turn it off to get
some of my scanners working. In these case I add this parameter to modprobe:
options usbcore autosuspend=-1
Regards,
Stef
More information about the sane-devel
mailing list