List Info

Thread: Problems in 1.0.18, sane_fujitsu, USB fi5120C.




Problems in 1.0.18, sane_fujitsu, USB fi5120C.
user name
2006-12-08 15:43:56
Hello,

HISTORY:
Have been using SANE scanimage & scanadf running through
BASH scripts since Feb2005.
All command arguments are added & assembled using
database stored strings.
Example for fi4220C2:
	Model Default = "--mode Lineart --resolution 150
--y-resolution 150"
        Duplex ADF = "--source ADF --duplex both"
        Color Scan = "--mode Color"
BASH scripts take all these strings and produce:
"--mode Color --resolution 150 --y-resolution 150
--source ADF --duplex both"

PROBLEM:
Latest release for sane-fujitsu in July2006 (1.0.18) has
broken BASH scripts.

COMMAND HELP ISSUES (1.0.18):
1. Running scanadf/scanimage --help -d <USB-fi5120C>
documents arguments that
   are NOT accepted: --pagewidth, --pageheight.
2. Help messages for -x, -y, --pagewidth, & --pageheight
do NOT provide proper
   information, descriptions are all the same.
   (e.g., for ADF, both -l and -x MUST be used to properly
mimic the missing
          --pagewidth argument)
3. Changes to --source options are misleading.
   (e.g,; --source ADF Front [as documented default] does
NOT work,
          fact that value MUST be quoted is not indicated.
          Command that works: --source 'ADF Front' or
--source "ADF Front")
4. All these issues have been addressed and corrected in
database.

FUNCTIONAL ISSUES:
[NOTE: none of the following occurs if --source ommitted
(using default)]
A. Running the command from same BASH script now fails 100%
with the following:
     scanadf: setting of option --source failed (Invalid
argument)
   Code from bash script:
     #!/bin/bash
     ...
     # Execute SCAN command
     if [ "$" -eq 1 ]; then
       if [ "$" == "Yes" ]; then
         (
          echo "Scanning Command:"
          echo "$ $
>$ 2>$"
         ) 1>>$
       fi
       (
        $ $
>$ 2>$
       )
       SCAN_RTN="${?}"
     else
       if [ "$" == "Yes" ]; then
         (
          echo "Scanning Command:"
          echo "$ $
$ 2>$"
         ) 1>>$
       fi
       ## --command not executing properly using 1.0.18
below-- ##
       $ $ $
2>$
       SCAN_RTN="${?}"
     fi

B. Cut & Paste of expanded syntax from debug log works
from the command Line.
   Expanded syntax from debug log (line space separates
script variables):
     /usr/local/bin/scanadf                                 
 

            --device-name net:ws198:fujitsu                 
 
            --mode Color --resolution 150 --y-resolution 150
 
            --source 'ADF Duplex' -l 62.4 -x 100.0 -y 60.0  
 
            --scan-script /usr/local/bin/scanpnm2tif.sh     
 
            --start-count 1                                 
 

            --output-file /tmp/scan/scannedimg%03d.pnm      
 

            2>/tmp/scan/status.scn
   Two TIFF files, scannedimg001.tif & scannedimg002.tif
are created showing front
   and back of document scanned.

C. Replacing single-quotes with double-quotes does not
change A. & B. results.
      --source "ADF Duplex"

D. Placing double-quotes in BASH Script syntax: 
     $ "$"
$ 2>$
   produces the error:
     scanadf: unrecognized option, `$`

E. If ran from the command line - same error occurs.
   Expanded syntax from debug log (line space separates
script variables):
     /usr/local/bin/scanadf                                 
 

            "--device-name net:ws198:fujitsu           
      
            --mode Color --resolution 150 --y-resolution 150
 
            --source 'ADF Duplex' -l 62.4 -x 100.0 -y 60.0  
 
            --scan-script /usr/local/bin/scanpnm2tif.sh     
 
            --start-count 1"                           
      

            --output-file /tmp/scan/scannedimg%03d.pnm      
 

            2>/tmp/scan/status.scn

Any help or suggestions would be appreciated?

