System Setup: Scanner

  SlashDot  Python Home

 

Configuration
Hardware
Linux
Disks
X Windows
Printer
Modem
Sound
Network
Scanner
CD-RW
Windows
Other

Table of Contents

Scanner

Installation

After learning SCSI cards and cables are expensive, I tried for USB. Did the work on fred, because it has more disk space and faster processor for image manipulation.

SUSE6.4 said it was backpatched for usb. I installed sane. Following the instructions in /usr/src/linux-2.2.14.SuSE/Documentation/usb/, esp. scanner.txt and scanner-hp-sane.txt:

  1. Run lspci -v, which indicates we have a uhci-style usb.

  2. Make the device:
      cd /dev
      rm usbscanner   # it was setup wrong
      mknod /dev/usbscanner c 180 48 
      chmod a+rw /dev/usbscanner
    

  3. Edit modules.conf. Uncomment the 180 line, and add the usb-uchi alias, post-install, and options lines. Not sure if the vendor/product data is needed, but those are the values for a HP 6300C.
    #=====================================
    # USB
    alias char-major-166	  acm
    alias char-major-180	  usbcore
    alias char-major-240	  usb-serial
    alias usb-uhci uhci
    post-install usb-uhci modprobe scanner 
    options scanner vendor=0x03f0 product=0x0601
    #=====================================
    

  4. Add it:
      modprobe usb-uhci
      modprobe scanner
      lsmod    #shows uchi and scanner installed
    

  5. Establish it for startup:
      (edit /etc/rc.config:)
      START_USB="yes"
      (edit /etc/rc.config.d/usb.rc.config:)
      USB_HCI="usb-uhci"
      USB_DRIVERS="scanner"
    

  6. Setup sane:
      cd /etc/sane.d
      (edit dll.conf, commenting out all but hp)
      (edit hp.conf to show:)
      /dev/usbscanner
      option connect-device
    

xscanimage

Run xscanimage. Main window gives control options. Set filename to dir which has lots of space, e.g. /usr/local/proj/xyz.pnm.

Select Preview window...Acquire preview. Drag mouse over desired section to get dashed-line crop region. Acquire region again, resetting main window controls as needed. In general, use 300 dpi (600 dpi makes big files).

After getting a good preview, select Scan on the main window. Then convert to png or other format:

  cd /usr/local/proj
  convert xyz.pnm xyz.png

Conversion is a major undertaking, using swap space and plenty of cpu.

Photocopy

Set to:

  • scan mode: lineart
  • dpi: 300
  • brightness: -60
  • contrast: 10
  • authreshold: on

Do the preview to be sure the text shows. Then select scan. Then print:

  cd /usr/local/proj/
  convert xyz.pnm xyz.png
  lpr xyz.png

 
Creator: Harry George
Updated/Created: 2001-01-07