Scanner HOWTO mtekscan

Jan Schoenepauck

schoenep@uni-wuppertal.de

愳娸椙帯

kawagishi@pa.aix.or.jp

1997/08/10

Revision History                                                       
Revision 戞 1 斉                       1997擭8寧10擔                   

MicroTek 惢 SCSI 僗僉儍僫 ScanMaker 梡僪儔僀僶 "mtekscan v0.2" 晅懏偺僪
僉儏儊儞僩偺東栿

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Table of Contents
偙偺暥彂偵偮偄偰
1. mtekscan v0.2 偵晬懏偺 README
   
    1.1. 偼偠傔偵
    1.2. 挊嶌尃偵偮偄偰
    1.3. 僀儞僗僩乕儖
    1.4. 懠偺 MicroTek 惢僗僉儍僫偱 mtekscan 傪巊偆偵偼
    1.5. SCSI 偺愝掕
    1.6. 僶僌曬崘
    1.7. 嶌幰傊偺楢棈曽朄
    1.8. 僜乕僗
   
2. mtekscan v0.2 偵晬懏偺儅僯儏傾儖 (僼傽僀儖柤丗 mtekscan.1)
3. mtekscan v0.2 偵晬懏偺 TODO
4. tkscan 偺徯夘

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

偙偺暥彂偵偮偄偰

    "mtekscan" - MicroTek 惢 SCSI 僗僉儍僫梡僪儔僀僶
   
偙偺僪僉儏儊儞僩偼 Linux 忋偱 MicroTek 惢偺 SCSI 僗僉儍僫 ScanMaker 傪
巊梡偡傞偨傔偺僪儔僀僶偱偁傞 mtekscan v0.2 偵晅懏偺壓婰偺俁偮偺僪僉儏儊
儞僩傪嶌幰 Jan Schoenepauck 巵偺嫋壜傪摼偰東栿偟偨傕偺偱偡丅

 1. Linux Driver for MicroTek SCSI scanners
   
          Copyright (c) 1996, 1997 by Jan Schoenepauck /
     Fast Forward Productions
          尦偺僼傽僀儖柤丗 README (mtekscan v0.2 偵晅懏)
          僼傽僀儖偺擔晅丗 Apr 14 1997
          嶌幰          丗 Jan Schoenepauck <schoenep@uni-wuppertal.de>
   
 2. mtekscan(1), mtekscan manual
   
          尦偺僼傽僀儖柤丗 mtekscan.1 (mtekscan v0.2 偵晅懏)
          僼傽僀儖偺擔晅丗 Apr 14 1997
          嶌幰          丗 Jan Schoenepauck <schoenep@uni-wuppertal.de>
   
 3. Things I plan to add/improve/fix in future releases:
   
          尦偺僼傽僀儖柤丗 TODO (mtekscan v0.2 偵晅懏)
          僼傽僀儖偺擔晅丗 Apr 14 1997
          嶌幰          丗 Jan Schoenepauck <schoenep@uni-wuppertal.de>
   
傑偨丄mtekscan 傪 GUI 偱妶梡偡傞僜僼僩偲偟偰

 4. tkscan 偺徯夘
   
傪壛偊傑偟偨丅偙傟偼巹(愳娸椙帯)偑嶌惉偟傑偟偨丅

忋婰 (1)(2)(3)偺擔杮岅栿偲(4)偺挊嶌尃偼愳娸椙帯偵偁傝傑偡丅僐僺乕丄攝晍
側偳偵娭偟偰偼丄埲壓偵弌偰偔傞僆儕僕僫儖偺挊嶌尃昞帵偺撪梕偵弨偠傑偡丅

  嶌惉擔 丗 1997擭8寧10擔
  東栿幰 丗 愳娸 椙帯 (kawagishi@pa.aix.or.jp)

亂栿拲亃僼傽僀儖偺擖庤偲揥奐

偙偺僜僼僩偼壓婰偐傜擖庤偱偒傑偡丅

 丒 ftp://sunsite.unc.edu/pub/Linux/apps/graphics/capture/
    mtekscan-x.x.tar.gz
   
偙傟傪僟僂儞儘乕僪偟偨傜師偺傛偆偵偟偰 /usr/src/ 僨傿儗僋僩儕偵揥奐偟傑
偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  # cd  /usr/src                                                    劆
劆  # tar xvfz ~/mtekscan-x.x.tar.gz                                  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

(忋婰偼 tkscan-x.x.tar.gz 偑丄~/ 僨傿儗僋僩儕偵偁傞応崌偱偡偑丄偦傟埲奜
偺帪偼偦偺僨傿儗僋僩儕偵崌傢偣偰曄偊偰壓偝偄) /usr/src/mtekscan-x.x/ 僨
傿儗僋僩儕偑嶌傜傟丄偦偙偵僼傽僀儖偑揥奐偝傟傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Chapter 1. mtekscan v0.2 偵晬懏偺 README

1.1. 偼偠傔偵

偙偺僪儔僀僶偼丄Linux 忋偱 MicroTek ScanMaker SCSI 僗僉儍僫傪巊梡偱偒傞
傛偆偵偟傑偡丅夋憸傪僗僉儍儞偟丄昗弨弌椡(傑偨偼巜掕偟偨僼傽僀儖)偵 PBM
/ PGM / PPM 僼僅乕儅僢僩偱弌椡偡傞偨傔偺僔儞僾儖側僐儅儞僪儔僀儞偺僾儘
僌儔儉偱偡丅 WINDOWS 偺 TWAIN 僪儔僀僶傗丄 Macintosh 偺僗僉儍僯儞僌丒僾
儔僌僀儞偺傛偆側 flashy 側僌儔僼傿僇儖僀儞僞僼僃乕僗(巹偼偙傟偱巇帠偟偰
偄傑偡偑)偼偁傝傑偣傫偑丄偪傖傫偲摦嶌偟傑偡丅

弌椡偵曄姺偡傞偨傔偵 pbm 僷僢働乕僕傪巊梡偱偒傑偡丅椺偊偽丄GIF 偺夋憸僼
傽僀儖傪嶌惉偡傞偵偼丄師偺傛偆偵偟傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  mtekscan -f 0 0 2 2 -r 72 -c | ppmquant 256 | ppmtogif > scan.gif 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偁傞偄偼丄僗僉儍儞偟偨夋憸傪 xv 偱捈愙昞帵偡傞偵偼壓婰偺傛偆偵偟傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  mtekscan -f 1 0 4.6 2.4 -r 150 -g | xv -                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

