Наши партнеры

Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

USB Scanner Support

USB scanners do not have a common class specification, hence it is not possible to make a device driver that works for all scanners. Not withstanding this, Linux USB does have a generic scanner driver that provides the communication link between the device and user space.

The USB Scanner driver is capable of supporting just about any scanner. However meaningful output depends on the availability of a suitable user space tool, such as SANE, see http://www.mostang.com/sane.

If your scanner is not automatically associated with the scanner driver, you have two options. The first option is to edit the source code for the scanner driver - I assume that if you can do this, you won't need any instructions. The second option is to use modules, and to load the module with the vendor and product IDs specified as module options: insmod scanner.o vendor=0xXXXX product=0xYYYY, where XXXX is the hexadecimal vendor ID code, and YYYY is the hexadecimal product ID code, which you can extract from the contents of /proc/bus/usb/devices when you have the scanner plugged in.

You need to create an appropriate device file entry, using commands (as root) like the following:
mknod /dev/usb/scanner0 c 180 48
chmod a+rw /dev/usb/scanner0

To use the scanner device, you will need a suitable tool. SANE is strongly recommended. If you don't already have it installed or your installation is old, you will need to retrieve the package from the closest of the sites referenced at http://www.mostang.com/sane/source.html.

For instructions on building and installing SANE, refer to the various README files within the SANE distribution, and more detailed instructions for specific scanners that are provided later in this document.