A few years ago, I bought a Trust Direct Webscan 19200 flat-bed scanner. I used it quite regularly at that time with my desktop PC, called “Atlantis”, running Windows XP.
Trust Direct Webscan 19200
Last year I upgraded my PC hardware and software and currently I’m running Windows 7 on Atlantis. Some time ago, I needed to scan a document and I realized I did not install any drivers for the scanner since I have not needed to scan anything since my PC upgrade. When I tried to install the drivers from the Trust scanner driver CD, the setup came up with a message saying that the scanner is not compatible with any Windows OS newer than Windows XP.
I have tried to get the scanner operational again on Windows 7 using several work-arounds, without any luck, unfortunately.
Besides Atlantis I also have a home server, called “Discovery”, running Debian Linux. Trust does not have official drivers for Linux, though I have seen some successful setups using scanners on Linux on the web before, so I decided to give it a try.
After some searching on the web I found this page, which practically contains all the information needed to get a scanner up and running on Linux. Well.. on Debian based Linux distributions to be precise, like Debian itself and Ubuntu of course. Setting up a scanner on other Linux or Unix distributions might turn out to be a bit different.
First, I checked this page to see if my scanner was compatible. In my case it seemed to be well supported and there is a suitable USB driver available for it. If you click on the link in the “backend” column, you will get a page where you can download most of the USB drivers suitable for your scanner.
Step by step
To keep a long story short, I will describe step-by-step what I did to get my scanner working on Debian.
First I checked if my scanner was compatible by reviewing the list on this page: http://www.sane-project.org/sane-mfgs.html
The Trust Direct Webscan 19200 scanner has the support status “Good”, so I clicked on the link in the “backend” column to get to this page where I was able to download the correct USB driver. In my case, I needed the PS1Dfw.usb variant according to the list, but it turned out I needed the ps1fw.usb variant eventually. If there is no suitable variant for your scanner, you can probably snag it from the Windows installation CD-ROM alternatively.
Now I know that my scanner was compatible and the suitable USB drivers are available, I was able to proceed with the installation.
I installed SANE:
sudo apt-get install sane
Then I cd’t to the directory the USB driver needs to be installed:
I downloaded the USB driver to that directory:
sudo wget http://www.meier-geinitz.de/sane/gt68xx-backend/firmware/ps1fw.usb
Then I modified the /etc/sane.d/gt68xx.conf and added the following row below the settings for the scanner:
I connected my scanner and used the following command to check if SANE could recognize my scanner:
SANE recognized the scanner and said it was a Mustek BearPaw 1200 CU (instead of a Mustek BearPaw 1200 CU Plus according to the list on the webpage, therefore I realized I had the wrong USB driver the first time).
I used the following command to check if SANE was able to ‘see’ the scanner:
sudo scanimage -L
It turned out to be all OK, so I tried to make a first scan:
sudo scanimage -v -p --format=tiff > /var/www/tmp/out.tiff
By default it will create a black-and-white image (Gray option) of the scanned image. Eventually, after some trying and testing, I created a little script which is optimized to my needs:
scanimage --mode Color --depth 8 --resolution 300 -v -p --format=tiff > /var/www/tmp/out.tiff
The scanned image will have color and a resolution of 300dpi, which is sharp enough in my opinion. The /var/www/tmp/out.tiff is the location where the output image will be placed. I used the /var/www/ directory so I was able to download the raw TIFF files directly with my web browser on Atlantis.
You can tweak the settings if you like. Raising the depth and/or resolution will result in much larger output files. For example, I have tried a depth of 12 (48 bits per pixel) with a resolution of 600dpi. The output TIFF file was over 200 Megabytes!
For now, this script needs to run by the root user, unfortunately. I am trying to get it to work with non-root users, then I will be able to call the script via a web page, like a PHP script or something. My goal is to create a web-interface which makes me able scan a document by a single click on a web page. That same page should push the scanned image to my browser when it is done scanning (like downloading a file from a website). When I have figured that out, I will update this post to show you what I have done. 🙂
I have updated the scan script:
# Should be run as 'root' or via 'sudo'
echo "Current file location set to $DIRECTORY$ORIGINAL_FILENAME"
# Resolutions from 300 DPI to 2400 DPI are most common. Usually, 300 DPI is good
# enough in most cases and resolutions beyond 2400 DPI are used for small original
scanimage --mode Color --depth 8 --resolution 300 -v -p --format=tiff > $DIRECTORY$ORIGINAL_FILENAME
convert $DIRECTORY$ORIGINAL_FILENAME $DIRECTORY$CONVERTED_FILENAME
The scanned image will now have a file name based on the current date and time. Also, the scanned TIFF image will be converted to JPG format right after the scanning has been done (using the convert command from imagemagick package) and the original TIFF file will be removed afterwards. This will save disk space (since the TIFF files can become quite large depending on the scan resolution) and you will have the scanned image in a more common file format right away. 🙂