僐儅儞僪儔僀儞偺僆僾僔儑儞傗僗僀僢僠偺愢柧偼丄 man page 傪偛棗壓偝偄丅
偁傞偄偼丄

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  mtekscan -h                                                       劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偱傕椙偄偱偡丅

 

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆                   偙傟偼儀乕僞斉偺僾儘僌儔儉偱偡                   劆
劌劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劎
劆偙偺僾儘僌儔儉偺曐徹偼慡偔偁傝傑偣傫丅偁側偨偺僐儞僺儏乕僞傗僗僉儍僫劆
劆偑敋敪偟偰傕丄偁傞偄偼偁側偨偺僔僗僥儉偑僋儔僢僔儏偟偰傕巹偼愑擟傪帩劆
劆偪傑偣傫丅奐敪拞偵偼丄壗夞偐巹偺僔僗僥儉偑僋儔僢僔儏偟傑偟偨偑丄尰嵼劆
劆偺偲偙傠 "巹偺僔僗僥儉偱偼" 埨掕偟偰摦偄偰偄傑偡丅                  劆
劆                                                                    劆
劆偁側偨偑巹偲堎側傞愝掕丄椺偊偽堎側傞 SCSI 儂僗僩傾僟僾僞丄堎側傞僇乕劆
劆僱儖乛儘乕儗儀儖偺 SCSI 僪儔僀僶丄偁傞偄偼堎側傞僗僉儍僫偺応崌丄壗偑劆
劆婲偙傞偐梊尵偡傞偙偲偼偱偒傑偣傫丅                                  劆
劆                                                                    劆
劆SCSI 僴乕僪僂僃傾偲捠怣偡傞偨傔偵巊傢傟傞僇乕僱儖撪偺斈梡 SCSI僪儔僀劆
劆僶偼丄岆憖嶌傊偺懳嶔偼偝傟偰偄傑偣傫丅                              劆
劆                                                                    劆
劆岆傝偺偁傞僾儘僌儔儉偼丄僇乕僱儖偺僷僯僢僋 [1] 傗 silent lockup [2] 劆
劆傪堷偒婲偙偡壜擻惈偑偁傝傑偡丅偙偺僾儘僌儔儉偼偁側偨帺恎偺愑擟偱屼巊劆
劆梡偔偩偝偄丅僨乕僞傪幐偆偙偲偺儕僗僋傪尭傜偡偨傔偵丄僴乕僪僨傿僗僋偺劆
劆僶僢僋傾僢僾傪偲傞偲偐丄彮側偔偲傕僾儘僌儔儉傪僥僗僩偡傞慜偵僴乕僪僨劆
劆傿僗僋偺僉儍僢僔儏偑僨傿僗僋偵僼儔僢僔儏(彂偒崬傒)偝傟傞傛偆偵      劆
劆'sync' 傪幚峴偡傞偲偄偆偺偼椙偄峫偊偱偡丅                           劆
劆                                                                    劆
劆偙偺僾儘僌儔儉偼丄Linux 1.2.13 偲 2.0.26 偑憱傞 Pentium 100 儅僔儞偵劆
劆僗僉儍僫晬懏偺 Adaptec AVA-1502E SCSI 傾僟僾僞傪巊偭偰 ScanMaker E6 劆
劆傪愙懕偟偰奐敪偟傑偟偨丅                                            劆
劆                                                                    劆
劆SCSI-HOWTO 偱偼尵媦偟偰偄傑偣傫偑 AVA-1502E 偼丄AHA152x 儘乕儗儀儖僇劆
劆乕僱儖僪儔僀僶偱摦嶌偟傑偡丅                                        劆
劆                                                                    劆
劆(偙傟偑侾侽侽亾屳姺惈偑偁傞偐偳偆偐妋怣偼偁傝傑偣傫偑丄巹偺宱尡偱偼 劆
劆傕偟偦偆偱側偄偲偟偰傕丄彮偟曄傢偭偨傆傞傑偄傪偡傞掱搙偵夁偓側偄偩傠劆
劆偆偲巚偄傑偡) 巹偺僗僉儍僫偼 SCSI 僠僃乕儞偺拞偱桞堦偺僨僶僀僗偲偟偰劆
劆愙懕偝傟丄偟偐傕懠偵 SCSI 傾僟僾僞偼僀儞僗僩乕儖偝傟偰偄傑偣傫丅    劆
劆                                                                    劆
劆廬偭偰丄SCSI 僶僗偺 lockup 傗僇乕僱儖僷僯僢僋丄偁傞偄偼偦偺椶偺栤戣 劆
劆偑弌偨応崌丄壜擻側傜偽僗僉儍僫偩偗傪桞堦偺僨僶僀僗偲偟偰愙懕偟偰偐傜劆
劆丄偙偺僪儔僀僶傪帋偟偰傒偰壓偝偄丅                                  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.2. 挊嶌尃偵偮偄偰

偙偺僾儘僌儔儉偼丄Copyright (c) 1996, 1997 by Jan Schoenepauck 偱偡丅柍
椏偱巊梡丄僐僺乕丄攝晍偟偰偐傑偄傑偣傫丅

偙傟傪曄峏偟偨傝丄偦偺堦晹傪懠偺僾儘僌儔儉偵巊梡偡傞偙偲傕丄僆儕僕僫儖
偺嶌幰偑巹偱偁傞偙偲傪婰嵹偟偰偁傟偽丄帺桼偱偡丅

崱屻偺儕儕乕僗偺偨傔偵栶棫偮曄峏傪偝傟偨応崌丄巹偵嫵偊偰壓偝偄丅偙偺僾
儘僌儔儉傪彜梡偺攝晍偵擺傔傞応崌偼丄偦偺巪傪巹偵捠抦偡傞偲偲傕偵偦偺僒
儞僾儖傪巹偵偍憲傝壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.3. 僀儞僗僩乕儖

偙傟偼丄僇乕僱儖儗儀儖偺僪儔僀僶偱偼偁傝傑偣傫丅僾儘僌儔儉偼儐乕僓椞堟
偱摦嶌偟丄SCSI 僴乕僪僂僃傾(僗僉儍僫)偲捠怣偡傞偨傔偵僇乕僱儖偺拞偺斈梡
SCSI 僪儔僀僶傪巊梡偟傑偡丅廬偭偰偙傟傪憱傜偡偨傔偵偼丄僇乕僱儖偵斈梡
SCSI 僪儔僀僶僒億乕僩傪僐儞僷僀儖偡傞昁梫偑偁傝傑偡丅(摉慠 SCSI 儂僗僩
傾僟僾僞梡偺儘乕儗儀儖 SCSI 僪儔僀僶傕昁梫偱偡) [3]

僗僉儍僫偑偳偺僨僶僀僗偵儅僢僾偝傟偰偄傞偐傪抦偭偰偍偔昁梫偑偁傝傑偡丅
(偙傟偼捠忢丄/dev/sga, /dev/sgb ... /dev/sgh 偺偳傟偐偱偡偑丄/dev/sg0,
/dev/sg1 ... 偺傛偆偵屇傇儅僔儞傕懚嵼偟傑偡) SCSI 僨僶僀僗偼僽乕僩帪偵
摦揑偵妱傝摉偰傜傟丄庒偄曽偐傜弴偵 ID 偑巊傢傟傑偡丅僗僉儍僫偑 SCSI 僠
僃乕儞偺拞偱桞堦偺僨僶僀僗側傜偽丄忢偵 /dev/sga 偱偁傝丄偳傫側 ID 偑僙
僢僩偝傟偰偄偰傕娭學偁傝傑偣傫丅僗僉儍僫僨僶僀僗偵 symlink 傪嶌傞偺偼椙
偄峫偊偱偡丅 (忋婰偺椺偱偼 /dev/sga 偵 /dev/scanner 偺儕儞僋傪挘傞 ) 偙
偆偡傟偽丄僨僶僀僗偺儅僢僺儞僌傪曄峏(偙傟偼僗僉儍僫傛傝庒偄 ID 偺 SCSI
僨僶僀僗傪捛壛愙懕偟偨応崌偵婲偒傑偡)偟偨偲偒偵 mtekscan 傪嵞僐儞僷僀儖
偡傞昁梫偼側偔扨偵儕儞僋傪挘傝捈偡偩偗偱嵪傒傑偡丅偙傟偵晅悘偡傞忣曬偑
偙傟傛傝屻偺乽SCSI 偺愝掕乿偺崁偵偁傞偺偱偛棗壓偝偄丅

僐儞僷僀儖偡傞慜偵丄config.h 僼傽僀儖傪尒偰壓偝偄丅 DEFAULT_DEVICE 偵惓
偟偄斈梡 SCSI 僨僶僀僗 (偁傞偄偼僔儞儃儖儕儞僋傪挘偭偨応崌偼 symlink)
傪僙僢僩偟偰壓偝偄丅偁側偨偑 ScanMaker E6 傪偍帩偪側傜丄偨傇傫懠偵愝掕
偼昁梫側偄偱偟傚偆丅 (僨僼僅儖僩偺僗僉儍儞僯儞僌僆僾僔儑儞傪曄峏偟偨偄
偲巚偆偱偟傚偆偑) 偟偐偟偙傟埲奜偺 MicroTek 惢僗僉儍僫偱偙偺僪儔僀僶傪
帋偟偰傒偨偄応崌偼丄嵟戝夝憸搙偺抣偺曄峏偲丄偨傇傫 FIX_FRAMESIZE 傪 0
偵僙僢僩偡傞昁梫偑偁傞偱偟傚偆(僗僉儍儞偟偨夋憸偑娫堘偭偨僒僀僘丄偁傞偄
偼夝憸搙偩偭偨傜偙偺俀偮傪帋偟偰壓偝偄) 偙傟傛傝屻偺乽懠偺 MicroTek 惢
僗僉儍僫偱 mtekscan 傪巊偆偵偼乿偺崁傪嶲徠丅 [4] 

config.h file 偺妋擣偑廔偭偨傜丄(昁梫偵墳偠偰) Makefile 偺愭摢偺愝掕傪
曇廤偟傑偡丅僀儞僋儖乕僪僼傽僀儖偺 sg.h 偵偁傞斈梡僪儔僀僶傊偺僷僗偑惓
偟偄偙偲傪妋擣偟偰壓偝偄丅偙傟偼丄屆偄僇乕僱儖偺応崌偼偨傇傫 /usr/src/
linux/drivers/scsi/ 傑偨偼 kernel v1.3.98 偱偼丄 /usr/src/linux/include
/scsi/ 偱偡丅 (僇乕僱儖偺僜乕僗偺僷僗偑 /usr/src/linux 偱偁傞応崌)

怴偟偄僇乕僱儖僶乕僕儑儞偱偼 /usr/include/scsi 偐傜儕儞僋偑懚嵼偡傞敜偱
偡偑丄傕偟柍偄偲偒偼怴偨偵偦傟傪嶌傞昁梫偑偁傝傑偡丅偙偺曽朄偼丄
Makefile 偺僷僗偺柺搢側愝掕傪偡傞昁梫偑偁傝傑偣傫丅偙傟傪偳偆傗偭偰峴偆
偺偐偛懚抦偱側偄応崌偼丄/usr/src/linux/README 傪偛棗壓偝偄丅 [5] 

嵟屻偵 'make' 傪幚峴偟傑偡丅 mtekscan 傪惓偟偔僀儞僗僩乕儖偟偨偄側傜
root (僗乕僷乕儐乕僓)偱 ' make install' 傪幚峴偟傑偡丅偙傟偼幚峴僼傽僀
儖偲 manpage 傪巜掕偟偨応強偵僐僺乕偟傑偡丅 [6] 

偦傟偱偼丄僗僉儍僫僨僶僀僗偑儕乕僪乛儔僀僩壜擻偐丄僗僉儍僫偑愙懕偝傟僽
乕僩帪偵婲摦偝傟傞偐(偙傟偼僽乕僩僼僃乕僘偺婜娫拞偵専弌偝傟偰偄側偗傟偽
側傜側偄)傪妋擣偟偰壓偝偄丅僗僉儍僫偺墳摎傪妋擣偡傞偨傔偵 'mtekscan -I'
傪幚峴偟偰壓偝偄丅偙傟傜偺揰偑偡傋偰偆傑偔偄偭偨傜丄偙傟偱僗僉儍儞偱偒
傞敜偱偡丅 mtekscan 偺懡偔偺僆僾僔儑儞偲僗僉儍僫偺愝掕偵偮偄偰 man 儁乕
僕傪撉傫偱壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.4. 懠偺 MicroTek 惢僗僉儍僫偱 mtekscan 傪巊偆偵偼

偙偺僾儘僌儔儉偼 ScanMaker E6 梡偵彂偐傟妿偮僥僗僩偟傑偟偨偑丄婎杮揑偵
摨偠 SCSI 僾儘僌儔儉僀儞僞僼僃乕僗傪帩偮 MicroTek 偺怴偟偄僗僉儍僫偺儌
僨儖偱傕摦嶌偟傑偡丅

mtekscan 偼丄ScanMaker II,ScanMaker IIXE, ScanMaker IIHR, ScanMaker E3,
ScanMaker III, ScanMaker 35t+ 偱 (偦偟偰傕偪傠傫 E6 傕) 摦嶌偟偨偲曬崘
偝傟偰偄傑偡丅傑偨丄 Adara ImageStar I (Adara 偼 MicroTek 偲側傫傜偐偺
娭學偑偁傞偲巚偆) Genius ColorPage-SP2 (ScanMaker E3 偲屳姺惈偑偁傞傛偆
偵傒偊傞) Primax Deskscan Color (偙傟偼婎杮揑偵 ScanMaker II 偲摨偠儅僔
儞偱偡) 偱傕摦嶌偟傑偡丅

傕偪傠傫僒億乕僩偟偰偄傞偺偼 SCSI 偺僗僉儍僫偺傒偱偡丅堎側傞傾僟僾僞僇
乕僪傪夘偟偰愙懕偝傟偰偄傞僗僉儍僫偼丄慡偔摦嶌偟傑偣傫丅

摟夁尨峞偺僗僉儍儞僯儞僌傕摦嶌偡傞敜偱偡偑丄巹偼摟夁尨峞儐僯僢僩傪帩偭
偰偄側偄偺偱偙偺僥僗僩偼偟偰偄傑偣傫丅 ADF (Automatic Document Feeder丗
帺摦媼巻憰抲) 偺僒億乕僩傕傑偩懳墳偟偰偄傑偣傫丅巹偼偙傟傪帩偭偰偄傑偣
傫偑丄ADF 偺僒億乕僩偑昁梫側傜巹偵楢棈偟偰壓偝偄丅扐偟丄巹偵楢棈偡傞慜
偵丄屻弎偺乽僶僌曬崘乿偺崁偵偳傫側帠偑彂偐傟偰偄傞偐傪尒偰壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.5. SCSI 偺愝掕

斈梡 SCSI 僇乕僱儖僪儔僀僶傪僐儞僷僀儖偡傞慜偵丄sg.h 僼傽僀儖偺
SCSI_BIG_BUF 偺抣偲偟偰丄彮側偔偲傕侾僗僉儍儞儔僀儞暘偵娷傑傟傞僨乕僞傛
傝傕廩暘戝偒偄抣 (偙傟偼僗僉儍僫偺嵟戝夝憸搙偵埶懚偟傑偡)傪僙僢僩偡傞偙
偲傪悇彠偟傑偡丅巹偺僇乕僱儖僜乕僗偼丄偙傟傪 32768 偵僙僢僩偟偰偄傑偡偑
偙傟偱 OK 偺傛偆偱偡丅彫偝偄抣偱偼丄僗僉儍僫偑旕忢偵彫偝側偐偨傑傝偱偦
偺僨乕僞傪憲怣偟側偗傟偽側傜側偄偺偱丄僗僉儍儞偑偐側傝抶偔側傝傑偡丅
sg.h 僼傽僀儖偼丄屆偄僇乕僱儖偺応崌偼偨傇傫 /usr/src/linux/drivers/scsi
偵偁傝丄怴偟偄僶乕僕儑儞 (1.3.98 埲忋)偺僇乕僱儖側傜 /usr/src/linux/
include/scsi 偵偁傞偱偟傚偆丅 /usr/include/scsi 偐傜丄僇乕僱儖僜乕僗偺
僨傿儗僋僩儕偵憡摉偡傞儕儞僋偑懚嵼偟側偗傟偽側傝傑偣傫丅

儂僗僩傾僟僾僞梡偺儘乕儗儀儖偺 SCSI 僇乕僱儖僪儔僀僶偲丄斈梡 SCSI僪儔僀
僶傪儌僕儏乕儖偲偟偰僐儞僷僀儖偡傞偺偼椙偄峫偊偩偲巚偄傑偡丅偦偆偡傟偽
屆偄僇乕僱儖傪偍巊偄偺応崌丄僽乕僩偡傞慜偵僗僉儍僫偺揹尮傪 ON 偟偰偍偐
側偔偰傕傛偄偐傜偱偡丅(巹偼偙傟傪傛偔朰傟傑偡...) 僪儔僀僶儌僕儏乕儖傪
(儘乕僪偝傟偰偄偨側傜)傾儞儘乕僪偟丄僗僉儍僫偺揹尮傪 ON 偟偰偐傜丄僪儔
僀僶儌僕儏乕儖傪儘乕僪偡傞昁梫偑偁傝傑偡丅偦偆偱側偗傟偽丄僗僉儍僫偺揹
尮傪 ON 偟偰偐傜丄儕僽乕僩偡傞昁梫偑偁傝傑偡丅怴偟偄僇乕僱儖偼丄/proc/
scsi/scsi 偺愝掕偵傛偭偰 SCSI 僨僶僀僗偺摦揑側捛壛偲庢傝奜偟偺暿偺曽朄
傪僒億乕僩偟丄妿偮僨僶僀僗儅僢僺儞僌偺曄峏傕壜擻偱偁傞偙偲偵拲堄偟偰壓
偝偄丅徻偟偔偼丄僇乕僱儖僜乕僗偺僪僉儏儊儞僩丄SCSI-HOWTO,
SCSI-Programming-HOWTO 傪嶲徠偟偰壓偝偄丅

