ss - SCSI Scanner device
ss* at scsibus? target ? lun ?
The ss device allows an application to set scanner parameters and retrieve
image data from any of the supported scanners without
having to be
concerned with details of its particular command set.
The list of supported scanners varies from time to time; at
includes HP Scanner Control Language (SCL) SCSI processor
Scanjet IIp, IIc, IIcx, 4p and 5p (others will probably work
if the SCSI
INQUIRY strings are added to the driver). Not recently
tested but worked
in the past true SCSI scanners: Mustek 600CX and 1200CX
(these do not do
SCSI disconnect-reconnect; they will lock up the bus during
second controller can be used.)
Obviously a SCSI host adapter must be present in the config
this device can be configured.
If a count is given, that many ss devices will be configured
This device provides the SCIOCGET and SCIOCSET ioctls, which
get and set a series of parameters describing the scan to be
upon subsequent reading of the scanner. The third argument
is the address
of a scan_io structure; details of this structure can
be found in
the header file <scanio.h>.
The SCIOCRESTART ioctl ignores the third parameter, and
scan. The SCIOC_USE_ADF ioctl also ignores its third parameter, and
tells the scanner to use its automatic document feeder if it
The normal use of this device in a scanner program would be
struct scan_io sp;
fd = open the driver (/dev/ss0 for the first scanner)
ioctl(fd, SCIOCGET, &sp) to get the scanner parameters.
... modify any parameters ...
ioctl(fd, SCIOCSET, &sp) to set the changed parms;
ioctl(fd, SCIOCGET, &sp) to see if things got rounded or
read(fd, somebuf, sp.scan_window_size);
write the data someplace where you want it.
intro(4), scsi(4), usscanner(4)
Documentation from the various scanner vendors.
Image data should either be normalized to a particular format or some indication
as to what the format is should be provided. Currently scanners
return data in a format similar to the data portion of a
Portable Any Map
(PNM) as produced by the pbmplus and netpbm software packages.
Even when vendors produce compliant SCSI scanners there is
in what parameters actually work in a SCSI_SET_WINDOW command. Back in
March 1997 an attempt to deal with this via quirk tables was
There exists some code for Ultima AT3 and A6000C Plus, Ricoh
IBM 2456-001, UMAX UC630 and Fujitsu M3096Gm that use this
none of these scanners work yet.
OpenBSD 3.6 September 28, 1998
[ Back ]