[sane-devel] Mustek 600 II EP working with SANE

Henning Meier-Geinitz henning@meier-geinitz.de
Thu, 21 Aug 2003 14:46:30 +0200


--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

On Sat, Aug 16, 2003 at 10:21:18AM +0100, James Perry wrote:
> I now have my Mustek Paragon 600 II EP scanner
> working with SANE. A patch for sane-backends-1.0.12
> to add this support can be found at:
> 
> http://www.epcc.ed.ac.uk/~jamesp/mustek600iiep.patch

Thanks. 

Your patch doesn't compile here with latest CVS:

sanei_pa4s2.c: In function sanei_pa4s2_get_status':
sanei_pa4s2.c:984: error: structure has no member named base'
[...]

Looks like you assume that libieee1284 is not present, but it is on my
system. Please check if you can use libiee1284 if available or at
least use some #ifdefs to get it compiled in both cases.

When I remove libieee1284 from my system I can compile the code but
get the following when trying to scan:

scanimage -L
scanimage: relocation error: /usr/local/lib/sane/libsane-mustek.so.1: undefined symbol: sanei_pa4s2_open_scsi_pp 

Your code seems to be only compiled in when libieee1284 is avaliable
or ENABLE_PARPORT_DIRECTIO is set manually. To avoid linking errors if
both is not the case, please provide stubs for your functions. There
are already some for the other sanei_pa4s2 functions at the end of the
file.

> I have tried it with various modes, resolutions and
> image sizes, and it seems to work fine. I tested
> using scanimage, xscanimage and xsane.

Fine. So which status do you think is ok for this scanner (from
doc/descriptions.txt)?

| :minimal' means that the device is detected and scans at least in one
| mode. But the quality is bad or important features won't work. :basic'
| means it works at least in the most important modes but quality is not
| perfect. :good' means the device is usable for day-to-day work. Some
| rather exotic features may be missing. :complete' means the backends
| supports everything the device can do.

> 1. It's not doing any line distance correction. I
> don't really know enough about scanners to know
> how it should do this. Output quality looks OK
> though

Some scanners do linedistance correction in hardware. So if the image
is ok (no colored stripes), this may be one of them.

> 4. Although this scanner connects via the parallel
> port, I've added it to the mustek backend, not the
> mustek_pp backend, as it uses SCSI commands

The structure of the code seems ok for me and if you can get the
problem with sanei_pa4s2.c and libieee1284 fixed, I'll commit the
patch to CVS.

> Any comments or questions?

Do you know if the 600 II ED is the same scanner and may also work?

I'll append the modified manpage, so you may have a look if it's
correct.

Bye,
  Henning

--sdtB3X0nJg68CQEu
Content-Type: application/x-troff-man
Content-Disposition: attachment; filename="sane-mustek.man"
Content-Transfer-Encoding: quoted-printable

=2ETH sane-mustek 5 "21 Aug 2003" "@PACKAGEVERSION@" "SANE Scanner Access N=
ow Easy"=0A.IX sane-mustek=0A.SH NAME=0Asane-mustek \- SANE backend for Mus=
tek SCSI flatbed scanners=0A.SH DESCRIPTION=0AThe=0A.B sane-mustek=0Alibrar=
y implements a SANE (Scanner Access Now Easy) backend that provides=0Aacces=
s to Mustek (and some relabeled Trust and Primax) SCSI flatbed=0Ascanners. =
Some non-SCSI scanners are also supported.  At present, the=0Afollowing sca=
nners are known to work more or less with this backend:=0A.PP=0A.RS=0AParag=
on MFS-6000CX=0A.br=0AParagon MFS-12000CX=0A.br=0AParagon MFC-600S, 600 II =
CD, ScanMagic 600 II SP =0A.br=0AParagon MFC-800S, 800 II SP=0A.br=0AParago=
n MFS-6000SP=0A.br=0AParagon MFS-8000SP=0A.br=0AParagon MFS-1200SP, MFS-120=
00SP=0A.br=0AScanExpress 6000SP=0A.br=0AScanExpress 12000SP, 12000SP Plus, =
Paragon 1200 III SP, ScanMagic 9636S, 9636S Plus=0A.br=0AParagon 1200 LS=0A=
=2Ebr=0AScanExpress A3 SP=0A.br=0AParagon 1200 SP Pro=0A.br=0AParagon 1200 =
A3 Pro=0A.br=0AParagon 600 II N (non-SCSI)=0A.br=0AParagon 600 II EP (non-S=
CSI)=0A.br=0ATrust Imagery 1200=0A.br=0ATrust Imagery 1200 SP=0A.br=0ATrust=
 Imagery 4800 SP=0A.br=0ATrust SCSI Connect 19200=0A.br=0APrimax Compact 48=
