[sane-devel] plustek:libusb bugs on canon canoscan n1220U

m. allan noah anoah at pfeiffer.edu
Wed Aug 9 13:33:12 UTC 2006

On Wed, 9 Aug 2006, Étienne Bersac wrote:

> Hello,
>> SANE standard 1 does not specify how to handle scanner buttons,
>> but it is clear, that an option, which deals with a button has to deliver
>> a value (button pressed or not). Regarding that requirement, you have either
>> to use SANE_TYPE_BOOL or SANE_TYPE_INT - I choose BOOL.
>> SANE_TYPE_BUTTON is maybe misleading. It is intended to be used by a backend
>> to allow changes by pressing that button from the GUI and NOT to reflect
>> the status of a scanner button. An option of type SANE_TYPE_BUTTON has no value.
>> See also chapter of the SANE Standard
>> http://www.sane-project.org/html/doc011.html
> Okey, the strange part of this button handling is : how an app using
> sane know an option reflect a button status ? Just in order to ignore
> that option. For example, xsane advanced options dialog shows a fieldset
> entitled "Buttons" with one option "Scanner button" which is inactive
> and always false. That's useless. I don't know how multiple buttons are
> handle. Do the app has to parse name or title or desc field in order to
> find a "button" string and then treat the option as a button state
> option ?

yes- understand that the button handling in sane is more of a proposal 
than a standard, and this is MY take on where the discussions lead:

1. sane makes heavy use of options with well-known names, like 'source' 
and 'tl_x', etc. button option names should start with 'button', see the 
button daemon in experimental cvs.

2. backend may optionally decide to put buttons in a separate group, 
recommended, but not required.

3. the type of the button is not fixed to bool, because some machines have 
keypads or other interfaces than just a simple button.

4. an app that wants to know about button presses should poll their values 
periodically, at least every couple of seconds, to keep user input from 
being lost.

5. buttons should be SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED, but not 


"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera

More information about the sane-devel mailing list