-- 
Regards,
Lonny L. Granstrom
Binson's Home Health Care Centers
t:586-755-2300  f:586-755-2322
MIS Department (ext: 3372)
--
This message is intended only for the use of the individual
or entity to which it is addressed, and may contain
information that is privileged, confidential, and exempt
from disclosure under applicable law.  If the reader of this
message is not the intended recipient, you are hereby
notified that any dissemination, distribution, or copy of
this communication is strictly prohibited.  If received in
error, please destroy.

-- 
sane-devel mailing list: sane-devellists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
             to sane-devel-requestlists.alioth.debian.org
Problems in 1.0.18, sane_fujitsu, USB fi5120C.
user name
2006-12-13 00:33:04
On Fri, 8 Dec 2006, Lonny Granstrom wrote:

> PROBLEM:
> Latest release for sane-fujitsu in July2006 (1.0.18)
has broken BASH scripts.

yes. the fujitsu backend has been nearly completely
rewritten between sane 
1.0.17 and .18. Many of the options provided by the backend
may have 
changed names or take a different range of options. if your
scripts are 
coded to look for certain option names, they will no longer
work.

>
> COMMAND HELP ISSUES (1.0.18):
> 1. Running scanadf/scanimage --help -d
<USB-fi5120C> documents arguments that
>  are NOT accepted: --pagewidth, --pageheight.

what do you mean 'NOT accepted', do you get an error?

> 2. Help messages for -x, -y, --pagewidth, &
--pageheight do NOT provide 
> proper
>  information, descriptions are all the same.

what messages do they provide? my copy says:

     -x 0..224.846mm (in steps of 0.0211639) [215.872]
         Width of scan-area.
     -y 0..863.489mm (in steps of 0.0211639) [279.364]
         Height of scan-area.
     --pagewidth 0..224.846mm (in steps of 0.0211639)
[215.872]
         Must be set properly to align scanning window
     --pageheight 0..863.489mm (in steps of 0.0211639)
[279.364]
         Must be set properly to eject pages

>  (e.g., for ADF, both -l and -x MUST be used to
properly mimic the missing
>         --pagewidth argument)

-l and -x are not the same as --pagewidth. the last tells
the scanner the 
size of the paper so it can decide where the left margin on
the adf 
is located. the other two set the location of the area that
will be 
scanned. note that the pagewidth must be larger than the
location you are 
trying to scan, or you will likely get an error.

> 3. Changes to --source options are misleading.
>  (e.g,; --source ADF Front [as documented default] does
NOT work,
>         fact that value MUST be quoted is not
indicated.
>         Command that works: --source 'ADF Front' or
--source "ADF Front")

this is common to all multi-word options accessed by
scanimage, and not 
fujitsu specific. the output that you see is generated by
scanimage. 
perhaps scanimage could check for whitespace inside a string
arg, and put 
quotes around it before display.

> FUNCTIONAL ISSUES:
> [NOTE: none of the following occurs if --source
ommitted (using default)]
> A. Running the command from same BASH script now fails
100% with the 
> following:
>    scanadf: setting of option --source failed (Invalid
argument)

[snip]

> Any help or suggestions would be appreciated?

maybe escape the quotes with a  when you build your
SCAN_OPTS variable?
this is really a bash question, not a sane question.

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

-- 
sane-devel mailing list: sane-devellists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
             to sane-devel-requestlists.alioth.debian.org
Problems in 1.0.18, sane_fujitsu, USB fi5120C.
user name
2006-12-14 16:34:37
Allen,

m. allan noah wrote:
> On Fri, 8 Dec 2006, Lonny Granstrom wrote:
> 
>> PROBLEM:
>> Latest release for sane-fujitsu in July2006
(1.0.18) has broken BASH 
>> scripts.
> 
> yes. the fujitsu backend has been nearly completely
rewritten between 
> sane 1.0.17 and .18. Many of the options provided by
the backend may 
> have changed names or take a different range of
options. if your scripts 
> are coded to look for certain option names, they will
no longer work.
> 
>>
>> COMMAND HELP ISSUES (1.0.18):
>> 1. Running scanadf/scanimage --help -d
<USB-fi5120C> documents 
>> arguments that
>>  are NOT accepted: --pagewidth, --pageheight.
> 
> what do you mean 'NOT accepted', do you get an error?