00 SCSI=0A.br=0A.RE=0A.PP=0AMore details can be found on the Mustek SCSI ba=
ckend homepage =0A.IR http://www.meier-geinitz.de/sane/mustek-backend/ .=0A=
=2EPP=0ADon't mix up MFS (Paragon), Pro and ScanExpress models! They're=0Ac=
ompletely different. Check the exact model name!=0A.PP=0ANote that most of =
the above scanners come with a SCSI interface.  The only=0Anon-SCSI scanner=
s that are supported at this point are the Paragon 600 II N=0Aand 600 II EP=
 scanners. The 600 II EP is a parport scanner while the 600 II N=0Acomes wi=
th its own parallel port like adapter (i.e., it does=0A.I not=0Aattach to t=
he printer port). Both use the SCSI protocoll internally, too. More=0Ainfo =
on how to use these scanners can be found below in section=0A.BR "NON-SCSI =
SCANNERS" .=0AOther parallel port scanners are not supported by this backen=
d but you may be=0Asuccessful using the Mustek parallel port backend mustek=
_pp, see=0A.BR sane-mustek_pp (5).=0AUSB scanners are also not supported by=
 this backend but the mustek_usb,=0Agt68xx, and plustek backends include su=
pport for some of them, see=0A.BR sane-mustek_usb (5),=0A.BR sane-gt68xx "(=
5), and"=0A.BR sane-plustek (5).=0A.PP=0AMustek scanners have no protection=
 against exceeding the physical scan=0Aarea height.  That is, if a scan is =
attempted with a height that=0Aexceeds the height of the scan surface, the =
scanner begins making loud=0Anoises and the scan mechanism may be damaged. =
 Thus, if you hear such=0Aa noise, IMMEDIATELY turn off the scanner. This s=
houldn't happen if=0Ayour scanner is in the list of known scanners. There i=
s more=0Ainformation in the=0A.I @DOCDIR@/PROBLEMS=0Afile.=0A.PP=0AIf you o=
wn a Mustek (or Trust) scanner other than the ones listed=0Aabove that work=
s with this backend, please let us know by sending the=0Ascanner's exact mo=
del name (look at the front and back of the scanner)=0Aand a debug output t=
o=0A.IR sane-devel@mostang.com .=0AYou can get the debug output by setting =
the environment variable=0A.B SANE_DEBUG_MUSTEK=0Ato 5 and showing the list=
 of available scanners with scanimage\ \-L . Please=0Asend all of it to the=
 mailing list. You must be subscribed to sane-devel=0Abefore you can send m=
ail to the list. See=0A.I http://www.mostang.com/sane/mail.html=0Afor detai=
ls.=0A=0A.SH "DEVICE NAMES"=0AThis backend expects device names of the form=
:=0A.PP=0A.RS=0A.I special=0A.RE=0A.PP=0AWhere=0A.I special=0Ais either the=
 path-name for the special device that corresponds to a SCSI=0Ascanner or t=
he port number at which a non-SCSI scanner can be found (see=0Asection=0A.B=
 "NON-SCSI SCANNERS"=0Abelow).  For SCSI scanners, the special device name =
must be a generic SCSI=0Adevice or a symlink to such a device.  The program=
=0A.I sane-find-scanner =0Ahelps to find out the correct device. Under Linu=
x, such a device name=0Acould be=0A.I /dev/sga=0Aor=0A.IR /dev/sge ,=0Afor =
example.  See =0A.BR sane-scsi (5)=0Afor details.=0A.SH CONFIGURATION=0AThe=
 contents of the=0A.I mustek.conf=0Afile is a list of options and device na=
