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

NAME

6       sane-bh  -  SANE  backend  for  Bell+Howell Copiscan II series document
7       scanners
8

DESCRIPTION

10       The sane-bh library implements a SANE (Scanner Access Now Easy) backend
11       that  provides  access to Bell+Howell Copiscan II series document scan‐
12       ners.  The Copiscan II 6338 has been the  primary  scanner  model  used
13       during development and testing, but since the programming interface for
14       the entire series is consistent the backend should work for the follow‐
15       ing scanner models:
16
17              COPISCAN II 6338 Duplex Scanner with ACE
18              COPISCAN II 2135 Simplex Scanner
19              COPISCAN II 2137(A) Simplex Scanner (with ACE)
20              COPISCAN II 2138A Simplex Scanner with ACE
21              COPISCAN II 3238 Simplex Scanner
22              COPISCAN II 3338(A) Simplex Scanner (with ACE)
23
24       If  you  have  a  Bell+Howell scanner and are able to test it with this
25       backend, please  contact  sane-devel@alioth-lists.debian.net  with  the
26       model    number    and    testing    results.    Have    a    look   at
27       http://www.sane-project.org/mailing-lists.html concerning  subscription
28       to sane-devel. Additionally, the author is curious as to the likelihood
29       of using this backend with the newer 4000 and 8000 series scanners.  If
30       you have such a beast, please let me know.
31
32       The  Bell+Howell  Copiscan II series document scanners are high volume,
33       high throughput scanners designed for document  scanning  applications.
34       As  such, they are lineart/grayscale scanners supporting a fixed number
35       of fairly low resolutions (e.g. 200/240/300dpi).  However, they do have
36       a number of interesting and useful features suited to needs of document
37       imaging applications.  This backend attempts  to  support  as  many  of
38       these features as possible.
39
40       The  main  technical reference used in writing this backend is the Bell
41       and Howell Copiscan II Remote SCSI Controller (RSC) OEM Technical  Man‐
42       ual  Version 1.5.  The Linux SCSI programming HOWTO, the SANE API docu‐
43       mentation, and SANE source code were also extremely valuable resources.
44
45
46       The latest backend release, additional information  and  helpful  hints
47       are available from the backend homepage:
48              http://www.martoneconsulting.com/sane-bh.html
49

DEVICE NAMES

51       This backend expects device names of the form:
52
53              special
54
55       Where  special is the path-name for the special device that corresponds
56       to a SCSI scanner. For SCSI scanners, the special device name must be a
57       generic SCSI device or a symlink to such a device.  Under Linux, such a
58       device name takes a format such as /dev/sga or /dev/sg0,  for  example.
59       See sane-scsi(5) for details.
60
61

OPTIONS

