1sane-hp(5)               SANE Scanner Access Now Easy               sane-hp(5)
2
3
4

NAME

6       sane-hp - SANE backend for HP ScanJet scanners
7

DESCRIPTION

9       The sane-hp library implements a SANE (Scanner Access Now Easy) backend
10       that provides access to HP ScanJet scanners which support SCL  (Scanner
11       Control  Language  by HP).  The following scanners are known positively
12       to work with this backend:
13
14              Model:         Product id:     Interface:
15              ----------     -----------     ----------
16              ScanJet Plus   C9195A          HP Parallel Interface Card
17              ScanJet IIc    C1750A 3226     SCSI
18              ScanJet IIcx   C2500A 3332     SCSI
19              ScanJet IIp    C1790A          SCSI
20              ScanJet 3C     C2520A 3503     SCSI
21              ScanJet 3P     C2570A 3406     SCSI
22              ScanJet 4C     C2520A          SCSI
23              ScanJet 4P     C1130A 3540     SCSI
24              ScanJet 4100C  C6290A          USB
25              ScanJet 5P     C5110A          SCSI
26              ScanJet 5100C  C5190A          parallel port
27              ScanJet 5200C  C7190A 3846     parallel port/USB
28              ScanJet 6100C  C2520A 3644     SCSI
29              ScanJet 6200C  C6270A 3828     SCSI/USB
30              ScanJet 6250C  C6270A 3828     SCSI/USB
31              ScanJet 6300C  C7670A          SCSI/USB
32              ScanJet 6350C  C7670A          SCSI/USB
33              ScanJet 6390C  C7670A          SCSI/USB
34              PhotoSmart     C5100A R029,R030,R032    SCSI
35
36       Support for models 5100C/5200C connected to the parallel port  requires
37       the  ppSCSI  driver  available  at  http://cyberelk.net/tim/parport/pp
38       scsi.html and http://penguin-breeder.org/kernel/download/.
39
40
41       Support for models 5200C/62X0C/63X0C connected to the USB  require  the
42       kernel scanner driver or libusb. See sane-usb(5) for more details.
43
44       The sane-hp backend no longer supports OfficeJet multi-function periph‐
45       erals.  For these devices use the external "hpoj"  backend  in  version
46       0.90 and later of the "HP OfficeJet Linux driver", available at
47       http://hpoj.sourceforge.net
48
49       Because  Hewlett-Packard  does  no longer produce scanners that support
50       SCL (beside the OfficeJets), the above list of  supported  scanners  is
51       complete.   Other HP scanners are not supported by the sane-hp backend,
52       but     might     be     supported     by     another     one.      See
53       http://www.sane-project.org/.   You can also watch the sane-devel mail‐
54       ing list at http://www.sane-project.org/mailing-lists.html.
55
56       More details about  the  hp  backend  can  be  found  on  its  homepage
57       http://www.kirchgessner.net/sane.html.
58

DEVICE NAMES

60       This backend expects device names of the form:
61
62              special
63
64       Where  special is the UNIX path-name for the special device that corre‐
65       sponds to the scanner.  For SCSI scanners the special device name  must
66       be  a  generic SCSI device or a symlink to such a device.  Under Linux,
67       such a device name could be /dev/sga or /dev/sg2, for example.  If  the
68       special device name contains "usb", "uscanner" or "ugen", it is assumed
69       that the scanner is connected by USB.  For the HP ScanJet Plus the spe‐
70       cial  device  name  must be the device that corresponds to the parallel
71       interface card that was shipped with the scanner. That is  /dev/hpscan.
72       A    special    driver    is    required    for    this    card.    See
73       ftp://rvs.ctrl-c.liu.se/pub/wingel/hpscan for details. If the link does
74       not work, try ftp://sunsite.unc.edu/pub/Linux/kernel/patches/scanners.
75

CONFIGURATION

