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

NAME

6       sane-sharp - SANE backend for SHARP scanners
7

DESCRIPTION

9       The  sane-sharp  library  implements  a  SANE (Scanner Access Now Easy)
10       backend that provides access to  Sharp  SCSI  scanners.   This  backend
11       should be considered beta-quality software!  In the current state it is
12       known to work with JX-610 and JX-250 scanners. It is prepared for usage
13       with  the  JX-330  series scanners, but we are not able to test it with
14       these devices.
15
16       For other Sharp scanners, it may or may not work.
17
18       At present, the following scanners are known to work with this backend.
19
20              Vendor  Product id:
21              -----   -----------
22              Sharp   JX-610
23              Sharp   JX-250
24              Sharp   JX-320
25              Sharp   JX-330
26              Sharp   JX-350
27
28       The following scanners are detected by the backend, but not tested:
29
30              Vendor  Product id:
31              -----   -----------
32              Sharp   JX-325
33

DEVICE NAMES

35       This backend expects device names of the form:
36
37              special
38
39       Where special is either the path-name for the special device that  cor‐
40       responds  to  a SCSI scanner. The special device name must be a generic
41       SCSI device or a symlink to such a device.  Under Linux, such a  device
42       name  could be /dev/sga or /dev/sge, for example.  See sane-scsi(5) for
43       details.
44
45

SCAN OPTIONS

47       --mode Scan Mode. Possible settings are: Lineart (1 bit black  &  white
48              scans),  Gray  (8 bit gray scale scans), Lineart Color (bi-level
49              color scans), and Color (8 bit RGB scans). The default value  is
50              Color.
51
52
53       --halftone-pattern
54              Halftone Pattern. Available only for the JX-330 series scanners.
55              Possible settings: none, Dither  Bayer,  Dither  Spiral,  Dither
56              Dispersed and Error Diffusion.  The default value is none.
57
58
59       --source
60              Paper Source. This option is only available if an automatic doc‐
61              ument feeder or a transparency adapter  is  installed.  Possible
62              settings  are:  Flatbed,  Automatic  Document Feeder, and Trans‐
63              parency Adapter.   If  an  ADF  or  a  transparency  adapter  is
64              installed, using it is the default selection.
65
66
67       --custom-gamma
68              Custom Gamma  This option determines whether a builtin or a cus‐
69              tom gamma table is used. Possible  settings  are:  yes  (enables
70              custom gamma tables) or no (enables a built gamma table).
71
72
73       --gamma
74              Gamma.  This  option is only available if Custom Gamma is set to
75              no.  Possible values are: 1.0 or 2.2.  The default value is 2.2.
76              (The  JX-250  and  JX-350 have no built in gamma correction; for
77              these scanners, a gamma table is downloaded to  the  scanner  by
78              the backend.)
79
80
81       --gamma-table
82              Gamma  Table.  Allowed  values:  0..255;  256  numbers  must  be
83              defined.  The default values are 0, 1, 2, .. 255 (i.e., gamma ==
84              1). This table is only used for gray scale scans.
85
86
87       --red-gamma-table
88              Red  Gamma  Table.  Allowed  values: 0..255; 256 numbers must be
89              defined.  The default values are 0, 1, 2, .. 255 (i.e., gamma ==
90              1).
91
92
93       --green-gamma-table
94              Green  Gamma  Table. Allowed values: 0..255; 256 numbers must be
95              defined.  The default values are 0, 1, 2, .. 255 (i.e., gamma ==
96              1).
97
98
99       --blue-gamma-table
100              Blue  Gamma  Table.  Allowed values: 0..255; 256 numbers must be
101              defined.  The default values are 0, 1, 2, .. 255 (i.e., gamma ==
102              1).
103
104
105       --resolution
106              Selects  the  resolution  of  the scanned image. Allowed values:
107              30..600 (JX-330, JX-350 and JX-610) and 30..400  (JX-250).   The
108              default value is 150.
109
110
111       -l, -t, -x, -y
112              Scan  Window.  Top-left x position of scan area (-l), top-left y
113              position of scan area (-t), bottom right x position of scan area
114              (-x)  and bottom right y position of scan area (-y).  The possi‐
115              ble settings depend on the scanner model and, for the JX-250 and
116              the  JX-350,  also on the usage of the automatic document feeder
117              resp. the transparency  adapter.  Please  refer  to  the  values
118              allowed by xscanimage(1), or xsane(1).  With scanimage(1), enter
119              one of the following commands in order to see the allowed param‐
120              eter values for the scan window:
121
122              scanimage -d sharp --source "Automatic Document Feeder" --help
123
124              scanimage -d sharp --source Flatbed --help
125
126              scanimage -d sharp --source "Transparency Adapter" --help
127
128
129       --edge emphasis
130              Edge  emphasis.  This option is not available for the JX-250 and
131              the JX-350.  Possible settings: None, Middle, Strong, and  Blur.
132              The default value is None.
133
134
135       --threshold
136              Sets  the  threshold for black and white pixels in lineart mode.
137              Possible values are 1..255.  The default  value  is  128.   This
138              option is only available in scan mode lineart.
139
140
141       --threshold-red
142              Sets  the  threshold for the red component of a pixel in in lin‐
143              eart color scan mode. Possible values are 1..255.   The  default
144              value  is 128.  This option is only available in scan mode color
145              lineart.
146
147
148       --threshold-green
149              Sets the threshold for the green component of a pixel in in lin‐
150              eart  color  scan mode. Possible values are 1..255.  The default
151              value is 128.  This option is only available in scan mode  color
152              lineart .
153
154
155       --threshold-blue
156              Sets  the threshold for the blue component of a pixel in in lin‐
157              eart color scan mode. Possible values are 1..255.   The  default
158              value  is 128.  This option is only available in scan mode color
159              lineart.
160
161
162       --lightcolor
163              Sets the color of the light source. Possible values  are  white,
164              red,  green  and blue.  The default value is white.  This option
165              is only available in scan modes lineart color and color.
166
167

