How to install a scanner in Debian GNU-Linux using Sane
From NewbieDOC
- Chris Lale
- chrislale AT users DOT berlios DOT de (publisher)
Go to NewbieDOC index
Revision History
Revision 1.0 | 23rd April 2008 | Revised by Chris Lale | ||||||||||
Initial release. | ||||||||||||
| ||||||||||||
Live | Date(s): click on the history tab. | Revised by: click on the history tab. | ||||||||||
This is the live, editable version. | ||||||||||||
Abstract This article should help you to set up a scanner in Debian. It uses the Mustek ScanExpress 1248UB as an example. It has been tested using Etch and Lenny.
1 Check/choose your scanner modelCheck that you scanner is supported at the Sane Project website: http://www.sane-project.org/sane-backends.html. Use your browser's search function to locate your model. For instance, to search the page for the Mustek 1248UB using Firefox or Iceweasel: Ctrl + F 1248 gives this information Backend: gt68xx Manufacturer: Mustek Model: ScanExpress 1248 UB Interface: USB USD id: 0x055f/0x021f Status: Complete 2 Install the Debian packagessane - scanner graphical frontends sane-utils - API library for scanners -- utilities libsane - API library for scanners xsane - GTK+-based X11 frontend for SANE (Scanner Access Now Easy) You can find out more about the backend for your scanner by looking at its manual page after you have installed libsane. Eg for the Mustek 1248UB: $ man sane-gt68xx You will find more general help in the manual page for sane: $ man sane 3 Set up the software3.1 Install the scanner firmware filePut a copy of the firmware file from the scanner manufacturer's CD into /usr/share/sane/<backend>/. The name of the file for the Mustek 1248UB is SBSfw.usb. Put it in /usr/share/sane/gt68xx/ In the case of the Mustek 1248UB, you can also download a copy of the file from http://www.meier-geinitz.de/sane/gt68xx-backend/. 3.2 Check the configuration fileLook at the contents of the configuration file for your backend in /etc/sane.d/<backend>.conf. The file for the Mustek 1248UB is /etc/sane.d/gt68xx.conf The section for 1248 UB looks like this: # Autodetect Mustek ScanExpress 1248 UB usb 0x055f 0x021f Some scanners require you to uncomment certain lines. Details are in the manual page for your backend. 4 Test the scannerConnect your scanner to a USB port. Note: The scanner may not work correctly if you connect it via a USB hub. Connect it directly to a USB socket on the motherboard panel at the back of your computer. Check that sane can find the scanner: $ sane-find-scanner [...] found USB scanner (vendor=0x055f, product=0x021f [USB Scanner], chip=GT-6816) at libusb:005:004 [...] Check that the scanner has been correctly identified. (Do this as user root.) # scanimage -L device `gt68xx:libusb:005:004' is a Mustek ScanExpress 1248 UB flatbed scanner Carry out a simple test. (This works even without a scanner connected.) # scanimage -d test -T scanimage: scanning image of size 157x196 pixels at 8 bits/pixel scanimage: acquiring gray frame, 8 bits/sample scanimage: reading one scanline, 157 bytes... PASS scanimage: reading one byte... PASS scanimage: stepped read, 2 bytes... PASS [...] Carry out a test on your backend (with scanner connected): # scanimage -d gt68xx -T scanimage: scanning image of size 2563x3531 pixels at 8 bits/pixel scanimage: acquiring gray frame, 8 bits/sample scanimage: reading one scanline, 2563 bytes... PASS scanimage: reading one byte... PASS scanimage: stepped read, 2 bytes... PASS [...] You may hear the scanner working. Perform a scan. Put some artwork in the scanner and issue this command: scanimage --format pnm > outfile.pnm Open and check the file created in the current working directory. 5 Add users to the scanner groupSane commands, and the Xsane application, are only available to user root and users in the group 'scanner'. It is not recommended to run Xsane as root. If you add yourself to the scanner group, don't forget to logout and login again to activate the your membership of the group. Run xsane and enjoy scanning! 6 Appendix A: LicenceCopyright ©2008 Chris Lale, chrislale AT users DOT berlios DOT de.
|