[sane-devel] Umax Astra 2200 under OpenBSD - working

alancorey at yahoo.com alancorey at yahoo.com
Mon Aug 22 16:22:42 UTC 2005

I persisted, on a rainy day, and got my Astra 2200
working with sane-backends-1.0.16 and libusb-0.1.10a.

It works pretty well, and I spend several hours using
xsane over the weekend.  I appreciate the change from
the usual insulting vendor-supplied Windows user
interface.  The live histogram of the preview window
is something I haven't seen before either and works
well, allowing a user to adjust things before the
scan.  The "rotate preview and scan" is also nice for
copying from books, and saves rotating in an image
editor.  At first
I was disapointed that it didn't do free rotation like
Photoshop's crop tool, but I can live with it.  XSane
has been a real pleasure to use.

There were three main things I had to do to get it

The first thing I found, on the libusb site in the
mailing list area, was a patch by Robert Heller for
FreeBSD.  This worked, essentially, but hunk 4
was rejected and I got errors compiling.  When I
manually edited the file involved and replaced
uppercase with ios::uppercase in a couple of places,
as his patch suggests, libusb compiled and mostly
works.  For some reason it can't fetch descriptor
strings from either my Umax Astra 2200 or my Nikon
Coolpix 990 camera using the descriptor_test program
in the tests directory.  Trying to use gphoto2 on the
same camera works on simple functions like identifying
but fails on
functions that would have more output like trying to
do an ls to list the files in the camera, or capture
an image.  I'm not confident my libusb is working 100%

I had to force sane-backends-1.0.16 to use libusb by
configure --enable-libusb 
because it still claimed to not be able to find usb.h
My usb.h is where it's supposed to be:
cpia# ls -la /usr/local/include/usb.h
-rw-r--r--  1 root  wheel  8321 Aug 20 11:34
OpenBSD also has a /usr/include/dev/usb/usb.h, I don't
know if that might be causing the problem by maybe
being found first.

At this point I could do sane-find-scanner and it
would find my scanner and give vendor and product
codes, but scanimage -L still wouldn't find anything. 
By setting SANE_DEBUG_DLL to 255 and running again, I
could see
all the backends had errors like:
[dll] load: couldn't find backend Avision' (No such
file or directory)
[dll] load: searching backend Apple' in
[dll] load: trying to load
When I looked I found that the versions were 1.16
instead of 1, so I copied the umax one to
libsane-umax.so.1 and it worked.  I think I've seen
some installs that symlink the current version to an
earlier standard one like .1 but nothing like that
happened here.

Lamp control under xscanimage doesn't seem to work,
although I've got it enabled in umax.conf and the
description from scanimage -L says the capability
exists.  The Umax Windows driver can do it, but only
if you keep the silly thing running in your tray.
A really useful feature in xsane would be an option to
turn off the scanner lamp when the program closes, if
the current device supports it.

I did notice what I'd consider a minor bug in the
xsane user interface:  when I tried to save a file as
TIFF and got an error, it then let me close the image
without warning that I hadn't saved it.  It seems like
the "dirty" or "unsaved" flag is getting cleared too
soon, and should only happen on a successful save.

And another that may be a typo: when looking at a
newly-scanned grayscale image, in the size statement
at the lower left corner, it tells me the image is 1
*bit* per color instead of 1 byte.  Scared me.  When I
do a color scan it still says 1 bit per color.

Another, also minor: even though I had the filename
counter set inactive, I found that when I tried to
save in an unsupported format like TIFF and I was
using a 
filename like page07.tif, the next time I tried to
save the filename would default to page08.ext so even
though was inactive it was still meddling with my
filenames.   Not only is it semi-active, but an
aborted save shouldn't have had any effect on the
numbering anyway.

Cancelling a scan didn't work very well.  After a few
seconds the scanner returned to its parked position,
but I had to kill xsane which froze.  Twice after that
when I'd try to start it up it would hang searching
devices.  Unplugging the scanner's USB cable and
plugging it back in, then restarting xsane got it
working.  All I wanted to do was switch from rgb to 

Enabling TIFF and JPEG in sane-backends doesn't seem
to work.  I did
./configure --enable-tiff --enable-jpeg
but looking at the config.log it seems like it
couldn't find the libraries.  They are there, and show
up if I do ldcofig -r.  I'm not sure what versions
it's looking for.  XSane's default pnm format doesn't
seem to be very universally supported, and totally
uncompressed.  Gimp knows it, but qiv, Mozilla,
Photoshop don't.  IrfanView does, so I suppose I can
batch convert scans in that.

My "new" HP Scanjet 3300c should show up today, and I
have a hunch it should work fine right from the start.

Nice set of programs.  Sorry for grumbling.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the sane-devel mailing list