Thomas Kuerten <kuerten@informatik.tu-muenchen.de> 偼丄 Adaptec
AHA-2940 僇乕僪偵僗僉儍僫偑愙懕偝傟偰偄傞応崌丄(僽乕僩帪偵 Alt-A 傪墴偟
偰昞帵偝傟傞儊僯儏乕偱)僗僉儍僫偺 SCSI ID梡偵嵟戝揮憲懍搙偼 5 MB/s 偱丄
摨婜僱僑僔僄乕僔儑儞偼僨傿僗僄乕僽儖偵僙僢僩偟側偗傟偽側傜側偄偲巜揈偟
偰偄傑偡丅偍偦傜偔丄懠偺傾僟僾僞偱傕偙偺傛偆側愝掕偑(弌棃傞側傜)昁梫偱
偟傚偆丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.6. 僶僌曬崘

mtekscan 偼丄尰嵼巹偺僔僗僥儉(ScanMaker E6) 偱埨掕偟偰摦嶌偟偰偄傑偡偑
丄傑偩偄偔偮偐僶僌偑偁傞偐傕偟傟傑偣傫丅摿偵巹帺恎偑巊偆偙偲偺偱偒側偄
僾儘僌儔儉偺堦晹偵偱偡丅偡側傢偪丄E6 埲奜偺 MicroTek 僗僉儍僫丄3僷僗偺
摟夁僗僉儍儞偱偡丅巹偵偼尰帪揰偱偼僼傿僢僋僗弌棃側偄婛抦偺僶僌偑偄偔偮
偐偁傝丄偙傟偼 manpage 偺 BUGS 偺崁偵彂偄偰偁傝傑偡丅

巹埗偵儊乕儖傪弌偡慜偵 TODO 僼傽僀儖偵傕栚傪捠偟偰偍偄偰壓偝偄丅偙傟偵
偼丄僶僌丄傾僀僨傾丄夵椙揰偵娭偟巹偑婛偵婥偑晅偄偰偄傞偙偲偑彂偄偰偁傝
傑偡丅嵟屻偵丄巹偼嵟怴偺曄峏偲忣曬傪 Fast Forward 偺 WEB 僒僀僩偱偁傞 
http://fb4-1112.uni-muenster.de/ffwd/ <http://fb4-1112.uni-muenster.de/
ffwd/> 偺 WWW 偺儁乕僕偱岞奐偟傑偡丅

傕偟壗傜偐偺僶僌傪敪尒偝傟偨傜巹埗偵 E-mail 傪壓偝偄丅偦偺嵺丄偍巊偄偺
僗僉儍僫偺儌僨儖丄夝憸搙丄SCSI 傾僟僾僞傪嫵偊偰壓偝偄丅 mtekscan 傪 -I
僗僀僢僠傪晅偗偰幚峴偟偨帪偵摼傜傟傞僗僉儍僫忣曬偺僐僺乕傕昁偢娷傔偰壓
偝偄丅偦偟偰丄壗偐傪僗僉儍儞弌棃傞偑婏柇偵尒偊傞応崌偼丄偦傟偺僐僺乕(傕
偪傠傫偁傑傝戝偒偡偓側偄僒僀僘丄50x50 僺僋僙儖偺夋憸偱廩暘偱偟傚偆)偲丄
偁側偨偑巊傢傟偨僐儅儞僪儔僀儞偺僗僀僢僠傕憲偭偰壓偝偄 -- 偙傟偼壗偑埆
偄偺偐傪夝愅偡傞偺偵旕忢偵栶棫偪傑偡丅巹偼僶僌僼傿僢僋僗偲夵椙偺搘椡偼
偟傑偡偑丄"壗傕栺懇偡傞偙偲偼偱偒傑偣傫"丅尰嵼傕傑偨彨棃偺僶乕僕儑儞偵
墬偄偰傕丄偙偺僪儔僀僶偺摦嶌偼曐徹偟傑偣傫丅

傕偪傠傫丄傾僀僨傾傗屼堄尒偼娊寎偟傑偡丅傑偨丄偁側偨偑偙偺僾儘僌儔儉傪
巊傢傟偰僴僢僺乕偱偁傞偲偄偆曬崘傪暦偔偺偼戝岲偒偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.7. 嶌幰傊偺楢棈曽朄

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  捠忢偺梄曋丗 Jan Schoenepauck                                     劆
劆               Magdalenenstr. 8                                     劆
劆               48143 Muenster                                       劆
劆               Germany                                              劆
劆                                                                    劆
劆  揹巕儊乕儖丗 schoenep@uni-wuppertal.de                            劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

巹偨偪偺僾儘僕僃僋僩偺嵟怴忣曬偲傾僢僾僨乕僩偵娭偟偰偼 Fast Forward 偺
WWW 僒僀僩 http://fb4-1112.uni-muenster.de/ffwd/ <http://
fb4-1112.uni-muenster.de/ffwd/> 傪僠僃僢僋偟偰壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1.8. 僜乕僗

偙偺僾儘僌儔儉偼丄壓婰偺僜乕僗傪嶲徠偟傑偟偨丅

 丒 SCSI-Programming-HOWTO ( by Heiko Eissfeldt )
   
 丒 The MicroTek SCSI Image Scanner Programmer's Reference ( MicroTek
    偺 Warren Early 偝傫偺墖彆偵姶幱偟傑偡)
   
 丒 Torsten Eichner 偝傫偺 muscan 偺僪儔僀僶僾儘僌儔儉偐傜丄偦偺堦晹傪
    傕偭偰偒傑偟偨丅
   
 

Warwick Allison, Wolfgang Wander, Itai Nahshon, 偦偟偰偙偺僾儘僌儔儉傪
僥僗僩偟儗億乕僩丄僐儊儞僩丄僶僌僼傿僢僋僗丄僷僢僠丄僴乕僪僂僃傾忣曬傪
偍憲傝捀偄偨懡偔偺奆偝傫偵姶幱偟傑偡丅偙傟傜偺慡偰偺奆偝傫偵懡偄偵彆偗
偰捀偒傑偟偨丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Chapter 2. mtekscan v0.2 偵晬懏偺儅僯儏傾儖 (僼傽僀儖柤丗 mtekscan.1)

         mtekscan(1)    mtekscan manual                                        
============================================================================== 
                                                                               
NAME                                                                           
       mtekscan - driver for MicroTek SCSI scanners                            
                                                                               
SYNOPSIS (奣梫)                                                                
       mtekscan [options]                                                      
                                                                               
愢柧                                                                           
       mtekscan 偼丄MicroTek SCSI 僗僉儍僫傪 Linux 忋偱巊梡弌棃傞傛偆偵偡傞偨  
       傔偺僪儔僀僶偱偡丅夋憸傪僗僉儍儞偟丄昗弨弌椡(傑偨偼巜掕偟偨僼傽僀儖)偵  
       弌椡偡傞偨傔偺僐儅儞僪儔僀儞偺儐乕僥傿儕僥傿偱偡丅僆儕僕僫儖偼丄        
       MicroTek ScanMaker E6 梡偵奐敪偝傟傑偟偨偑丄懠偺 MicroTek SCSI 僗僉儍   
       僫偱傕摦嶌偡傞偙偲偑妋擣偝傟偰偄傑偡丅                                  
       崱傑偱偺偲偙傠壓婰偺婡庬偱僥僗僩偝傟摦嶌偟偰偄傑偡丅                    
       ScanMaker II,   ScanMaker III, ScanMaker E3,                            
       ScanMaker 35t+, ScanMaker E6,                                           
       Adara ImageStar I, Genius ColorPage-SP2, Primax DeskScan Color.         
                                                                               
