[sane-devel] sane, qemu and unsupported usb scanners.

Adam Sulmicki sulmicki at gmail.com
Wed Dec 5 22:06:57 UTC 2007


Below are instructions how to get an unsupported USB scanner to run under Linux.

Those instructions are for Microtek ScanMaker 4900 (USB2400), but I
don't see reason why they couldn't be used with any other USB scanner.

This is probably my last post to this list. I would appreciate if
those instructions could be added to the ScanMaker 4900 page.

It is more like guidelines what needs to be done rather than step by
step instructions. Adjust for your needs as appropriate. Those were
done on Fedora 8.

* yum install qemu
* install windows 98SE (or some other Windows, but 98SE should be
easiest and least resource intensive).
        * copy boot image to hdd
                cp /dev/fd0 98boot.img
        * prepare virtual disk for installation (2gb, probably 512mb
suffice for 98SE).
                dd of=98.img bs=1024 seek=2000000 count=0
        * boot qemu and follow instructions to install Windows.
qemu -m 256 -hda 98.img -cdrom /dev/cdrom -fda 98boot.img -boot a

* IMPORTANT*: Fix "Plug and Play Bios (fail safe)" error in
qemu/win98. Either google for it or just follow instructions below
(taken from some posts on web):
------------------------------------------
all these problems are indirectly because of the "Plug and Play BIOS
(fail safe)" system device. You can fix it as follows:

   1. Reload your Windows98 CD into the drive
   2. Start Q
   3. Start the Windows98 guest
   4. Select Start > Settings > Control Panel
   5. Double-click the System Control Panel
   6. Select the Device Manager tab
   7. Expand the System Devices item
   8. Highlight the "Plug and Play BIOS (fail safe)" system device and
hit the Properties button (see screen dumps below).
   9. On the General tab, hit the "Update Driver" button.
  10. On the Update Device Driver Wizard panel:
          * hit the Next button
          * select "Display a list of all drivers...", then hit the Next button
          * select the "Show all hardware" radio button
          * select "[Standard system devices]", then Model of "PCI
bus", then hit the Next button
          * on the Update Driver warning panel, hit the Yes button
          * "... PCI bus... Windows is now ready to install...". Hit
the Next button
  11. You will need to go through a series of driver installs and
re-boots for all the devices which were not correctly detected during
the Win98 install.

One glitch I encountered was that my Windows 98 Install CD image (on D
drive) wasn't mounted, after rebooting, so I chose to cancel anything
that asked for the CD. After shutting down and restarting the guest the
install CD did eventually re-mount as D drive, allowing me to finish
installation. Now I finally have Windows 98 networking working.

------------------------------------------

* do "lsusb" and find out VID:PID of the scanner, note it down, for me
it was 05da:30d9
* run qemu with usb support :

qemu -m 256 -hda 98.img -cdrom /dev/cdrom -usb -usbdevice host:05da:30d9

At this point the USB scanner should be detected and you can install
the Software.
For me it was Microtek ScanWizard 5.

At this point your setup is like this:

Linux Fedora 8 <-USB-> Qemu 0.9.0 <--> Windows 98 SE <-> Microtek ScanWizard 5

At this point you can either use the sanner for scanning AND/OR do
rapid development of the sane backend, since you have everything under
linux and you can rapidly switch between windows and linux.
Furthermore you can sniff USB packets under Linux.

---------------------------
other points of interest,
*mounting the 98.img in linux:
fdisk -l -u -C 592 98.img
echo "512*63" | bc -lq
mount 98.img iso -o loop,offset=32256 -t vfat
* exiting out of qemu focus : alt+ctrl

-- 
Adam Sulmicki
http://www.eax.com      The Supreme Headquarters of the 32 bit registers



More information about the sane-devel mailing list