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

Florian Lohoff flo at rfc822.org
Sun Apr 12 07:11:16 UTC 2009


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?!?

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/e5b32a47/attachment.pgp>


More information about the sane-devel mailing list