僆僾僔儑儞                                                                     
       慡偰偺僆僾僔儑儞偲堷悢偼丄僗儁乕僗偱暘棧偟側偗傟偽側傝傑偣傫丅          
       '-cpVt' 偺傛偆偵寢崌偟偨僆僾僔儑儞偺巜掕偼偱偒傑偣傫丅                  
       摨偠僐儅儞僪儔僀儞忋偵屳偄偵攔懠揑側僆僾僔儑儞 (椺偊偽 '-c  -g' 偺傛偆  
       側)偑巜掕偝傟傞偲丄嵟屻偺僆僾僔儑儞偑慜偺僆僾僔儑儞傪忋彂偒偟傑偡丅     
       (-T 偲 -G 僆僾僔儑儞偵娭偟偰偼柧帵揑偵巜掕偡傞偺偱側偗傟偽丅壓婰嶲徠)   
       僗僉儍僫偺儌僨儖偵傛偭偰偼丄偄偔偮偐偺僆僾僔儑儞偼巊偊側偄傕偺偑偁傞偺  
       偱拲堄偟偰壓偝偄丅                                                      
                                                                               
       -o <file>                                                               
              偙傟偑巜掕偝傟傞偲 mtekscan 偼昗弨弌椡偺戙傢傝偵 <file> 偵弌椡   
              偟傑偡丅                                                         
                                                                               
       -f <x1> <y1> <x2> <y2>                                                  
              僗僉儍儞偡傞僼儗乕儉傪丄嵍忋 <x1>,<y1> 偲塃壓 <x2>,<y2> 偺挿曽   
              宍偱偁傞偲掕媊偟傑偡丅嵗昗偼僀儞僠偱寁應偝傟丄尨揰偼僗僉儍儞僄   
              儕傾偺嵍忋偺妏偱偡丅                                             
                                                                               
       -r <resolution>                                                         
              僗僉儍儞偺夝憸搙傪 dpi 偱愝掕偟傑偡丅                            
              MicroTek 偺僗僉儍僫偼丄夝憸搙傪嵟戝抣偺 1% 傑偨偼 5% 偒偞傒偱    
              愝掕偱偒傞偺偱丄嵟揔側抣傪慖戰偱偒傑偡丅                         
                                                                               
       -b     儔僀儞傾乕僩(崟偲敀)偺僗僉儍儞傪慖戰偟傑偡丅                     
                                                                               
       -a     僴乕僼僩乕儞偺僗僉儍儞傪慖戰偟傑偡丅尨峞偼 -H 僆僾僔儑儞偱慖戰   
              壜擻側僴乕僼僩乕儞偺僷僞乕儞傪巊偭偰僨傿僓張棟偝傟傑偡丅         
                                                                               
       -g     僌儗乕僗働乕儖偺僗僉儍儞傪慖戰偟傑偡丅                           
                                                                               
       -c     僇儔乕偺僗僉儍儞傪慖戰偟傑偡丅                                   
                                                                               
       -s <n> 僔儍僪僂挷惍偺抣(崟儗儀儖)傪 <n> 偱愝掕偟傑偡丅                  
               <n> 偼 0偐傜255 傑偱偺10恑悢偱偡丅                              
              偙偺抣偲摨偠偐偦傟埲壓偺慡偰偺僺僋僙儖抣偼 0偵僙僢僩偝傟丄巆偭   
              偨抣偑 0偐傜255 偺斖埻偵儅僢僺儞僌偝傟傑偡丅                     
                                                                               
              偙偺僆僾僔儑儞偼丄儅儖僠價僢僩丒僗僉儍儞儌乕僪(僇儔乕傑偨偼僌    
              儗乕僗働乕儖)偺応崌偺傒摦嶌偟傑偡丅僨僼僅儖僩抣偼丄0偱偡丅       
                                                                               
       -l <n> 僴僀儔僀僩挷惍偺抣(敀儗儀儖)傪 <n> 偱愝掕偟傑偡丅                
               <n> 偼 0偐傜255 傑偱偺10恑悢偱偡丅                              
              偙偺抣偲摨偠偐偦傟埲忋偺慡偰偺僺僋僙儖抣偼 255偵僙僢僩偝傟丄     
              巆偭偨抣偑 0偐傜255 偺斖埻偵儅僢僺儞僌偝傟傑偡丅                 
                                                                               
              偙偺僆僾僔儑儞偼丄儅儖僠價僢僩丒僗僉儍儞儌乕僪(僇儔乕傑偨偼僌    
              儗乕僗働乕儖)偺応崌偺傒摦嶌偟傑偡丅僨僼僅儖僩抣偼丄255偱偡丅     
                                                                               
       -m <n> 拞娫挷偺挷惍抣傪 <n> 偱愝掕偟傑偡丅                              
              <n> 偼 0偐傜255 傑偱偺10恑悢偱偡丅                               
              <n> 偲摨偠偐偦傟埲忋偺慡偰偺僺僋僙儖抣偼 128偐傜255偺斖埻偵儅    
              僢僺儞僌偝傟丄<n> 埲壓偺慡偰偺僺僋僙儖抣偼 0偐傜 127 偺斖埻偵    
              儅僢僺儞僌偝傟傑偡丅                                             
                                                                               
              偙偺僆僾僔儑儞偼丄儅儖僠價僢僩丒僗僉儍儞儌乕僪(僇儔乕傑偨偼僌    
              儗乕僗働乕儖)偺応崌偺傒摦嶌偟傑偡丅僨僼僅儖僩抣偼丄128偱偡丅     
                                                                               
       -d <n> [ <n> <n> ]                                                      
              僨僕僞儖婸搙挷惍抣傪 <n> 偱慖戰偟傑偡丅                          
              <n> 偼 -100 偐傜 100 傑偱偺斖埻偺10恑悢偱偡丅                    
              偙偺僆僾僔儑儞偺師偵悢抣偑侾偮偩偗巜掕偝傟偨応崌偼慡斒揑側婸     
              搙傪寛掕偟傑偡丅俁偮偺抣偑巜掕偝傟偨応崌偼愒丄椢丄惵偺僠儍僱     
              儖婸搙挷惍傪屄暿偵寛掕偟傑偡丅                                   
                                                                               
              僨僼僅儖僩抣偼丄0偱偡丅                                          
                                                                               
       -e <n> 業岝帪娫偺挷惍(傾僫儘僌婸搙挷惍)傪 <n> 偱愝掕偟傑偡丅            
               <n> 偼丄捠忢 -18 偐傜 21 傑偱偺斖埻偺10恑悢偱偡丅               
              (偙傟傛傝崅偄抣傪庴偗晅偗傞僗僉儍僫儌僨儖傕偁傝傑偡)             
              偙偺抣偼丄俁偺攞悢偱側偗傟偽側傜側偄偙偲偵拲堄偟偰壓偝偄丅       
              偦偆偱側偄応崌偼丄嵟傕嬤偄抣偑慖戰偝傟傑偡丅                     
                                                                               
              僨僼僅儖僩抣偼丄0偱偡丅                                          
                                                                               
       -k <n> 僐儞僩儔僗僩偺挷惍傪 <n> 偱愝掕偟傑偡丅                          
               <n> 偼丄捠忢 -42 偐傜 49 傑偱偺斖埻偺10恑悢偱偡丅               
              (偙傟傛傝崅偄抣傪庴偗晅偗傞僗僉儍僫儌僨儖傕偁傝傑偡)             
              偙偺抣偼丄俈偺攞悢偱側偗傟偽側傜側偄偙偲偵拲堄偟偰壓偝偄丅       
              偦偆偱側偄応崌偼丄嵟傕嬤偄抣偑慖戰偝傟傑偡丅                     
                                                                               
              僨僼僅儖僩抣偼丄0偱偡丅                                          
                                                                               
       -G <n> [ <n> <n> ]                                                      
              僈儞儅曗惓傪 <n> 偱愝掕偟傑偡丅                                  
              -G 偺屻偵丄悢抣偑侾偮偩偗巜掕偝傟偨応崌偼慡斒揑側僈儞儅曗惓抣偱  
              俁偮偺抣偑巜掕偝傟偨応崌偼愒丄椢丄惵偺僠儍僱儖偺僈儞儅傪屄暿偵   
              寛掕偟傑偡丅                                                     
                                                                               
              僨僼僅儖僩抣偼丄俁偮偺僠儍僱儖慡偰偑 1.0偱偡丅                   
                                                                               
               亂栿拲亃                                                        
                 僈儞儅曗惓偲偼丄婸搙儗儀儖偺擖椡偲弌椡偺娭學傪愝掕偡傞傕偺    
                 偱偡丅                                                        
                 1.0 偼擖椡偲弌椡偺娭學偑捈慄揑偱                              
                 1.01 乣 4.99 偩偲僴乕僼僩乕儞(拞娫挷)偑柧傞偔                 
                 0.99 乣 0.01 偩偲埫偔側傝傑偡丅                               
                                                                               
       -T <file>                                                               
              僈儞儅曗惓僥乕僽儖傪 <file> 偐傜儘乕僪偟傑偡丅                   
              偙傟傪巜掕偡傞偲丄-G 僆僾僔儑儞偱巜掕偟偨僈儞儅偺愝掕偼慡偰忋    
              彂偒偝傟傑偡丅僐儅儞僪儔僀儞偱 -G 偺慜偵 -T 僆僾僔儑儞偑巜掕偝   
              傟偨応崌偱傕丄偱偡丅                                             
                                                                               
              僨僼僅儖僩偱偼丄僼傽僀儖偐傜曗惓僥乕僽儖傪儘乕僪偟傑偣傫丅       
                                                                               
       -t     摟夁尨峞儐僯僢僩偑僀儞僗僩乕儖偝傟偰偄傞偲偒偵丄摟夁僗僉儍儞僯   
              儞僌傪慖戰偟傑偡丅                                               
                                                                               
       -n     僱僈僥傿僽僗僉儍儞僯儞僌(儕僶乕僗僇儔乕丗堿夋)傪慖戰偟傑偡丅     
                                                                               
       -H <n> 慻傒崬傒嵪傒偺僴乕僼僩乕儞偺僷僞乕儞 <n> 傪慖戰偟傑偡丅          
              <n> 偼丄0 偐傜 11 傑偱偺斖埻偺10恑悢偱偡丅                       
              僴乕僼僩乕儞偺僷僞乕儞偼丄拞娫挷偺夋憸傪僗僉儍儞偡傞 (-a 僆僾    
              僔儑儞)嵺偵夋憸傪偳偺傛偆偵僨傿僓張棟偡傞偐傪掕媊偟傑偡丅        
                                                                               
       -p     僾儕僗僉儍儞儌乕僪傪僀僱乕僽儖偵偟傑偡丅寢壥偼懍偔摼傜傟傑偡     
              偑惛枾偝偵寚偗傑偡丅                                             
                                                                               
       -v <n> 僗僉儍儞懍搙傪 <n> 偱愝掕偟傑偡丅                                
               <n> 偼丄1 偐傜 7 傑偱偺斖埻偺10恑悢偱偡丅(戝偒偄抣傎偳僗僉儍    
              儞帪娫偑挿偔側傝傑偡) 暘妱僗僉儍儞偑昁梫側応崌丄戝偒偄抣傪愝掕   
              偡傞傎偳崅夋幙偵側傝傑偡丅(壓婰偺 -B 僆僾僔儑儞傪嶲徠偺偙偲)     
                                                                               
              僨僼僅儖僩抣偼 1(嵟傕崅懍)偱偡丅                                 
                                                                               
       -B     僗僉儍儞僙僌儊儞僩娫偺僶僢僋僩儔僢僉儞僌傪嬛巭偟傑偡丅           
              斈梡 SCSI 僪儔僀僶偺揮憲僶僢僼傽偑彫偝偡偓傞応崌丄僗僉儍儞張棟   
              偼偄偔偮偐偺僗僥僢僾丄傑偨偼僙僌儊儞僩偵暘偗傜傟傑偡丅           
              捠忢丄僗僉儍儞僿僢僪偼怴偟偄僙僌儊儞僩傪奐巒偡傞慜偵傢偢偐偵屻   
              曽偵堏摦偟傑偡丅偙偺僗僀僢僠傪巜掕偡傞偲丄偙傟傪嬛巭偱偒傑偡丅   
              寢壥偼懍偔摼傜傟傑偡偑丄惛枾偝偵寚偗傑偡丅                       
                                                                               
       -C     僗僉儍儞偺奐巒帪偺嵞挷惍傪嬛巭偟傑偡丅偙傟偼僗僉儍儞帪娫偑抁偔   
              側傝傑偡偑夋幙偼彮偟棊偪傑偡丅                                   
                                                                               
              偙偺僆僾僔儑儞傪巜掕偡傞偲丄僗僉儍僫偑彮側偔偲傕堦搙傕帺暘帺恎   
              偱僉儍儕僽儗乕僩偟側偐偭偨応崌丄(椺偊偽僗僉儍僫偑揹尮 ON 偟偨    
              偽偐傝偺帪) SCSI 僶僗偺 lock-up 傪婲偙偡偙偲偵拲堄偟偰壓偝偄丅   
              偙偺僆僾僔儑儞傪巊傢傟傞慜偵丄彮側偔偲傕堦搙偼僗僉儍儞偟偰偍偐   
              側偗傟偽側傝傑偣傫丅                                             
                                                                               
       -P     '-p -C' 偲摨偠偱偡丅(忋傪偛棗壓偝偄)                             
                                                                               
       -V     忕挿儌乕僪偱偡丅僗僉儍僫偺愝掕偲摦嶌拞偺忣曬偑昗弨弌椡偵彂偒崬   
              傑傟傑偡丅                                                       
                                                                               
       -i     僗僉儍僫偵傛偭偰僒億乕僩偝傟偰偄傞僆僾僔儑儞傪抁偄僼僅乕儅僢僩   
              偱昞帵偟傑偡丅嵟弶偺抣偼丄尨峞僒僀僘偲夝憸搙偺嵟戝抣丄偍傛傃庴   
              偗擖傟壜擻側僐儞僩儔僗僩偲業岝帪娫偺抣偱偡丅懕偄偰丄僗僉儍僫偵   
              傛偭偰僒億乕僩偝傟偰偄傞僆僾僔儑儞偺暥帤偺儕僗僩偱偡丅           
              偙偺忣曬偼丄僌儔僼傿僇儖丒僗僉儍儞僯儞僌丒僼儘儞僩僄儞僪偱巊梡   
              偡傞偨傔偵採嫙偝傟傑偡丅                                         
                                                                               
       -I     僗僉儍僫撪晹偺僨乕僞傪挿偄丄恖偑夝撉壜擻側僼僅乕儅僢僩偱昞帵偟   
              傑偡丅                                                           
                                                                               
       -S     僗僉儍僫偺僴乕僪僂僃傾偺僙儖僼僥僗僩傪偟偰偐傜丄廔椆偟傑偡丅     
                                                                               
       -h     mtekscan 偑庴偗晅偗傞偙偲偺偱偒傞僐儅儞僪儔僀儞丒僆僾僔儑儞偺    
              儕僗僩傪昞帵偟傑偡丅                                             
                                                                               
