1sane-sharp(5) SANE Scanner Access Now Easy sane-sharp(5)
2
3
4
6 sane-sharp - SANE backend for SHARP scanners
7
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
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
47 Scan Mode (parameter --mode for scanimage). Possible settings:
48 Lineart (1 bit black & white scans),
49 Gray (8 bit gray scale scans),
50 Lineart Color (bi-level color scans),
51 Color (8 bit RGB scans).
52 The default value is Color.
53
54 Halftone Pattern (parameter --halftone-pattern for scanimage). Avail‐
55 able only for the JX-330 series scanners. Possible settings:
56 none
57 Dither Bayer
58 Dither Spiral
59 Dither Dispersed
60 Error Diffusion
61 The default value is none.
62
63 Paper Source (parameter --source for scanimage). This option is only
64 available, if an automatic document feeder or a transparency adapter is
65 installed. Possible settings:
66 Flatbed
67 Automatic Document Feeder
68 Transparency Adapter
69 If an ADF or a transparency adapter is installed, using it is the
70 default selection.
71
72 Custom Gamma (parameter --custom-gamma for scanimage). This option
73 determines whether a builtin or a custom gamma-table is used. Possible
74 settings:
75 yes enables custom gamma tables
76 no enables a built gamma table
77
78 Gamma (parameter --Gamma for scanimage). This option is only available,
79 if Custom Gamma is set to no. Possible values:
80 1.0
81 2.2
82 The default value is 2.2. (The JX-250 and JX-350 have no built in gamma
83 correction; for these scanner, a gamma table is downloaded to the scan‐
84 ner by the backend.)
85
86 Gamma Table (parameter --gamma-table for scanimage). Allowed values:
87 0..255; 256 numbers must be defined. The default values are 0, 1, 2,
88 .. 255 (i.e., gamma == 1). This table is only used for gray scale
89 scans.
90
91 Red Gamma Table (parameter --red-gamma-table for scanimage). Allowed
92 values: 0..255; 256 numbers must be defined. The default values are 0,
93 1, 2, .. 255 (i.e., gamma == 1).
94
95 Green Gamma Table (paramter --green-gamma-table for scanimage). Allowed
96 values: 0..255; 256 numbers must be defined. The default values are 0,
97 1, 2, .. 255 (i.e., gamma == 1).
98
99 Blue Gamma Table (paramter --blue-gamma-table for scanimage). Allowed
100 values: 0..255; 256 numbers must be defined. The default values are 0,
101 1, 2, .. 255 (i.e., gamma == 1).
102
103 Resolution in pixel per inch (parameter --resolution for scanimage).
104 Selects the resolution of the scanned image. Allowed values:
105 30..600 (JX-330, JX-350 and JX-610) resp. 30..400 (JX-250)
106 The default value is 150.
107
108 Scan Window
109
110 The possible settings depend on the scanner model and, for the JX-250
111 and the JX-350, also on the usage of the automatic document feeder
112 resp. the transparency adapter. Please refer to the values allowed by
113 xscanimage, or xsane. With scanimage, enter one of the following com‐
114 mands:
115
116 scanimage -d sharp --source "Automatic Document Feeder" --help
117
118 scanimage -d sharp --source Flatbed --help
119
120 scanimage -d sharp --source "Transparency Adapter" --help
121
122 in order to see the allowed parameter values for the scan window.
123
124 The scan window parameters are:
125
126 Top-left x position of scan area (parameter -l for scanimage);
127 Top-left y position of scan area (parameter -t for scanimage);
128 bottom right x position of scan area (parameter -x for scanim‐
129 age);
130 bottom right y position of scan area (parameter -y for scanim‐
131 age);
132
133 Edge emphasis (parameter --Edge emphasis for scanimage). This option is
134 not available for the JX-250 and the JX-350. Possible settings:
135 None
136 Middle
137 Strong
138 Blur
139 The default value is None.
140
141 Threshold (parameter --threshold for scanimage). Sets the threshold for
142 black and white pixels in lineart mode. Possible values:
143 1..255
144 The default value is 128. This option is only available in scan mode
145 lineart.
146
147 Threshold Red (parameter --threshold-red for scanimage). Sets the
148 threshold for the red component of a pixel in in lineart color scan
149 mode. Possible values:
150 1..255
151 The default value is 128. This option is only available in scan mode
152 color lineart.
153
154 Threshold Green (parameter --threshold-green for scanimage). Sets the
155 threshold for the green component of a pixel in in lineart color scan
156 mode. Possible values:
157 1..255
158 The default value is 128. This option is only available in scan mode
159 color lineart.
160
161 Threshold Blue (parameter --threshold-blue for scanimage). Sets the
162 threshold for the blue component of a pixel in in lineart color scan
163 mode. Possible values:
164 1..255
165 The default value is 128. This option is only available in scan mode
166 color lineart.
167
168 Light Color (parameter --LightColor for scanimage). Sets the color of
169 the light source. Possible values:
170 white
171 red
172 green
173 blue
174 The default value is white. This option is only available in scan
175 modes lineart color and color.
176
177
179 If a paper jam occurred, the maintenance cover must be opened and
180 closed, even if the jammed paper can be removed without opening the
181 maintenance cover. Otherwise, the error condition cannot be cleared.
182
183
185 The contents of the sharp.conf file is a list of options and device
186 names that correspond to Sharp scanners. Empty lines and lines begin‐
187 ning with a hash mark (#) are ignored. See sane-scsi(5) for details
188 about device names.
189
190 Lines setting an option start with the key word option, followed by the
191 option's name and the option's value. At present, three options are
192 defined: buffers, buffersize, and readqueue.
193
194 Options defined at the start of sharp.conf apply to all devices;
195 options defined after a device name apply to this device.
196
197 The options buffers and readqueue are only significant if the backend
198 has been compiled so that for each scan a second process is forked
199 (switch USE_FORK in sharp.c ). This process reads the scan data from
200 the scanner and writes this data into a block of shared memory. The
201 parent process reads the data from this memory block and delivers it to
202 the frontend. The options control the size and usage of this shared
203 memory block.
204
205 option buffers defines the number of buffers used. The smallest number
206 allowed is 2.
207
208 option buffersize defines the size of one buffer. Since each buffer is
209 filled with a single read command sent to the scanner, its size is lim‐
210 ited automatically to the size allowed by the operating system or by
211 the Sane SCSI library for SCSI read commands. A buffer size of 128 kB
212 or 256 kB is recommended for scan resolutions of 300 dpi and above.
213
214 option readqueue defines how many read commands to be sent to the scan‐
215 ner are queued. At present, the Sane SCSI library supports queued read
216 commands only for for Linux. For other operating systems, option read‐
217 queue should be set to 0. For Linux, option readqueue should be set to
218 2. Larger values than 2 for option readqueue are not reasonable in most
219 cases. option buffers should be greater than option readqueue.
220
221
223 This section focuses on the problem of stops of the scanner's carriage
224 during a scan. Carriage stops happen mainly with the JX-250. This scan‐
225 ner has obviously only a small internal buffer compared to its speed.
226 That means that the backend must read the data as fast as possible from
227 the scanner in order to avoid carriage stops.
228
229 Even the JX-250 needs only less than 10 seconds for a 400 dpi A4 gray
230 scale scan, which results in a data transfer rate of more than 1.6 MB
231 per second. This means that the data produced by the scanner must be
232 processed fairly fast. Due to the small internal buffer of the JX-250,
233 the backend must issue a read request for the next data block as soon
234 as possible after reading a block of data in order to avoid carriage
235 stops.
236
237 Stops of the carriage can be caused by the following reasons:
238
239 - too much "traffic" on the SCSI bus
240 - slow responses by the backend to the scanner,
241 - a program which processes the data acquired by the backend too
242 slow.
243
244 Too much "traffic" on the SCSI bus: This happens for example, if hard
245 disks are connected to the same SCSI bus as the scanner, and when data
246 transfer from/to these hard disks requires a considerable part of the
247 SCSI bandwidth during a scan. If this is the case, you should consider
248 to connect the scanner to a separate SCSI adapter.
249
250 Slow responses by the backend to the scanner: Unfortunately, Unix-like
251 operating systems generally have no real time capabilities. Thus there
252 is no guarantee that the backend is under any circumstances able to
253 communicate with the scanner as fast as required. To minimize this
254 problem, the backend should be compiled so that a separate reader
255 process is forked: Make sure that USE_FORK is defined when you compile
256 sharp.c. If slow responses of the backend remain to be problem, you
257 could try to reduce the load of the system. Even while the backend and
258 the reader process need only a minor amount of processor time, other
259 running processes can cause an increase in the time delay between two
260 time slices given to the reader process. On slower systems, such an
261 increased delay can be enough to cause a carriage stop with the JX-250.
262 For Linux, the usage of the SG driver version 2.1.36 or above is recom‐
263 mended, because it supports, in combination with the SCSI library of
264 Sane version 1.0.2, command queueing within the kernel. This queueing
265 implementation, combined with a buffer size of at least 128 kB, should
266 avoid most carriage stops.
267
268 Slow processing of the scan data: An example for this situation is the
269 access to the scanner via a 10 MBit Ethernet, which is definitely too
270 slow to transfer the scan data as fast as they are produced by the
271 scanner. If you have enough memory available, you can increase option
272 buffers, so that an entire image can be stored in these buffers.
273
274 In order to see, if the backend is too slow or if the further process‐
275 ing of the data is too slow, set the environment variable
276 SANE_DEBUG_SHARP to 1. When a scan is finished, the backend writes the
277 line "buffer full conditions: nn" to stderr. If nn is zero, carriage
278 stops are caused by too slow responses of the backend or too much
279 "traffic" on the SCSI bus. If nn is greater than zero, the backend had
280 to wait nn times until a buffer has been processed by the frontend.
281 (Please note that option buffers must be greater than option readqueue
282 in order to get useful output for "buffer full conditions".)
283
284
286 /etc/sane.d/sharp.conf
287 The backend configuration file.
288
289 /usr/lib64/sane/libsane-sharp.a
290 The static library implementing this backend.
291
292 /usr/lib64/sane/libsane-sharp.so
293 The shared library implementing this backend (present on systems
294 that support dynamic loading).
295
297 SANE_DEBUG_SHARP
298 If the library was compiled with debug support enabled, this
299 environment variable controls the debug level for this backend.
300 E.g., a value of 128 requests all debug output to be printed.
301 Smaller levels reduce verbosity.
302
304 1. ADF Mode
305 After several ADF scans, the scanner moves the carriage back to
306 the idle position and back to ADF scan position, before a scan
307 starts. We do not know, if this is a problem of the scanner, or
308 if this is a bug of the backend. At present, the scanner must
309 power off and on to stop this annoying behaviour.
310
311 2. Threshold level does not work (only JX-610)
312
313 3. The maximum resolution is limited to 600 dpi(JX-610 supported to
314 1200 dpi) resp. 400 dpi (JX-250)
315
316 4. If the JX250 is used with an ADF, the following situation can occur:
317 After several scans, the scanner moves, after loading a new sheet of
318 paper, the carriage to the idle position, and then back to the position
319 used for ADF scans. This happens for every scan, in contrast to the
320 calibration, which is done after 10 scans. (For the calibration, the
321 carriage is also moved to the idle position.) We do not know, if this
322 behavior is caused by the backend, or if it is a bug in the firmware of
323 the scanner.
324
325 5. Usage of a transparency adapter (film scan unit) is supported, but
326 not tested.
327
328
330 sane(7), sane-scsi(5)
331
333 Kazuya Fukuda, Abel Deuring
334
336 The Sharp backend is based on the Canon backend written by Helmut Koe‐
337 berle
338
339 Parts of this man page are a plain copy of sane-mustek(5) by David Mos‐
340 berger-Tang, Andreas Czechanowski and Andreas Bolsch
341
342
343
344 11 Jul 2008 sane-sharp(5)