SS(4) BSD Programmer's Manual SS(4)
ss - SCSI Scanner device
ss* at scsibus? target ? lun ?
The ss device allows an application to set scanner parameters and re- trieve 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 present it includes HP Scanner Control Language (SCL) SCSI processor type scanners: 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 operation. A second controller can be used.)
Obviously a SCSI host adapter must be present in the config file before this device can be configured. If a count is given, that many ss devices will be configured into the kernel.
This device provides the SCIOCGET and SCIOCSET ioctls, which respectively get and set a series of parameters describing the scan to be performed 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 restarts the scan. The SCIOC_USE_ADF ioctl also ignores its third parameter, and tells the scanner to use its automatic document feeder if it has one.
The normal use of this device in a scanner program would be something like this: #include <sys/types.h> #include <sys/ioctl.h> #include <sys/scanio.h> 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 truncated 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 in- dication 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 much variation 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 started. There exists some code for Ultima AT3 and A6000C Plus, Ricoh IS50, IS410, IBM 2456-001, UMAX UC630 and Fujitsu M3096Gm that use this approach, but none of these scanners work yet. MirOS BSD #10-current September 28, 1998 1
Generated on 2014-02-10 02:47:05 by $MirOS: src/scripts/roff2htm,v 1.79 2014/02/10 00:36:11 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2014 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.