[sane-devel] SANE API / How to detect disconnect of scanner

Florian Lohoff flo at rfc822.org
Sun Apr 12 19:04:31 UTC 2009


On Sun, Apr 12, 2009 at 09:11:16AM +0200, Florian Lohoff wrote:
> Hi,
> i am writing my own little scanner button handling which works without the problem.
> I am trying to attach the scanner (via USB) to a headles system. So in the
> end i 'd like to start the scanner button program via udev and let it
> die once the user turns off the scanner.
> 
> I would have expected sane_control_option to return an error message once
> the scanner gets turned off (disconnected) but it still returns  
> 0 aka SANE_STATUS_GOOD which is astonishing..
> 
> Whats the proposed way to detect a disconnected scanner? Should i reopen the scanner
> on every 1 sec polling interval?!?

As i got a hint that the backend would be an important point - The backend
in this case is the fujitsu - fi 4120C on USB

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-171-2280134
	Those who would give up a little freedom to get a little 
          security shall soon have neither - Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090412/868dc530/attachment.pgp>


More information about the sane-devel mailing list