(Originally written around December 2007)
This article on linux.com sparked my interest in running a scanner server. I’d like to run SANE (Scanner Access Now Easy) on my NLSU2 to allow all PCs on my home network access to the scanner functions of my Canon PIXMA MP210. There is a ‘How To’ for setting up a SANE scanner server using the OpenSlug firmware here. Before ditching the Unslung firmware and re-flashing my slug I thought I’d check whether or not SANE talks to the Canon PIXMA MP210 (if not, it’ll be a waste of time setting up OpenSlug, especially when there seems to be no easy way to set up the CUPS print server on OpenSlug).
SANE and the Canon PIXMA MP210
I temporarily connected the MP210 via USB to my laptop running linux (OpenSUSE) and tried running SANE. SANE is already installed as part of OpenSUSE and can be accessed via the YaST config tool but first I tried following the command line steps for scanner discovery in the OpenSlug guide.
First I ran sane-find-scanner which, in amongst some helpful comments, returned:
found USB scanner (vendor=0x04a9, product=0x1721) at libusb:004:002
OK, that looked good so, as suggested, I moved on to scanimage -L and this is where we hit our snag and I’m told “No scanners were identified…”.
Trying to set up the MP210 (as a local USB scanner) in YaST seems to yield pretty much the same results. The scanner is detected as a Canon MP210 series USB scanner (with the same details as returned by sane-find-scanner) and is shown as “Not Configured”. Selecting the scanner and choosing Edit gives the option of choosing a relevant scanner driver from the Canon drivers included within SANE (the list matches SANE’s list of compatible Canon scanners). I selected the PIXMA MP150 driver (the CUPS MP150 printer driver works with the MP210 so I’m assuming the MP210 is in fact an updated MP150). On coming out of this process the pixma driver is now listed but not associated with the MP210 scanner. So I’ve got a scanner without a driver and a driver without a scanner…
My guess is that the scanner and driver aren’t hooked up because the device IDs don’t match (MP210 is 0x1721, MP150 is 0x1709) so the options appear to be:
- Sit back and wait for MP210 support to be added to SANE
- Start looking at how to tweak the SANE files to match up the driver to the scanner
So, not successful yet but the idea of a networked scanner is pretty tempting so this is quite high on the ‘to do’ list…
After reading more on the subject of drivers for SANE, the first step to determining whether an existing driver can be used is to run the scanner from Windows and sniff the USB activity to the scanner (using SniffUSB). I’ve done this using Paint Shop Pro to run that scanner as a TWAIN device and acquire a preview, then a scan of a small object (a pound coin, shown below).
The zipped up USB log file is here.
Good news! After posting on the [sane-devel] mailing list, the kind developer of the MP610 updates to the sane pixma driver had a look at the USB log and it matches the MP610. He’s made the modifications to have the MP210 (and MP520) use the MP610 driver and it appears to work a treat, a quick scan (made from my laptop running fedora and xsane) is below:
I downloaded the modified driver and followed the compile and install instructions from the MP610 blog. To set permissions on my fedora laptop I added the MP210 to my user group (I’ll worry about proper grouping when I try sane on the NSLU2) by adding the following lines of code into the /etc/udev/rules.d/60-libsane.rulesfile
# Canon PIXMA MP210
SYSFS{idVendor}==”04a9″, SYSFS{idProduct}==”1721″, MODE=”664″, GROUP=”andy”
Superb! OK, so now we know sane can run the MP210 it’s time to start looking at running sane on the NSLU2 and running a scan server…