[sane-devel] Problems in 1.0.18, sane_fujitsu, USB fi5120C.

Lonny Granstrom lonnyg at Binsons.Com
Fri Dec 8 16:43:56 CET 2006


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 [ "${SCAN_USING_FLATBED}" -eq 1 ]; then
       if [ "${DEBUG}" == "Yes" ]; then
         (
          echo "Scanning Command:"
          echo "${SCAN_SCRIPT_FULL} ${SCAN_OPT_FULL} >${OUTPUT_FILE} 2>${SCAN_LOG}"
         ) 1>>${DEBUG_LOG}
       fi
       (
        ${SCAN_SCRIPT_FULL} ${SCAN_OPT_FULL} >${OUTPUT_FILE} 2>${SCAN_LOG}
       )
       SCAN_RTN="${?}"
     else
       if [ "${DEBUG}" == "Yes" ]; then
         (
          echo "Scanning Command:"
          echo "${SCAN_SCRIPT_FULL} ${SCAN_OPT_FULL} ${OUTPUT_FILE} 2>${SCAN_LOG}"
         ) 1>>${DEBUG_LOG}
       fi
       ## --command not executing properly using 1.0.18 below-- ##
       ${SCAN_SCRIPT_FULL} ${SCAN_OPT_FULL} ${OUTPUT_FILE} 2>${SCAN_LOG}
       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: 
     ${SCAN_SCRIPT_FULL} "${SCAN_OPT_FULL}" ${OUTPUT_FILE} 2>${SCAN_LOG}
   produces the error:
     scanadf: unrecognized option, `${SCAN_OPT_FULL}`

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.



More information about the sane-devel mailing list