僶僌                                                                           
      mtekscan 偼丄僇乕僱儖僷僯僢僋丄僔僗僥儉僋儔僢僔儏丄SCSI 僶僗偺儘僢僋傾   
      僢僾丄偦偺懠怓乆偺晄夣側偙偲傪杮摉偵婲偙偡壜擻惈偑偁傝傑偡丅             
      -d 僆僾僔儑儞偺婸搙挷惍偱晧偺抣傪愝掕偡傞偲丄彮側偔偲傕 ScanMaker E6     
      偱偼丄婏柇側(偦偟偰柧傜偐偵埆偄)寢壥傪彽偒傑偡丅                         
      婸搙挷惍偱愒丄椢丄惵偺僠儍僱儖傪堎側傞抣偵愝掕偡傞偲丄婓朷偟偨寢壥偵偼   
      側傝傑偣傫丄偟偐偟慡斒揑側婸搙偵偼嶌梡偟傑偡丅                           
      (嵞搙尵偄傑偡偑丄彮側偔偲傕ScanMaker E6 偱偼丄偱偡)                      
      偦偟偰丄偨傇傫 1000 埲忋偺僶僌偑偁傞偲巚偄傑偡丅                         
                                                                               
嶌幰                                                                           
       mtekscan 偼丄Copyright (C) 1996, 1997 by Jan Schoenepauck,              
       <schoenep@uni-wuppertal.de> 偱偡丅                                      
       僾儘僌儔儉偺偄偔偮偐偺僷乕僣偼丄Torsten  Eichner                        
       <eichner@rhrk.uni-kl.de> 偵傛傞 Mustek 僗僉儍僫梡偺 muscan 僪儔僀僶偐   
       傜帩偭偰偒傑偟偨丅                                                      
       俁僷僗丒僗僉儍僫偺僒億乕僩偼丄Warwick Allison <warwick@cs.uq.edu.au>    
       偵傛傞僷僢僠偵傎偲傫偳埶懚偟偰偄傑偡丅                                  

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Chapter 3. mtekscan v0.2 偵晬懏偺 TODO

崱屻偺儕儕乕僗偱丄捛壛乛夵椙乛僼傿僢僋僗偟偨偄偙偲丗

 

 丒 8bpp 埲奜 (4/10/12 bpp)偺儅儖僠價僢僩僼僅乕儅僢僩偺僒億乕僩
   
        亂栿拲亃: 8bpp 偼丄8 bits per pixel 懄偪丄256怓丅 4bpp 偼丄16
        怓丅10 bpp 偼丄1024 怓丅12 bpp 偼丄4096 怓丅
       
 丒 僗僉儍儞僼儗乕儉偲尨峞挿偺扨埵傪僀儞僠埲奜 (cm, mm, point, pixel)傕
    巊偊傞傛偆側巇條偵偡傞
   
 丒 撪晹僼儗乕儉僒僀僘偺愝掕扨埵偲偟偰僺僋僙儖傪僒億乕僩偡傞 (僗僉儍儞
    僼儗乕儉偺巇條偼丄尰嵼偁傑傝惛枾偱偼側偔丄摿偵 FIX_FRAMESIZE 偼 1
    偵僙僢僩偡傞昁梫偑偁傞)
   
 丒 ADF (automatic document feeder丗帺摦媼巻憰抲) 偺僒億乕僩傪捛壛偡傞
   
 丒 儐乕僓掕媊偺僴乕僼僩乕儞僷僞乕儞偺僟僂儞儘乕僪傪僒億乕僩偡傞
   
 丒 R, G, B 偺奺僠儍僱儖枅偵丄堎側傞僐儞僩儔僗僩乛業弌帪娫乛僔儍僪僂乛
    拞娫挷乛僴僀儔僀僩乛婸搙偺愝掕傪偱偒傞傛偆偵偡傞
   
 丒 僨僕僞儖婸搙挷惍偵晧偺抣傪愝掕偡傞偲旕忢偵婏柇側寢壥偵側傞
   
 丒 僐儅儞僪儔僀儞僗僀僢僠偱丄僆僾僔儑儞僼傽僀儖偺巜掕傪偱偒傞傛偆偵偡
    傞
   
 丒 愭偵僉儍儕僽儗乕僔儑儞偣偢偵僗僉儍儞偟偨偲偒 SCSI 僶僗偑儘僢僋傾僢
    僾偡傞偺傪僼傿僢僋僗偡傞丅 (晄壜擻側傜丄僟儈乕僗僉儍儞偡傞僗僀僢僠
    傪晅壛偡傞丅懄偪嫮惂揑偵僉儍儕僽儗乕僔儑儞偝偣傞偨傔偵丄懄帪 START
    SCAN 偟丄懕偄偰 STOP SCAN 偡傞)
   
 丒 僗僉儍僫僨僶僀僗偺帺摦専弌傪晅壛偡傞(偨傇傫丄/proc/scsi/scsi 傪捠偟
    偰)
   
 丒 僱僈僥傿僽僗僉儍儞梡偺 "-n" 僗僀僢僠偺僼傿僢僋僗偵僩儔僀偡傞丅( 35t
    偱偼摦嶌偟側偄) (尰嵼偼 INVERT_USING_GAMMA 僆僾僔儑儞偱偱偒傞)
   
 丒 lut_download() 娭悢偺栠傝抣傪僠僃僢僋偡傞
   
 丒 E6 偱偼丄惵偺抣偑惓偟偔側偄
   
 丒 僜僼僩僂僃傾曗娫乛悇榑丄摿偵奼挘夝憸搙僗僉儍儞傪捛壛偡傞 (偙偺儌乕
    僪偱偼悅捈曽岦偵夋憸偺怢挿張棟傪偡傞)
   
 丒 僈儞儅僥乕僽儖偺僼傽僀儖傪嶌傞偨傔偺僔儞僾儖側僣乕儖傪嶌傞丗僗僉儍
    僫偲嫟偵嫙媼偝傟傞僥僗僩夋憸偱巊梡偝傟傞僉儍儕僽儗乕僔儑儞僣乕儖偵
    側傞偐傕偟傟側偄(墦偄丄墦偄愭偺偙偲...)
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Chapter 4. tkscan 偺徯夘

mtekscan 僪儔僀僶偼僐儅儞僪儔僀儞偺僾儘僌儔儉偱偡偑丄偙傟傪 GUI 偱摦嶌
偝偣傞偨傔偺 TkScan 偲偄偆僾儘僌儔儉偑偁傝傑偡丅嶌幰偼丄Hang-Bae Kim
(hbkim@delta.ft.uam.es) 偱偡丅

TkScan 偼丄僐儅儞僪儔僀儞丒僗僉儍僫僪儔僀僶梡偺 tcl/tk GUI 偱偡丅尰帪揰
偺僶乕僕儑儞 0.8 (7,Jun,97) 偱偼埲壓偺傕偺傪僒億乕僩偟偰偄傑偡丅

 丒 `ep_scan' 傪巊梡偟偨 Epson SCSI 僗僉儍僫
   
 丒 `hpscanpbm' 傪巊梡偟偨 HP SCSI 僗僉儍僫
   
 丒 `mtekscan' 傪巊梡偟偨 Microtek SCSI 僗僉儍僫
   
 丒 `scanimage'(SANE) 偐 `mscan' 傪巊梡偟偨 Mustek 僼儔僢僩儀僢僪僗僉儍
    僫
   
TkScan 偱偼丄埲壓偺傛偆側偙偲偑弌棃傑偡丅

 丒 僗僉儍儞偡傞夋憸傪彫偝側僉儍儞僶僗(僒僀僘偲儌乕僪傪慖戰)忋偱僾儗價
    儏乕偡傞丅
   
 丒 僗僉儍僫偲僪儔僀僶偵傛偭偰僒億乕僩偝傟偰偄傞僗僉儍儞儌乕僪乛夝憸搙
    乛偦偺懠偺僆僾僔儑儞傪丄儅僂僗僋儕僢僋偱挷惍偡傞丅
   
 丒 僾儗價儏乕夋憸偺僉儍儞僶僗忋偱僗僉儍儞偡傞斖埻傪侾偮傑偨偼暋悢慖戰
    偡傞丅僗僉儍儞僄儕傾傪暋悢慖戰偡傞偲 TkScan 偼偦傟傜傪忋庤偵僗僉儍
    儞偟傑偡丅 TkScan 偼丄婓朷偡傞夋柺僺僋僙儖偲丄夋憸偺惗僨乕僞僒僀僘
    傪偄偔偮偐偺挿偝偺扨埵 (mm,cm,pt,inch)偱恀偺挿偝偲摨條偵昞帵偟傑偡
    丅
   
 丒 惗僨乕僞傪婓朷偡傞偲偙傠偵僟僀儗僋僩偵弌椡偟傑偡丅
   
     仩 夋憸僄僨傿僞 (XV, ImageMagic, GIMP)偵弌椡
       
     仩 巜掕偟偨僼僅乕儅僢僩偱僼傽僀儖偵弌椡
       
     仩 僒僀僘偲埵抲傪挷惍偟偰 postscript 僼僅乕儅僢僩偺僾儕儞僞傑偨偼
        ghostscript(ghostview, gv)偵弌椡
       
     仩 僼傽僢僋僗憲怣梡偲偟偰捈愙僼傽僢僋僗儌僨儉偵弌椡
       
     仩 OCR 張棟傪偡傞偨傔偵 OCR 僜僼僩偵弌椡 (偙偺僶乕僕儑儞偱偼傑偩幚
        憰偟偰偄傑偣傫)
       
     
   
 丒 僗僉儍儞偺恑峴搙崌傪丄僌儔僼傿僢僋丄僷乕僙儞僩偺悢帤丄僼傽僀儖僒僀
    僘偱昞帵偟傑偡丅
   
 丒 僗僩僢僾儃僞儞偱僗僉儍儞傪拞巭偱偒傑偡丅
   
 丒 岲傒偵墳偠偨 TkScan 偺愝掕偑偱偒傑偡丅
   
巹偼丄mtekscan 偲 TkScan 傪暪梡偟偰偄傑偡偑丄傗偼傝 GUI 偩偲巊偄彑庤偑
偐側傝岦忋偟傑偡丅mtekscan 偑摦嶌偡傞偙偲偑妋擣偱偒偨傜丄師偵偙偺
TkScan 傕帋偟偰傒傞偙偲傪偍姪傔偟傑偡丅

巹偼丄偙偺 TkScan 偺僪僉儏儊儞僩傕 Scanner-HOWTO-tkscan <http://
www.linux.or.jp/JF/JFdocs/Scanner-HOWTO-tkscan/index.html> 偲偟偰東栿偟
傑偟偨丅擖庤愭丄僀儞僗僩乕儖曽朄傕彂偄偰偁傝傑偡偺偱屼嶲徠壓偝偄丅

側偍丄偙偺僶乕僕儑儞 0.8 偺拞偺 Microtek mtekscan 梡僾儘僌儔儉偵偼僶僌
偑偁傝偦偺傑傑偱偼摦嶌偟傑偣傫偑丄懳嶔曽朄傕 Scanner-HOWTO-tkscan
<http://www.linux.or.jp/JF/JFdocs/Scanner-HOWTO-tkscan/index.html> 偵彂
偒傑偟偨丅偍偦傜偔丄偙傟埲崀偺僶乕僕儑儞偱偼廋惓偝傟丄偦偺傑傑偱摦嶌偡
傞傛偆偵側傞偩傠偆偲巚傢傟傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆=====================================================               劆
劆 Ryoji Kawagishi   E-Mail: kawagishi@pa.aix.or.jp                   劆
劆                           KFA02544@niftyserve.or.jp                劆
劆=====================================================               劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

(sgml conversion, y.senda, ysenda@pop01.odn.ne.jp, 2001/09)

Notes

[1]  亂栿拲1亃僇乕僱儖僷僯僢僋偵偮偄偰偼丄JF 偺 SCSI-HOWTO <http://                
     www.linux.or.jp/JF/JFdocs/SCSI-HOWTO.html> 傪 panic 偱専嶕偟乽3.2 panic       
     ()偺埵抲傪摿掕偡傞乿 <http://www.linux.or.jp/JF/JFdocs/                       
     SCSI-HOWTO-3.html> 偲偐丄乽5.2.4.乽kernel panic : cannot mount root           
     device乿偲偄偆儊僢僙乕僕偑弌傞乿 <http://www.linux.or.jp/JF/JFdocs/           
     SCSI-HOWTO-5.html> 傪偛棗壓偝偄                                               
                                                                                   
[2]  亂栿拲2亃儘僢僋傾僢僾偵偮偄偰偼丄JF 偺 SCSI-HOWTO <http://                    
     www.linux.or.jp/JF/JFdocs/SCSI-HOWTO.html> 偺乽2.8 SCSI 僔僗僥儉偑儘僢        
     僋傾僢僾偡傞乿 <http://www.linux.or.jp/JF/JFdocs/SCSI-HOWTO-2.html> 傪        
     偛棗壓偝偄丅                                                                  
                                                                                   
[3]  亂栿拲亃                                                                      
                                                                                   
      丒 mtekscan 傪僀儞僗僩乕儖偡傞慜偵 SCSI 儂僗僩傾僟僾僞偺愝掕傪嵪傑偣偰       
         偍偔昁梫偑偁傝傑偡丅壓婰偺傛偆偵側偭偰偄傞昁梫偑偁傝傑偡丅偙傟偼丄        
         make config / make menuconfig / make xconfig 偺壗傟偐偱 (make             
         xconfig 偑偍姪傔)丄師偺傛偆偵偟偰妋擣偟傑偡丅                             
                                                                                   
         root 偱儘僌僀儞                                                           
         劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
         劆  # cd /usr/src/linux                                                 劆
         劆  # make xconfig                                                      劆
         劆    (SCSI support 偱壓婰偺傛偆偵側偭偰偄傞偙偲傪妋擣偡傞)             劆
         劆      SCSI support             Y                                      劆
         劆      SCSI generic support     Y       (斈梡 SCSI 僪儔僀僶偺僒億乕僩) 劆
         劆      SCSI low-level drivers   (屼巊梡偺 SCSI 僇乕僪梡僪儔僀僶傪巜掕) 劆
         劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
                                                                                   
      丒 忋婰偺傛偆偵側偭偰側偄応崌偼丄偦偺傛偆偵廋惓屻丄埲壓偺傛偆偵偟偰僇        
         乕僱儖傪嵞峔抸偟傑偡丅偐側傝帪娫偑偐偐傝傑偡丅                            
         劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉            
         劆  # make dup ; make clean                                 劆            
         劆  # make zlilo                                            劆            
         劆  # make modules ; make modules_install                   劆            
         劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊            
     惓忢偵廔椆偟偨傜 Linux 傪儕僽乕僩偟丄僽乕僩儊僢僙乕僕偱 SCSI 偑慻傒崬傑       
         傟偨偙偲傪妋擣偟丄摨帪偵僨僶僀僗柤(壓婰嶲徠)傕妋擣偟傑偡丅惓忢廔椆        
         偟側偄応崌偼丄JF 偺 Kernel-HOWTO <http://www.linux.or.jp/JF/JFdocs/       
         Kernel-HOWTO.html> 傗 SCSI-HOWTO <http://www.linux.or.jp/JF/JFdocs/       
         SCSI-HOWTO.html> 傪偛棗壓偝偄丅                                           
                                                                                   
[4]  亂栿拲亃                                                                      
                                                                                   
     config.h 僼傽僀儖偵偼丄僐儊儞僩偱奺婡庬偛偲偺廋惓曽朄偑彂偄偰偁傞偺偱偦       
     傟偵廬偭偰曄峏偟偰壓偝偄丅巹偼丄ScanMaker E3 梡偵壓婰偺傛偆偵廋惓偟傑偟       
     偨丅                                                                          
     劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉    
     劆  #define  DEFAULT_DEVICE       "/dev/sga"   (偙傟偼僨僼僅儖僩偺傑傑) 劆    
     劆  #define  FIX_FRAMESIZE        0                                     劆    
     劆  #define  VENDOR_STRING        "        "   (8 屄偺僗儁乕僗偱偡)     劆    
     劆  #define  MAX_BASE_RESOLUTION  300                                   劆    
     劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊    
                                                                                   
[5]  亂栿拲亃                                                                      
                                                                                   
     巹偺応崌丄僇乕僱儖偼 2.0.28 偱偡偑 /usr/src/linux/include/scsi/ 偺壓偵        
     sg.h 偑偁傝丄 /usr/src/mtekscan-x0.2/Makefile 偺愭摢傕 SG_INCLUDE_PATH        
     = /usr/src/linux/include/scsi/ 偲側偭偰偄傞偺偱壗傕偣偢偦偺傑傑偱偡丅         
                                                                                   
     側偍乽怴偟偄僇乕僱儖僶乕僕儑儞偱偼乣乿埲崀偺堄枴偑傛偔暘偐傝傑偣傫丅 /        
     usr/include/ 僨傿儗僋僩儕偺壓偵偼丄scsi 偲偄偆柤慜偺傕偺偼柍偔偳偆偟偨        
     傕偺偐丠偲巚偭偨偺偱偡偑丄寢嬊壗傕偣偢愭偵恑傫偩偺偱偡偑偪傖傫偲僗僉儍        
     僫偼摦嶌偟傑偟偨丅                                                            
                                                                                   
[6]  亂栿拲亃                                                                      
                                                                                   
     劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉        
     劆  # make                                                          劆        
     劆  # make install                                                  劆        
     劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊        
     偲擖椡偡傞偲僨僼僅儖僩偱偼 /usr/local/bin 偵幚峴僼傽僀儖偑丄/usr/local/       
     man 偵儅僯儏傾儖偑丄偦傟偧傟僐僺乕偝傟傑偡丅                                  

