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

2006-08-09 Thread Gerhard Jaeger
On Wednesday 09 August 2006 15:20, ?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 4.2.9.4 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 ?
> 

checkout the experimental tree of SANE CVS, there's a sample application
which does the button handling. XSane is not aware of this "special" handling,
and therefore it only displays the button(s).
Please keep in mind, that the scanner-button handling is not defined in the
SANE standard and more or less inofficial (the avision backend does it the
same way)

--
Gerhard



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

2006-08-09 Thread m. allan noah
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 4.2.9.4 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 
SANE_CAP_SOFT_SELECT.

allan

-- 
"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
From stef...@modulonet.fr  Wed Aug  9 13:34:13 2006
From: stef...@modulonet.fr (=?utf-8?q?St=C3=A9phane_VOLTZ?=)
Date: Wed Aug  9 13:36:01 2006
Subject: [sane-devel] HP 2300C (GL646) head bumps and screams
In-Reply-To: <1154940277.8467.29.camel@claus.usa2>
References: <1154734389.8467.15.camel@claus.usa2>
<200608060911.43384.stef...@modulonet.fr>
<1154940277.8467.29.camel@claus.usa2>
Message-ID: <200608091534.13847.stef...@modulonet.fr>

Hello,

there was still a bug in "left position" detection. I fixed it (in CVS) 
while 
improving sanei_search_reference_point(). Things should be better now.

Regards,
Stef


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

2006-08-09 Thread Étienne Bersac
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 4.2.9.4 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 ?

Thanks for all.

?tienne.

-- 
Verso l'Alto !



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

2006-08-09 Thread m. allan noah
On Wed, 9 Aug 2006, ?tienne Bersac wrote:

> Hello,
>
>> scanimage -L reports:
>> device `plustek:libusb:003:003' is a Canon N1220U USB flatbed scanner
>
> User should have
>
>bersace@celebrad:~$ scanimage -L
>device `plustek:libusb:002:002' is a Canon CanoScan N1220U flatbed 
> scanner
>    ^^^
>
> The USB in "USB flatbed scanner" is very annoying since that make type
> parsing hard if an app want to show an icon representing the type of the
> device. I guess an enum should be better than string.

1. CanoScan is missing? it is not be possible to have the scanner report 
what is printed on its outside, only the inside :)

2. USB is added? yes- the type strings are defined on page 18 of the sane 
spec, and it should only be 'flatbed scanner'

>
>> SANE_TYPE_OPTION does not exist
>
> Sorry, i meant SANE_TYPE_{BOOL,INT,FIXED,STRING}.
>
> The 5 options "button" have SANE_TYPE_BOOL as type (in
> SANE_Option_Descriptor struct). That should be SANE_TYPE_BUTTON.
>

3. button type is bool? read the sane standard- SANE_TYPE_BUTTON has no 
value! how can the backend signal a button has been pressed with no value? 
SANE_TYPE_BUTTON is a poorly named choice, but it is used to have the 
frontend 'set' the backend to do something.

a frontend writer who wishes to work with buttons should be prepared for 
bool,int, or fixed, and perhaps string. various counters and screens which 
are set by the user at the scanner could be reported this way.

allan

> Thanks.
>
> ?tienne.
>

-- 
"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
From jsm...@suse.de  Wed Aug  9 13:19:13 2006
From: jsm...@suse.de (Johannes Meixner)
Date: Wed Aug  9 13:19:22 2006
Subject: AW: [sane-devel] Configuring SCSI-Scanner under SUSE 10.1
In-Reply-To: <009901c6bbb6$bc430a70$1e6f78c2@bwin>
References: <009901c6bbb6$bc430a70$1e6f78c2@bwin>
Message-ID: 


Hello,

On Aug 9 15:21 Daniel Spannbauer wrote (shortened):
> Inmy Epson.conf theres only an entry "scsi EPSON", in dll.conf only "Epson".
> Sane-find-scanner found the scanner, scanimage -L listet the scanner. All as
> User root. Scanimae > /tmp/out.pnm worked also. But than with scanimage -L
> theres no scanner until I only open the Epson.conf and save it. Than
> scanimage -L is listing the scanner. But only 1 try, then open Epson.conf,
> save it.
> 
> As normal User scanimage -L don't list the scanner, /dev/sg1 has full
> rights.
> 
> Can you give me a hint?