mes that correspond to Mustek=0Ascanners.  Empty lines and lines starting w=
ith a hash mark (#) are=0Aignored.  See =0A.BR sane-scsi (5)=0Aon details o=
f what constitutes a valid device name.=0A.PP=0AThe supported options are=
=0A.BR linedistance-fix ,=0A.BR lineart-fix ,=0A.BR legal-size ,=0A.BR buff=
ersize ,=0A.BR blocksize ,=0A.BR strip-height ,=0A.BR disable-double-buffer=
ing ,=0A.BR disable-backtracking ,=0Aand=0A.BR force-wait .=0A.PP=0AOptions=
 come in two flavors: global and positional ones.  Global=0Aoptions apply t=
o all devices managed by the backend whereas positional=0Aoptions apply jus=
t to the most recently mentioned device.  Note that=0Athis means that the o=
rder in which the options appear matters!=0A.PP=0AOption=0A.B linedistance-=
fix=0Ais positional and works around a problem that occurs with some SCSI=
=0Acontrollers (notably the ncr810 controller under Linux).  If color=0Asca=
ns have horizontal stripes and/or the colors are off, then it's=0Alikely th=
at your controller suffers from this problem.  Turning on=0Athis option usu=
ally fixes the problem.=0A.PP=0AOption=0A.B lineart-fix=0Ais positional and=
 works around a timing problem that seems to exist=0Awith certain MFS-12000=
SP scanners.  The problem manifests itself in=0Adropped lines when scanning=
 in lineart mode.  Turning on this option=0Ashould fix the problem but may =
slow down scanning a bit.=0A.PP=0AOption=0A.B legal-size=0Ais positional an=
d sets the size of the scan area to Legal format. Set this=0Aoption if you =
own a Paragon 12000 LS. It can't be distinguished by=0Asoftware from a Scan=
Express 12000 SP (ISO A4 format).=0A.PP=0AOption=0A.B buffersize=0Ais a pos=
itional option that overrides the default value set for the size of=0Athe S=
CSI buffer. The buffer size is specified in kilobytes. The default value=0A=
is 128. Because of double buffering the buffer actually sent to the scanner=
=0Ais half the size of this value. Try to increase this value to achieve hi=
gher=0Ascan speeds. Note that some ScanExpress scanners don't like buffer s=
izes above=0A64 kb (buffersize =3D 128). If your sg driver can't set SCSI b=
uffer sizes at=0Aruntime you may have to change that value, too. See sane-s=
csi(5) for details.=0A.PP=0AOption=0A.B blocksize=0Ais a positional option =
that overrides the default value set for the maximum=0Aamount of data scann=
ed in one block. The buffer size is specified in=0Akilobytes. Some scanners=
 freeze if this value is bigger than 2048. The default=0Avalue is 1 GB (so =
effectively no limit) for most scanners. Don't change this=0Avalue if you d=
on't know exactly what you do.=0A.PP=0AOption=0A.B strip-height=0Ais a glob=
al option that limits the maximum height of the strip scanned with a=0Asing=
le SCSI read command.  The height is specified in inches and may contain a=
=0Afractional part (e.g., 1.5).  Setting the strip-height to a small value =
(one=0Ainch, for example) reduces the likelihood of encountering problems w=
ith SCSI=0Adriver timeouts and/or timeouts with other devices on the same S=
CSI bus.=0AUnfortunately, it also increases scan times. With current SCSI a=
dapters and=0Adrivers this option shouldn't be needed any more.=0A.PP=0AOpt=
ion=0A.B disable-double-buffering=0Ais a global option. If set, the backend=
 will only send one buffer at a time to=0Athe scanner. Try this option if y=
ou have trouble while scanning, e.g. SCSI=0Aerrors, freezes, or the first f=
ew cm are repeated over and over again in your=0Aimage.=0A.PP=0AOption=0A.B=
 disable-backtracking=0Ais a positional option. If set, the scanner will no=
t move back its slider=0Aafter each SCSI buffer is filled (`backtracking').=
 Setting this option will=0Alead to faster scans but may also produce horiz=
ontal stripes. This option=0Adoesn't work with every scanner (only some of =
the paragon models can modify=0Abacktracking).=0A.PP=0AFinally,=0A.B force-=
wait=0Ais a global option. If set, the backend will wait until the device i=
s ready=0Abefore sending the inquiry command. Further more the backend will=
 force the=0Ascan slider to return to its starting position (not implemente=
d for all=0Ascanners). This option may be necessary with the 600 II N or wh=
en scanimage is=0Aused multiple times (e.g. in scripts). The default is off=
 (not set).=0A.PP=0AA sample configuration file is shown below:=0A.PP=0A.RS=
=0A# limit strip height of all scanners to 1.5 inches:=0A.br=0Aoption strip=
-height 1.5=0A.br=0A.br=0A/dev/scanner    # first Mustek scanner=0A.br=0A# =
1 MB buffer for /dev/scanner:=0A.br=0Aoption buffersize 1024=0A.br=0A/dev/s=
ge        # second Mustek scanner=0A.br=0A# turn on fixes for /dev/sge:=0A.=
br=0Aoption lineart-fix=0A.br=0Aoption linedistance-fix=0A.RE=0A=0A.SH "SCS=
I ADAPTER TIPS"=0A.PP=0AYou need a SCSI adapter for the SCSI scanners. Even=
 if the connector is the=0Asame as that of parallel port scanners, connecti=
ng it to the computers=0Aparallel port will NOT work.=0A.PP=0AMustek SCSI s=
canners are typically delivered with an ISA SCSI adapter.=0AUnfortunately, =
that adapter is not worth much since it is not=0Ainterrupt driven.  It is (=
sometimes) possible to get the supplied card=0Ato work, but without interru=
pt line, scanning will be very slow and put=0Aso much load on the system, t=
hat it becomes almost unusable for other tasks.=0A.PP=0AIf you already have=
 a working SCSI controller in your system, you=0Ashould consider that Muste=
k scanners do not support the SCSI-2=0Adisconnect/reconnect protocol and he=
nce tie up the SCSI bus while a=0Ascan is in progress.  This means that no =
other SCSI device on the same=0Abus can be accessed while a scan is in prog=
ress.=0A.PP=0ABecause the Mustek-supplied adapter is not worth much and bec=
ause=0AMustek scanners do not support the SCSI-2 disconnect/reconnect=0Apro=
tocol, it is recommended to install a separate (cheap) SCSI=0Acontroller fo=
r Mustek scanners.  For example, ncr810 based cards are=0Aknown to work fin=
e and cost as little as fifty US dollars.=0A.PP=0AFor Mustek scanners, it i=
s typically necessary to configure the low-level SCSI=0Adriver to disable s=
ynchronous transfers (sync negotiation), tagged command=0Aqueuing, and targ=
et disconnects.  See=0A.BR sane-scsi (5)=0Afor driver- and platform-specifi=
c information.=0A.PP=0AThe ScanExpress models have sometimes trouble with h=
igh resolution=0Acolor mode. If you encounter sporadic corrupted images (pa=
rts duplicated=0Aor shifted horizontally) kill all other applications befor=
e scanning=0Aand (if sufficient memory is available) disable swapping. =0A.=
PP=0ADetails on how to get the Mustek SCSI adapters and other cards running=
 can be=0Afound at=0A.IR http://www.meier-geinitz.de/sane/mustek-backend/#S=
CSI .=0A=0A.SH "NON-SCSI SCANNERS"=0AThis backend has support for the Parag=
on 600 II EP and 600 II N parallel port=0Ascanners.  Note that the latter s=
canner comes with its own ISA card that=0Aimplements a funky parallel port =
(in other words, the scanner does not=0Aconnected to the printer parallel p=
ort).=0A.PP=0AThese scanners can be configured by listing the port number=
=0Aof the adapter in the mustek.conf file.  Valid port numbers are=0A.IR 0x=
26b ", " 0x2ab ", " 0x2eb ", " 0x22b ", " 0x32b ", " 0x36b ", "=0A.IR 0x3ab=
 ", " 0x3eb .=0APick one that doesn't conflict with the other hardware in y=
our computer. Put=0Aonly one number on a single line. Example:=0A.PP=0A.RS=
=0A.I 0x3eb=0A.RE=0A.PP=0ANote that for these scanners root privileges are =
required to access the=0AI/O ports.  Thus, either make frontends such as =
=0A.BR scanimage (1)=0Aand =0A.BR xscanimage (1)=0Asetuid root (generally n=
ot recommended for safety reasons) or, alternatively,=0Aaccess this backend=
 through the network daemon =0A.BR saned (1).=0A.PP=0AIf your images have h=
orizontal stripes in color mode, check option=0A.B linedistance-fix=0A(see =
above). Apply this option for a 600 II N scanner with firmware version 2.x =
and=0Adisable it for version 1.x. It's not necessary for the other paport s=
canners.=0A.PP=0AIf the Mustek backend blocks while sending the inqiury com=
mand to the scanner,=0Aadd the option=0A.B force-wait=0Ato=0A.IR mustek.con=
f .=0A.PP=0AAlso note that after a while of no activity, some scanners them=
selves (not the=0ASANE backend) turns off their CCFL lamps. This shutdown i=
s not always perfect=0Awith the result that the lamp sometimes continues to=
 glow dimly at one=0Aend. This doesn't appear to be dangerous since as soon=
 as you use the scanner=0Aagain, the lamp turns back on to the normal high =
brightness. However, the=0Afirst image scanned after such a shutdown may ha=
ve stripes and appear to be=0Aover-exposed.  When this happens, just take a=
nother scan, and the image will=0Abe fine.=0A.SH FILES=0A.TP=0A.I @CONFIGDI=
R@/mustek.conf=0AThe backend configuration file (see also description of=0A=
=2EB SANE_CONFIG_DIR=0Abelow).=0A.TP=0A.I @LIBDIR@/libsane-mustek.a=0AThe s=
tatic library implementing this backend.=0A.TP=0A.I @LIBDIR@/libsane-mustek=
=2Eso=0AThe shared library implementing this backend (present on systems th=
at=0Asupport dynamic loading).=0A.SH ENVIRONMENT=0A.TP=0A.B SANE_CONFIG_DIR=
=0AThis environment variable specifies the list of directories that may=0Ac=
ontain the configuration file.  Under UNIX, the directories are=0Aseparated=
 by a colon (`:'), under OS/2, they are separated by a=0Asemi-colon (`;'). =
 If this variable is not set, the configuration file=0Ais searched in two d=
efault directories: first, the current working=0Adirectory (".") and then i=
n @CONFIGDIR@.  If the value of the=0Aenvironment variable ends with the di=
rectory separator character, then=0Athe default directories are searched af=
ter the explicitly specified=0Adirectories.  For example, setting=0A.B SANE=
_CONFIG_DIR=0Ato "/tmp/config:" would result in directories "tmp/config", "=
=2E", and=0A"@CONFIGDIR@" being searched (in this order).=0A.TP=0A.B SANE_D=
EBUG_MUSTEK=0AIf the library was compiled with debug support enabled, this=
=0Aenvironment variable controls the debug level for this backend.  Higher=
=0Adebug levels increase the verbosity of the output. =0A=0A.nf            =
                                                                =0AValue  D=
escription=0A0      no output=0A1      print fatal errors=0A2      print im=
portant messages=0A3      print non-fatal errors and less important message=
s=0A4      print all but debugging messages=0A5      print everything=0A=0A=
Example: =0Aexport SANE_DEBUG_MUSTEK=3D4=0A=0A.SH "SEE ALSO"=0A.BR sane (7)=
,=0A.BR sane-find-scanner (1),=0A.BR sane-scsi (5),=0A.BR sane-mustek_usb (=
5), =0A.BR sane-gt68xx (5), =0A.BR sane-plustek (5),=0A.BR sane-mustek_pp (=
5)=0A.br=0A.I @DOCDIR@/mustek/mustek.CHANGES=0A.br=0A.I http://www.meier-ge=
initz.de/sane/mustek-backend/=0A=0A.SH AUTHOR=0ADavid Mosberger, Andreas Cz=
echanowski, Andreas Bolsch (SE extensions),=0AHenning Meier-Geinitz, James =
Perry (600 II EP extensions)=0A=0A.SH BUGS=0AScanning with the SCSI adapter=
s supplied by Mustek is very slow at=0Ahigh resolutions and wide scanareas.=
 =0A.PP=0ASome scanners (e.g. Paragon 1200 A3 + Pro, SE A3) need more testi=
ng.=0A.PP=0AThe gamma table supports only 256 colors, even if some scanners=
 can do more.=0A.PP=0AMore detailed bug information is available at the Mus=
tek backend=0Ahomepage:=0A.IR http://www.meier-geinitz.de/sane/mustek-backe=
nd/ .=0A
--sdtB3X0nJg68CQEu--