63       Scan Mode Options:
64
65       --preview[=(yes|no)] [no]
66              Request  a  preview-quality  scan.   When  preview is set to yes
67              image compression is disabled and the image is  delivered  in  a
68              SANE_FRAME_GRAY frame.
69
70       --mode lineart|halftone [lineart]
71              Selects the scan mode (e.g., lineart,monochrome, or color).
72
73       --resolution 200|240|300dpi [200]
74              Sets  the  resolution  of the scanned image.  Each scanner model
75              supports a list of standard resolutions; only these  resolutions
76              can be used.
77
78       --compression none|g31d|g32d|g42d [none]
79              Sets  the  compression mode of the scanner.  Determines the type
80              of data returned from the scanner.  Values are:
81
82              none - uncompressed data - delivered in a SANE_FRAME_GRAY frame
83              g31d  -  CCITT  G3  1  dimension   (MH)   -   delivered   in   a
84              SANE_FRAME_G31D frame
85              g32d  -  CCITT  G3  2  dimensions  (MR,  K=4)  -  delivered in a
86              SANE_FRAME_G32D frame
87              g42d - CCITT G4 (MMR) - delivered in a SANE_FRAME_G42D frame
88
89              NOTE: The use of g31d, g32d, and g42d compression values  causes
90              the  backend to generate optional frame formats which may not be
91              supported by all SANE frontends.
92
93
94       Geometry Options:
95
96       --autoborder[=(yes|no)] [yes]
97              Enable/Disable automatic image border detection.  When  enabled,
98              the  RSC  unit automatically detects the image area and sets the
99              window geometry to match.
100
101       --paper-size Custom|Letter|Legal|A3|A4|A5|A6|B4|B5 [Custom]
102              Specify the scan window geometry by specifying the paper size of
103              the documents to be scanned.
104
105       --tl-x 0..297.18mm [0]
106              Top-left x position of scan area.
107
108       --tl-y 0..431.8mm [0]
109              Top-left y position of scan area.
110
111       --br-x 0..297.18mm [297.18]
112              Bottom-right x position of scan area.
113
114       --br-y 0..431.8mm [431.8]
115              Bottom-right y position of scan area.
116
117       Feeder Options:
118
119       --source Automatic Document Feeder|Manual Feed Tray [Automatic Document
120       Feeder]
121              Selects the scan source  (such  as  a  document  feeder).   This
122              option   is   provided   to  allow  multiple  image  scans  with
123              xsane(1);ithasnootherpurpose.
124
125       --batch[=(yes|no)] [no]
126              Enable/disable batch mode scanning.  Batch mode allows  scanning
127              at  maximum  throughput  by buffering within the RSC unit.  This
128              option is recommended when performing multiple pages scans until
129              the feeder is emptied.
130
131       --duplex[=(yes|no)] [no]
132              Enable duplex (dual-sided) scanning.  The scanner takes an image
133              of each side of the document during a single  pass  through  the
134              scanner.  The front page is delivered followed by the back page.
135              Most options, such as compression, affect  both  the  front  and
136              back pages.
137
138       --timeout-adf 0..255 [0]
139              Sets  the  timeout  in seconds for the automatic document feeder
140              (ADF).  The value 0 specifies the hardware default  value  which
141              varies based on the scanner model.
142
143       --timeout-manual 0..255 [0]
144              Sets  the  timeout  in  seconds  for semi-automatic feeder.  The
145              value 0 specifies the hardware default value which varies  based
146              on the scanner model.
147
148       --check-adf[=(yes|no)] [no]
149              Check  ADF  Status prior to starting scan using the OBJECT POSI‐
150              TION command.  Note that  this  feature  requires  RSC  firmware
151              level 1.5 or higher and dip switch 4 must be in the on position.
152              NOTE: This option has not been tested extensively and  may  pro‐
153              duce undesirable results.
154
155       Enhancement:
156
157       --control-panel[=(yes|no)] [yes]
158              Enables the scanner's control panel for selecting image enhance‐
159              ment parameters.  When the option is set  to  no  the  following
160              options   are  used  to  control  image  enhancement.   See  the
161              Bell+Howell scanner users' guide for complete information on ACE
162              functionality.
163
164       --ace-function -4..4 [3]
165              Specify the Automatic Contrast Enhancement (ACE) Function.
166
167       --ace-sensitivity 0..9 [5]
168              Specify the Automatic Contrast Enhancement (ACE) Sensitivity.
169
170       --brightness 0..255 [0]
171              Controls  the brightness of the acquired image.  Ignored for ACE
172              capable scanners.
173
174       --threshold 0..255 [0]
175              Select minimum-brightness to get a white point.  Ignored for ACE
176              capable scanners.
177
178       --contrast 0..255 [inactive]
179              Controls the contrast of the acquired image.  This option is not
180              currently used by the scanner (and perhaps never will be).
181
182       --negative[=(yes|no)] [no]
183              Swap black and white, yielding a reverse-video image.
184
185       Icon:
186
187       --icon-width 0..3600pel (in steps of 8) [0]
188              Width of icon (thumbnail) image in pixels.
189
190       --icon-length 0..3600pel (in steps of 8) [0]
191              Length of icon (thumbnail) image in pixels.
192
193       Barcode Options:
194
195       --barcode-search-bar <see list> [none]
196              Specifies the barcode type to search for.  If this option is not
197              specified,  or  specified with a value of none, then the barcode
198              decoding feature is completely disabled.  The valid barcode type
199              are:
200
201              none
202              ean-8
203              ean-13
204              reserved-ean-add
205              code39
206              code2-5-interleaved
207              code2-5-3lines-matrix
208              code2-5-3lines-datalogic
209              code2-5-5lines-industrial
210              patchcode
211              codabar
212              codabar-with-start-stop
213              code39ascii
214              code128
215              code2-5-5lines-iata
216
217       --barcode-search-count 1..7 [3]
218              Number  of  times  that the RSC performs the decoding algorithm.
219              Specify the smallest number possible  to  increase  performance.
220              If  you are having trouble recognizing barcodes, it is suggested
221              that you increase this option to its maximum value (7).
222
223       --barcode-search-mode <see list> [horiz-vert]
224              Chooses the orientation of barcodes to be searched.   The  valid
225              orientations are:
226
227              horiz-vert
228              horizontal
229              vertical
230              vert-horiz
231
232       --barcode-hmin 0..1660mm [5]
233              Sets  the  barcode  minimum height in millimeters (larger values
234              increase recognition speed).  Of course the actual  barcodes  in
235              the document must be of sufficient size.
236
237       --barcode-search-timeout 20..65535us [10000]
238              Sets  the  timeout  for barcode searching in milliseconds.  When
239              the timeout expires, the decoder will stop trying to decode bar‐
240              codes.
241
242       --section <string> []
243              Specifies  a series of image sections.  A section can be used to
244              gather a subset image or to provide a  small  area  for  barcode
245              decoding.   Each  section  is  specified in the following format
246              (units are in millimeters):
247
248       <width>x<height>+<top-left-x>+<top-left-y>[:functioncode...]
249
250       Multiple sections can be specified by separating them with commas.
251
252       For example 76.2x25.4+50.8+0:frontbar identifies an area 3 inches  wide
253       and  1  inch  high  with  a  top left corner at the top of the page two
254       inches from the left hand edge of the page.  This section will be  used
255       for barcode decoding on the front page only.
256
257       For  example  50.8x25.4+25.4+0:frontbar:front:g42d identifies an area 2
258       inches wide and 1 inch high with a top left corner at the  top  of  the
259       page  one  inch from the left hand edge of the page.  This section will
260       be used for barcode decoding on the front page as well as generating an
261       image compressed in g42d format.
262
263       Ordinarily  barcodes  are  searched in the entire image.  However, when
264       you specify sections all barcode searching is done within the  specific
265       sections  identified.   This  can  significantly  speed up the decoding
266       process.
267
268       The following function codes are available:
269
270              front - generate an image for the front page section
271              back - generate an image for the back page section
272              frontbar - perform barcode search in front page section
273              backbar - perform barcode search in back page section
274              frontpatch - perform patchcode search in front page section
275              backpatch - perform patchcode search in back page section
276              none - use no image compression
277              g31d - use Group 3 1 dimension image compression
278              g32d - use Group 3 2 dimensions image compression
279              g42d - use Group 4 2 dimensions image compression
280
281       If you omit a compression functioncode, the full page compression  set‐
282       ting  is used.  If you specify multiple compression functioncodes, only
283       the last one is used.
284
285
286       --barcode-relmax 0..255 [0]
287              Specifies the maximum relation from the widest to  the  smallest
288              bar.
289
290       --barcode-barmin 0..255 [0]
291              Specifies the minimum number of bars in Bar/Patch code.
292
293       --barcode-barmax 0..255 [0]
294              Specifies the maximum number of bars in a Bar/Patch code.
295
296       --barcode-contrast 0..6 [3]
297              Specifies  the image contrast used in decoding.  Use higher val‐
298              ues when there are more white pixels in the code.
299
300       --barcode-patchmode 0..1 [0]
301              Controls Patch Code detection.
302
303