EX: scanimage/scanadf -d <USB-fi5120C> --pagewidth
100.0
    ERROR: scanimage:/scanadf: sane_start: Invalid Argument.
EX: scanimage/scanadf -d <USB-fi5120C> --pageheight
60.0
    ERROR: None. Eject occurs 60.0mm & Image not
cropped, height = 215.872mm.
EX: scanimage/scanadf -d <USB-fi5120C> -y 60.0
    ERROR: None. Eject occurs 60.0mm & Image cropped
properly to 60.0mm.

> 
>> 2. Help messages for -x, -y, --pagewidth, &
--pageheight do NOT 
>> provide proper
>>  information, descriptions are all the same.
> 
> what messages do they provide? my copy says:
> 
>     -x 0..224.846mm (in steps of 0.0211639) [215.872]
>         Width of scan-area.
>     -y 0..863.489mm (in steps of 0.0211639) [279.364]
>         Height of scan-area.
>     --pagewidth 0..224.846mm (in steps of 0.0211639)
[215.872]
>         Must be set properly to align scanning window
>     --pageheight 0..863.489mm (in steps of 0.0211639)
[279.364]
>         Must be set properly to eject pages
>

Help messaages match - but references to ADF use dropped.
 
>>  (e.g., for ADF, both -l and -x MUST be used to
properly mimic the 
>> missing
>>         --pagewidth argument)
> 
> -l and -x are not the same as --pagewidth. the last
tells the scanner 
> the size of the paper so it can decide where the left
margin on the adf 
> is located. the other two set the location of the area
that will be 
> scanned. note that the pagewidth must be larger than
the location you 
> are trying to scan, or you will likely get an error.

So this means what?
The .17 command:
  "scanadf -d <device> --pagewidth 100.0
--pageheight 60.0"
that produced correct results, a scanned image from the ADF
100mm x 60mm
automatically centered [matching adjustable paper guide
movements], now
should be the .18 command:
  "scanadf -d <device> -l 62.4 -x 100.0 -y
60.0"
to produce the same results?
These 2 versions produce nearly identical results in the PNM
file from our testing
(--pageheight is unnecessary for .18 expected results).

RELATED: if I change the values to be EXACT: -? 60.0 =>
-? 59.9998 still get;
"scanimage:/scanadf: rounded value of br-? from 59.9998
to 59.9998"

> 
>> 3. Changes to --source options are misleading.
>>  (e.g,; --source ADF Front [as documented default]
does NOT work,
>>         fact that value MUST be quoted is not
indicated.
>>         Command that works: --source 'ADF Front' or
--source "ADF Front")
> 
> this is common to all multi-word options accessed by
scanimage, and not 
> fujitsu specific. the output that you see is generated
by scanimage. 
> perhaps scanimage could check for whitespace inside a
string arg, and 
> put quotes around it before display.
> 
>> FUNCTIONAL ISSUES:
>> [NOTE: none of the following occurs if --source
ommitted (using default)]
>> A. Running the command from same BASH script now
fails 100% with the 
>> following:
>>    scanadf: setting of option --source failed
(Invalid argument)
> 
> [snip]
> 
>> Any help or suggestions would be appreciated?
> 
> maybe escape the quotes with a  when you build your
SCAN_OPTS variable?
> this is really a bash question, not a sane question.
>

Did find a BASH solution to this.
 
> allan
> 

-- 
Regards,
Lonny L. Granstrom
Binson's Home Health Care Centers
t:586-755-2300  f:586-755-2322
MIS Department (ext: 3372)
--
This message is intended only for the use of the individual
or entity to which it is addressed, and may contain
information that is privileged, confidential, and exempt
from disclosure under applicable law.  If the reader of this
message is not the intended recipient, you are hereby
notified that any dissemination, distribution, or copy of
this communication is strictly prohibited.  If received in
error, please destroy.

-- 
sane-devel mailing list: sane-devellists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
             to sane-devel-requestlists.alioth.debian.org
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )