AGFA Snapscan 1212U patch for SANE Snapscan backend



This is an attempt to incorporate Agfa's USB-scanners into the growing list of supported devices under SANE.

During the Christmas holidays i bought myself a Snapscan 1212U. As a dedicated Linux user I couldn't accept that my new scanner wasn't supported in my favorite OS. So I emailed Agfa's technical support and asked them if they had any plans to write Linux drivers for it and offered them to write the drivers myself if they could provide me with a specification of the protocol. As expected, they didn't even bother to answer.

To make it happen I had to dig up the required information the hard way, by doing some reverse engineering on the Windows software that came with the scanner (ScanWise). To my great joy the protocol appeared to be almost identical to that used by Agfa's SCSI scanners. And for those there already exists a SANE backend. The easiest way to proceed was to replace the SCSI calls in the Snapscan backend with USB equivalents that used David Nelson's generic USB scanner device driver.

As expected it didn't work the first time, and the reason was that I had missed some data that was sent by the Windows driver to the scanner the very first time the scanner was used. This data turned out to be the firmware. With this new knowledge in mind I restarted the computer in Linux without turning the power off. And believe it or not, the xscanimage program did actually start and I could even make a preview scan.

Reverse engineering results

USB traffic logs


These are my own conclusions and wild guesses based on studies of USB traffic logs from scanning sessions in Windows.




Unpack SANE 1.0.1 archive tar zxf sane-1.0.1.tar.gz Apply Snapscan 1212U patch patch -p0 < sane101.diff Compile it cd sane-1.0.1; ./configure; make; make install If your scanner device isn't /dev/usbscanner then do the appropriate changes to snapscan.conf located in /usr/local/etc/sane.d

USB Scanner module options

  • If the scanner module can't find your Snapscan then append the following line to /etc/conf.module options scanner vendor=0x06bd product=0x2061 This shouldn't be necessary but the scanner driver couldn't detect my scanner without it.
  • How to use it


    Version 2 of Snapscan 1212U supports (and requires) firmware uploads in order to work. The firmware file comes with Agfas ScanWise scanning software for Windows. If you have the second version of Snapscan 1212U model this file is named "SnapScan 1212U_2.bin" and can be found in the same directory as ScanWise. If you can't find a file by that name, your scanner is probably a version 1 model and you can safely proceed to the next step. To upload the firmware to the scanner, use the agfafirm util found in the download section: agfafirm /dev/usbscanner "SnapScan 1212U_2.bin" Now the scanner is supposed to be restarted. If you are not sure you can check that the status LED on the scanner starts flashing.


    If everything is installed properly you should now be able to run any SANE based program like xscanimage or xsane.

    Known bugs and limitations



    Firmware uploader

    Thanks to


    Henrik Johansson
    Last modified: Thu Feb 17 01:25:05 CET 2000