I am afraid, I can't.
Please provide logs (as described before) so that we may have a
chance to see which obscure magic there is going on.
It looks a bit like SCSI problems but I am no SCSI expert
so that I cannot help you regarding SCSI problems.

Note that the generic SCSI device files (/dev/sg*) are assigned
to the real hardware devices in somewhat random order and some
USB mass-storage devices show up as generic SCSI device, e.g.
the cardreader unit in my Epson USB all-in-one device shows up
as /dev/sda and as /dev/sg0.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5  Mail: jsm...@suse.de
90409 Nuernberg, GermanyWWW: http://www.suse.de/


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

2006-08-09 Thread Gerhard Jaeger
On Wednesday 09 August 2006 13:49, ?tienne Bersac wrote:
> Hello,
> 
> > scanimage -L reports: 
> > device `plustek:libusb:003:003' is a Canon N1220U USB flatbed scanner
> 
> User should have 
> 
> bersace@celebrad:~$ scanimage -L
> device `plustek:libusb:002:002' is a Canon CanoScan N1220U flatbed 
> scanner
>    ^^^

I decided not to add "CanoScan".

> 
> The USB in "USB flatbed scanner" is very annoying since that make type
> parsing hard if an app want to show an icon representing the type of the
> device. I guess an enum should be better than string.

NACK - the type is descriptive. I agree, "USB" is too much, I've changed that
for all affected backends.

> 
> > SANE_TYPE_OPTION does not exist
> 
> Sorry, i meant SANE_TYPE_{BOOL,INT,FIXED,STRING}.
> 
> The 5 options "button" have SANE_TYPE_BOOL as type (in
> SANE_Option_Descriptor struct). That should be SANE_TYPE_BUTTON.

Also NACK. 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 4.2.9.4 of the SANE Standard 
http://www.sane-project.org/html/doc011.html

Ciao
Gerhard



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

2006-08-09 Thread Étienne Bersac
Hello,

> scanimage -L reports: 
> device `plustek:libusb:003:003' is a Canon N1220U USB flatbed scanner

User should have 

bersace@celebrad:~$ scanimage -L
device `plustek:libusb:002:002' is a Canon CanoScan N1220U flatbed 
scanner
     ^^^

The USB in "USB flatbed scanner" is very annoying since that make type
parsing hard if an app want to show an icon representing the type of the
device. I guess an enum should be better than string.

> SANE_TYPE_OPTION does not exist

Sorry, i meant SANE_TYPE_{BOOL,INT,FIXED,STRING}.

The 5 options "button" have SANE_TYPE_BOOL as type (in
SANE_Option_Descriptor struct). That should be SANE_TYPE_BUTTON.

Thanks.

?tienne.
-- 
Verso l'Alto !



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

2006-08-09 Thread Gerhard Jaeger
On Tuesday 08 August 2006 17:28, ?tienne Bersac wrote:
> Hello,
> 
> I own a flatbed scanner Canon CanoScan N1220U. The device name is
> "plustek:libusb:002:002". I find some bug in that backend or at least in
> that device support.
> 
>   * The product name is "N1220U" instead of "CanoScan N1220U"
>   * The option group "buttons" has 5 readonly options "button" of
> type SANE_TYPE_OPTION instead of SANE_TYPE_BUTTON
>   * the device type is "USB flatbed scanner" instead of "flatbed
> scanner".
> 
> I do not have such bug with an HP all-in-one printer. So i guess this
> are backend bug.
> 

Hi,

maybe I'm ignorant, but I could not find a BUG! The backend works okay.
The informations I got from i.e. xsane are correct. The model name
printed on my scanner is: CanoScan N1220U.
scanimage -L reports: 
device `plustek:libusb:003:003' is a Canon N1220U USB flatbed scanner
--> so what?

SANE_TYPE_OPTION does not exist - also I only see 1 button. 
At least that's what I see here. 

Could you be please more specific?

Thanks
Gerhard




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

2006-08-08 Thread Étienne Bersac
Hello,

I own a flatbed scanner Canon CanoScan N1220U. The device name is
"plustek:libusb:002:002". I find some bug in that backend or at least in
that device support.

  * The product name is "N1220U" instead of "CanoScan N1220U"
  * The option group "buttons" has 5 readonly options "button" of
type SANE_TYPE_OPTION instead of SANE_TYPE_BUTTON
  * the device type is "USB flatbed scanner" instead of "flatbed
scanner".

I do not have such bug with an HP all-in-one printer. So i guess this
are backend bug.

Thanks.
-- 
Verso l'Alto !