77       The  contents of the hp.conf file is a list of options and device names
78       that correspond to HP ScanJet scanners.  Empty lines and lines starting
79       with  a  hash mark (#) are ignored. See sane-scsi(5) and sane-usb(5) on
80       details of what constitutes a valid device name.
81
82       Options specified in front of the first line  that  contains  a  device
83       name  are defaults for all devices. Options specified below a line that
84       contains a device name apply just to the most  recently  mentioned  de‐
85       vice.
86
87       Supported   options   are   connect-scsi,   connect-device,  enable-im‐
88       age-buffering, and dumb-read.
89
90       Option connect-scsi specifies that the scanner is connected to the sys‐
91       tem  by  SCSI.   Input/output is performed using SCSI-commands. This is
92       the default.  But if your SCSI device name contains  "usb",  "uscanner"
93       or  "ugen",  option connect-scsi must be specified. Otherwise it is as‐
94       sumed that the scanner is connected by USB.
95
96       Option connect-device specifies that the scanner is  connected  to  the
97       system   by   a   special   device.   Input/output   is   performed  by
98       read()/write()-operations on the device. This option must be  used  for
99       HP ScanJet Plus or scanners connected to USB which are accessed through
100       a named device (e.g.  /dev/usb/scanner0).  For device names  that  con‐
101       tain "usb", "uscanner" or "ugen", it is not necessary to specify option
102       connect-device.
103
104       Option enable-image-buffering stores the scanned image in memory before
105       passing  it  to the frontend. Could be used in case of forward/backward
106       moving scanner lamp.
107
108       Option dumb-read can be used to work around problems with "Error during
109       device I/O". These problems may occur with certain SCSI-to-USB convert‐
110       ers or Buslogic SCSI cards.  The option should not be used for SCSI de‐
111       vices  which are working correctly.  Otherwise startup of frontends and
112       changing parameters might be slower.
113
114       A sample configuration file is shown below:
115
116              /dev/scanner
117              # this is a comment
118              /dev/hpscan
119              option connect-device
120
121       /dev/scanner is typically a symlink to the actual SCSI scanner device.
122

FILES

124       /etc/sane.d/hp.conf
125              The  backend  configuration  file  (see  also   description   of
126              SANE_CONFIG_DIR below).
127
128       /usr/lib64/sane/libsane-hp.a
129              The static library implementing this backend.
130
131       /usr/lib64/sane/libsane-hp.so
132              The shared library implementing this backend (present on systems
133              that support dynamic loading).
134
135       $HOME/.sane/calib-hp:<device>.dat
136              Calibration data for HP  PhotoSmart  PhotoScanner  that  is  re‐
137              trieved from the scanner after calibration. The data is uploaded
138              to the scanner at start of the backend if it is  in  media  mode
139              'print media' or if the media mode is changed to 'print media'.
140

ENVIRONMENT

142       SANE_CONFIG_DIR
143              This environment variable specifies the list of directories that
144              may contain the configuration file.  On *NIX systems, the direc‐
145              tories are separated by a colon (`:'), under OS/2, they are sep‐
146              arated by a semi-colon (`;').  If this variable is not set,  the
147              configuration  file  is  searched  in  two  default directories:
148              first,  the  current  working  directory  (.)    and   then   in
149              /etc/sane.d.  If the value of the environment variable ends with
150              the directory separator character, then the default  directories
151              are  searched  after  the explicitly specified directories.  For
152              example, setting SANE_CONFIG_DIR to "/tmp/config:" would  result
153              in directories tmp/config, ., and /etc/sane.d being searched (in
154              this order).
155
156       SANE_DEBUG_HP
157              If the library was compiled with debug support enabled, this en‐
158              vironment  variable  controls  the debug level for this backend.
159              E.g., a value of 128 requests all debug output  to  be  printed.
160              Smaller levels reduce verbosity.
161
162       SANE_HOME_HP
163              Only  used  for  OS/2 and along with use of HP PhotoSmart Photo‐
164              Scanner.  Must be set to the directory where the directory .sane
165              is located.  Is used to save and read the calibration file.
166
167       SANE_HP_KEEPOPEN_SCSI
168
169       SANE_HP_KEEPOPEN_USB
170
171       SANE_HP_KEEPOPEN_DEVICE
172              For  each  type  of  connection (connect-scsi, connect-usb, con‐
173              nect-device) it can be specified if the connection to the device
174              should be kept open ("1") or not ("0").  Usually the connections
175              are closed after an operation is performed.  Keeping  connection
176              open  to SCSI-devices can result in errors during device IO when
177              the scanner has not been used for some time.  By  default,  USB-
178              connections are kept open. Other connections are closed.
179
180       SANE_HP_RDREDO
181              Specifies  number of retries for read operation before returning
182              an EOF error.  Only supported for non-SCSI devices.  Default:  1
183              retry. Time between retries is 0.1 seconds.
184
185

BUGS

187       HP PhotoSmart PhotoScanner
188              In  media  mode  'slide'  and  'negative',  scan resolutions are
189              rounded to multiple of 300 dpi. The scanner does not  scale  the
190              data correctly on other resolutions. Some newer models (firmware
191              code R030 and later) do not support adjustment  of  contrast/in‐
192              tensity  level  and tone map.  The backend will simulate this by
193              software, but only for gray and 24 bit color.
194
195       Automatic Document Feeder (ADF)
196              For use of the ADF with xscanimage(1), first place paper in  the
197              ADF  and  then change option scan source to 'ADF'. Press 'change
198              document' to load a sheet. Then press 'scan' to  start  a  scan.
199              Maybe it is sufficient to press 'scan' without 'change document'
200              for repeated scans. The use of the preview window is not  recom‐
201              mended when working with the ADF.  Setting a window to scan from
202              ADF is not supported with xscanimage(1).  Try xsane(1).
203
204       Immediate actions
205              Some actions in xscanimage(1) (i.e. unload, select media,  cali‐
206              brate)  have an immediate effect on the scanner without starting
207              a scan.  These options can not be used with scanimage(1).
208
209

TODO

211       HP PhotoSmart PhotoScanner
212              PhotoScanners with firmware release R030 and up have no firmware
213              support  for  contrast/brightness/gamma  table.  In  the current
214              backend this is simulated by software on 24 bits data.   Simula‐
215              tion on 30 bits should give better results.
216
217       Data widths greater than 8 bits
218              Custom gamma table does not work.
219
220       Parallel scanner support
221              Beside  the ScanJet Plus which came with its own parallel inter‐
222              face card, currently only the HP ScanJet  5100C/5200C  are  sup‐
223              ported.   These  scanners are using an internal parallel-to-SCSI
224              converter which is supported by the ppSCSI-driver (see above).
225
226

SEE ALSO

228       sane(7), sane-scsi(5), sane-usb(5) scanimage(1), xscanimage(1), scanim‐
229       age(1)
230
231

AUTHOR

233       The sane-hp backend was written by Geoffrey T. Dairiki.
234       HP PhotoSmart PhotoScanner support by Peter Kirchgessner.
235
236
237
238                                  13 Jul 2008                       sane-hp(5)
Impressum