CONFIGURATION

305       The contents of the bh.conf file is a list of device names that  corre‐
306       spond  to  Bell+Howell  scanners.   See sane-scsi(5) on details of what
307       constitutes a valid device name.  Additionally, options can  be  speci‐
308       fied;  these  lines  begin  with  the  word  "option".   Each option is
309       described in detail below.  Empty lines and lines starting with a  hash
310       mark (#) are ignored.
311
312

OPTIONS

314       The following options can be specified in the bh.conf file.
315
316       disable-optional-frames
317              This  option  prevents  the  backend  from  sending any optional
318              frames.  This option may be useful when dealing  with  frontends
319              which do not support these optional frames.  When this option is
320              in effect, the data is sent in  a  SANE_FRAME_GRAY  frame.   The
321              optional  frames  sent  by  this  backend  are: SANE_FRAME_G31D,
322              SANE_FRAME_G32D,  SANE_FRAME_G42D  and  SANE_FRAME_TEXT.   These
323              frames  are  generated  based  on  the  compression  and barcode
324              options.  These frames are never sent in preview mode.
325
326       fake-inquiry
327              This option is used for debugging purposes and its  use  is  not
328              encouraged.  Essentially, it allows the backend to initialize in
329              the absence of a scanner.  This is useful  for  development  and
330              not  much  else.   This  option must be specified earlier in the
331              configuration file than the devices which are to be "faked".
332
333

FILES

335       /etc/sane.d/bh.conf
336              The  backend  configuration  file  (see  also   description   of
337              SANE_CONFIG_DIR below).
338
339       /usr/lib64/sane/libsane-bh.a
340              The static library implementing this backend.
341
342       /usr/lib64/sane/libsane-bh.so
343              The shared library implementing this backend (present on systems
344              that support dynamic loading).
345
346

ENVIRONMENT

348       SANE_CONFIG_DIR
349              This environment variable specifies the list of directories that
350              may contain the configuration file.  Under UNIX, the directories
351              are separated by a colon (`:'), under OS/2, they  are  separated
352              by a semi-colon (`;').  If this variable is not set, the config‐
353              uration file is searched in two default directories: first,  the
354              current working directory (".") and then in /etc/sane.d.  If the
355              value of the environment variable ends with the directory  sepa‐
356              rator character, then the default directories are searched after
357              the explicitly  specified  directories.   For  example,  setting
358              SANE_CONFIG_DIR  to  "/tmp/config:"  would result in directories
359              tmp/config, ., and /etc/sane.d being searched (in this order).
360
361       SANE_DEBUG_BH
362              If the library was compiled with  debug  support  enabled,  this
363              environment  variable controls the debug level for this backend.
364              E.g., a value of 255 requests all debug output  to  be  printed.
365              Smaller levels reduce verbosity.
366
367

SUPPORTED FEATURES

369       ADF support
370              With  document scanners, automatic document feeder (ADF) support
371              is a key feature.  The backend supports the ADF by  default  and
372              returns  SANE_STATUS_NO_DOCS  when the out-of-paper condition is
373              detected.  The SANE frontend scanadf(1) is a command line  fron‐
374              tend  that supports multi-page scans.  It has been used success‐
375              fully with this backend.   The  SANE  frontend  xsane(1)  is  an
376              improved  GUI  frontend by Oliver Rauch.  Support for multi-page
377              scans is included in xsane version 0.35 and above.
378
379
380       Duplex scanning
381              Some models, such as the COPISCAN II 6338, support duplex  scan‐
382              ning.   That  is,  they scan both sides of the document during a
383              single pass through the scanner (the scanner has  two  cameras).
384              This   backend  supports  duplex  scanning  (with  the  --duplex
385              option).  The front and back page images are delivered  consecu‐
386              tively as if they were separately scanned pages.
387
388
389       Hardware compression
390              The  scanner  is  capable  of  compressing the data into several
391              industry standard formats (CCITT G3,  CCITT  G3-2D,  CCITT  G4).
392              This  results  in  increased  performance as less data is passed
393              from the scanner to the host over the  SCSI  bus.   The  backend
394              supports  these  compression  formats  via  the  --g31d, --g32d,
395              --g42d options,  respectively.   Many  SANE  frontends  are  not
396              equipped to deal with these formats, however.  The SANE frontend
397              scanadf(1) supports these  optional  frame  formats.   The  com‐
398              pressed image data is written directly to a file and can then be
399              processed by  a  scan-script  using  the  --scan-script  option.
400              Examples of this are given on the scanadf(1) homepage.
401
402
403       Automatic Border Detection
404              The  scanner  can automatically detect the paper size and adjust
405              the scanning window geometry appropriately.   The  backend  sup‐
406              ports  this  useful feature with the --autoborder option.  It is
407              enabled by default.
408
409
410       Batch Mode Scanning
411              The batch scan mode allows for maximum throughput.  The Set Win‐
412              dow parameters must remain constant during the entire batch.
413
414
415       Icon Generation
416              The  Icon function generates a thumbnail of the full page image,
417              that can be transferred as if it were  a  separate  page.   This
418              allows  the  host  to quickly display a thumbnail representation
419              during the scanning operation.  Perhaps this would  be  a  great
420              way  of  implementing a preview scan, but since a normal scan is
421              so quick, it might not be worth the trouble.
422
423
424       Multiple Sections
425              Multiple sections (scanning sub-windows) can be defined for  the
426              front  and  back pages.  Each section can have different charac‐
427              teristics  (e.g.  geometry,  compression).   The  sections   are
428              returned  as  if they were separately scanned images.  Addition‐
429              ally sections can be used to greatly enhance  the  accuracy  and
430              efficiency of the barcode/patchcode decoding process by limiting
431              the search area to a small subset of the page.  Most Copiscan II
432              series scanners support up to 8 user-defined sections.
433
434
435       Support Barcode/Patchcode Decoding
436              The  RSC unit can recognize Bar and Patch Codes of various types
437              embedded in the scanned image.  The codes are  decoded  and  the
438              data  is  returned to the frontend as a text frame.  The text is
439              encoded in xml and contains a great deal  of  information  about
440              the  decoded  data  such as the location where it was found, its
441              orientation, and the time it took to find.  Further  information
442              on the content of this text frame as well as some barcode decod‐
443              ing examples can be found on the backend homepage.
444
445

LIMITATIONS

447       Decoding a single barcode type per scan
448              The RSC unit can search for up to six different barcode types at
449              a  time.   While  the  code generally supports this as well, the
450              --barcode-search-bar option only allows the user  to  specify  a
451              single  barcode  type.   Perhaps  another  option which allows a
452              comma separated list of barcode type codes  could  be  added  to
453              address this.
454
455       Scanning a fixed number of pages in batch mode
456              The  separation  of  front  and  back  end functionality in SANE
457              presents a problem in supporting the 'cancel batch'  functional‐
458              ity in the scanner.  In batch mode, the scanner is always a page
459              ahead of the host.  The host, knowing ahead of time  which  page
460              will  be the last, can cancel batch mode prior to initiating the
461              last scan command.  Currently, there is no  mechanism  available
462              for  the  frontend  to  pass  this knowledge to the backend.  If
463              batch mode is enabled and the --end-count terminates  a  scanadf
464              session,  an  extra page will be pulled through the scanner, but
465              is neither read nor delivered to the frontend.  The issue can be
466              avoided by specifying --batch=no when scanning a fixed number of
467              pages.
468
469       Revision 1.2 Patch detector
470              There is an enhanced patchcode detection algorithm available  in
471              the  RSC  with  revision  1.2  or higher that is faster and more
472              reliable than the standard Bar/Patch code decoder.  This is  not
473              currently supported.
474
475

BUGS

477       This is a new backend; detailed bug reports are welcome -- and expected
478       ;)
479
480       If you have found something that you think is a bug, please attempt  to
481       recreate it with the SANE_DEBUG_BH environment variable set to 255, and
482       send  a  report  detailing  the  conditions  surrounding  the  bug   to
483       sane-devel@alioth-lists.debian.net.
484
485

SEE ALSO

487       sane(7), sane-scsi(5), scanimage(1), scanadf(1), xsane(1)
488
489

AUTHOR

491       The   sane-bh  backend  was  written  by  Tom  Martone,  based  on  the
492       sane-ricoh(5) backend by Feico W. Dillema and the  bnhscan  program  by
493       Sean  Reifschneider  of tummy.com ltd.  Some 8000 enhancements added by
494       Mark Temple.
495
496
497
498                                  10 Jul 2008                       sane-bh(5)
Impressum