ADF USAGE

169       If a paper jam occurrs,  the  maintenance  cover  must  be  opened  and
170       closed,  even  if  the  jammed paper can be removed without opening the
171       maintenance cover. Otherwise, the error condition will not be cleared.
172
173

CONFIGURATION

175       The contents of the sharp.conf file is a list  of  options  and  device
176       names  that  correspond to Sharp scanners. Empty lines and lines begin‐
177       ning with a hash mark (#) are ignored.  See  sane-scsi(5)  for  details
178       about device names.
179
180       Lines setting an option start with the key word option, followed by the
181       option's name and the option's value. At  present,  three  options  are
182       defined: buffers, buffersize, and readqueue.
183
184       Options  defined  at  the  start  of  sharp.conf  apply to all devices;
185       options defined after a device name apply to this device.
186
187       The options buffers and readqueue are only significant if  the  backend
188       has  been  compiled  so  that  for each scan a second process is forked
189       (switch USE_FORK in sharp.c ). This process reads the  scan  data  from
190       the  scanner  and  writes this data into a block of shared memory.  The
191       parent process reads the data from this memory block and delivers it to
192       the  frontend.  The  options  control the size and usage of this shared
193       memory block.
194
195       option buffers defines the number of buffers used. The smallest  number
196       allowed is 2.
197
198       option  buffersize defines the size of one buffer. Since each buffer is
199       filled with a single read command sent to the scanner, its size is lim‐
200       ited  automatically  to  the size allowed by the operating system or by
201       the Sane SCSI library for SCSI read commands. A buffer size of  128  kB
202       or 256 kB is recommended for scan resolutions of 300 dpi and above.
203
204       option readqueue defines how many read commands to be sent to the scan‐
205       ner are queued. At present, the Sane SCSI library supports queued  read
206       commands  only for for Linux. For other operating systems, option read‐
207       queue should be set to 0. For Linux, option readqueue should be set  to
208       2. Larger values than 2 for option readqueue are not reasonable in most
209       cases.  option buffers should be greater than option readqueue.
210
211

Performance Considerations

213       This section focuses on the problem of stops of the scanner's  carriage
214       during a scan. Carriage stops happen mainly with the JX-250. This scan‐
215       ner has obviously only a small internal buffer compared to  its  speed.
216       That means that the backend must read the data as fast as possible from
217       the scanner in order to avoid carriage stops.
218
219       Even the JX-250 needs only less than 10 seconds for a 400 dpi  A4  gray
220       scale  scan,  which results in a data transfer rate of more than 1.6 MB
221       per second. This means that the data produced by the  scanner  must  be
222       processed  fairly fast. Due to the small internal buffer of the JX-250,
223       the backend must issue a read request for the next data block  as  soon
224       as  possible  after  reading a block of data in order to avoid carriage
225       stops.
226
227       Stops of the carriage can be caused by the following reasons:
228
229              - too much "traffic" on the SCSI bus
230              - slow responses by the backend to the scanner,
231              - a program which processes the data acquired by the backend too
232              slow.
233
234       Too  much  "traffic" on the SCSI bus: This happens for example, if hard
235       disks are connected to the same SCSI bus as the scanner, and when  data
236       transfer  from/to  these hard disks requires a considerable part of the
237       SCSI bandwidth during a scan. If this is the case, you should  consider
238       to connect the scanner to a separate SCSI adapter.
239
240       Slow  responses by the backend to the scanner: Unfortunately, UNIX-like
241       operating systems generally have no real time capabilities.  Thus there
242       is  no  guarantee  that  the backend is under any circumstances able to
243       communicate with the scanner as fast  as  required.  To  minimize  this
244       problem,  the  backend  should  be  compiled  so that a separate reader
245       process is forked: Make sure that USE_FORK is defined when you  compile
246       sharp.c.   If  slow  responses of the backend remain to be problem, you
247       could try to reduce the load of the system. Even while the backend  and
248       the  reader  process  need only a minor amount of processor time, other
249       running processes can cause an increase in the time delay  between  two
250       time  slices  given  to  the reader process. On slower systems, such an
251       increased delay can be enough to cause a carriage stop with the JX-250.
252       For Linux, the usage of the SG driver version 2.1.36 or above is recom‐
253       mended, because it supports, in combination with the  SCSI  library  of
254       Sane  version 1.0.2, command queueing within the kernel.  This queueing
255       implementation, combined with a buffer size of at least 128 kB,  should
256       avoid most carriage stops.
257
258       Slow  processing of the scan data: An example for this situation is the
259       access to the scanner via a 10 MBit Ethernet, which is  definitely  too
260       slow  to  transfer  the  scan  data as fast as they are produced by the
261       scanner. If you have enough memory available, you can  increase  option
262       buffers, so that an entire image can be stored in these buffers.
263
264       In  order to see, if the backend is too slow or if the further process‐
265       ing  of  the  data  is  too  slow,   set   the   environment   variable
266       SANE_DEBUG_SHARP  to 1. When a scan is finished, the backend writes the
267       line "buffer full conditions: nn" to stderr. If nn  is  zero,  carriage
268       stops  are  caused  by  too  slow  responses of the backend or too much
269       "traffic" on the SCSI bus. If nn is greater than zero, the backend  had
270       to  wait  nn  times  until a buffer has been processed by the frontend.
271       (Please note that option buffers must be greater than option  readqueue
272       in order to get useful output for "buffer full conditions".)
273
274

FILES

276       /etc/sane.d/sharp.conf
277              The backend configuration file.
278
279       /usr/lib64/sane/libsane-sharp.a
280              The static library implementing this backend.
281
282       /usr/lib64/sane/libsane-sharp.so
283              The shared library implementing this backend (present on systems
284              that support dynamic loading).
285

ENVIRONMENT

287       SANE_DEBUG_SHARP
288              If the library was compiled with  debug  support  enabled,  this
289              environment  variable controls the debug level for this backend.
290              E.g., a value of 128 requests all debug output  to  be  printed.
291              Smaller levels reduce verbosity.
292

KNOWN PROBLEMS

294       1. ADF Mode
295              After  several ADF scans, the scanner moves the carriage back to
296              the idle position and back to ADF scan position, before  a  scan
297              starts.  We do not know, if this is a problem of the scanner, or
298              if this is a bug of the backend. At present,  the  scanner  must
299              power off and on to stop this annoying behaviour.
300
301       2. Threshold level does not work (only JX-610)
302
303       3.  The  maximum  resolution  is limited to 600 dpi(JX-610 supported to
304       1200 dpi) resp. 400 dpi (JX-250)
305
306       4. If the JX250 is used with an ADF, the following situation can occur:
307       After  several  scans,  the scanner moves, after loading a new sheet of
308       paper, the carriage to the idle position, and then back to the position
309       used  for  ADF  scans.  This happens for every scan, in contrast to the
310       calibration, which is done after 10 scans. (For  the  calibration,  the
311       carriage  is  also  moved to the idle position.) We do not know if this
312       behavior is caused by the backend, or if it is a bug in the firmware of
313       the scanner.
314
315       5.  Usage  of a transparency adapter (film scan unit) is supported, but
316       not tested.
317
318

SEE ALSO

320       sane(7), sane-scsi(5)
321
322

AUTHORS

324       Kazuya Fukuda, Abel Deuring
325
326

CREDITS

328       The Sharp backend is based on the Canon backend written by Helmut  Koe‐
329       berle
330
331       Parts of this man page are a plain copy of sane-mustek(5) by David Mos‐
332       berger-Tang, Andreas Czechanowski and Andreas Bolsch
333
334
335
336                                  11 Jul 2008                    sane-sharp(5)
Impressum