[sane-devel] Umax Astra 2200 under OpenBSD?

alancorey at yahoo.com alancorey at yahoo.com
Wed Aug 17 14:16:29 UTC 2005


I did a little more fiddling with it last night.  I
bring the laptop to work with me so I have it here,
but the scanner stays home.  There were a couple
details I forgot to mention in my last posting because
of the delay in posting.

> You may need to add the USB device to umax.conf
> manually.
I had done this, at least I thought I did.  I've now
commented out all the scsi stuff under "# linux device
identification:" and the rest of the file looks like
this:
-------
# Umax Astra 2200 via USB:
# usb vendor product
usb 0x1606 0x0230

# scsi device list
#option connection-type 1
#/dev/scanner

# usb device list
option connection-type 2
#/dev/uscanner0
/dev/ugen0
------

The define connection type section looks like this:
# define connection type of following devices
# 1 = scsi
# 2 = usb
option connection-type 2

I also rebuilt the kernel last night leaving out the
uscanner device.  dmesg now shows:
ugen0 at uhub0 port 1
ugen0: UMAX Data Systems Astra 2200U, rev 1.00/1.00,
addr 2

I also forgot to mention why I thought sane wasn't
finding libusb - because it says so.  In a
sane-find-scanner -v (or maybe -v -v) I see:
libusb not available

About all I can see as to why this would happen is
this in the configure output:
checking for usb_interrupt_read in -lusb... no
Later on there's this for another backend:
*** disabling SM3600 backend (libusb or usb.h not
found)
There's no mention of -lusb after the
usb_interrupt_read one.

> Is "/usr/local/include/usb.h" available?
yes:
cpia# ls -la /usr/local/include/usb.h
-r--r--r--  1 root  bin  6672 Aug 11 09:39
/usr/local/include/usb.h

I just did a make patch in the /usr/ports/devel/libusb
directory so I could look at the sources, and in the
/usr/ports/devel/libusb/w-libusb-0.1.7p2/libusb-0.1.7
directory created, running grep usb_interrupt_read *.c
finds nothing.  Is this a critical function?

I'm probably still forgetting something that happened
last night, but at least I saved the output from
configure and gmake as text files to look at.

If I do sane-find-scanner -f -v -v /dev/ugen0 I get:
--------
This is sane-find-scanner from sane-backends 1.0.16

  # sane-find-scanner will now attempt to detect your
scanner. If the
  # result is different from what you expected, first
make sure your
  # scanner is powered up and properly connected to
your computer.

searching for SCSI scanners:
checking /dev/ugen0 even though it looks like a USB
device... failed to open (Invalid argument)
  # No SCSI scanners found. If you expected something
different, make sure that
  # you have loaded a SCSI driver for your SCSI
adapter.

searching for USB scanners:
checking /dev/ugen0... failed to open (Invalid
argument)
libusb not available
  # No USB scanners found. If you expected something
different, make sure that
  # you have loaded a driver for your USB host
controller and have installed a
  # kernel scanner module.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or
other proprietary ports
  # can't be detected by this program.
done
-------

There isn't actually any /dev/ugen0, just these:

crw-rw----  1 root  wheel   63,   0 Jan 28  2005
ugen0.00
crw-rw----  1 root  wheel   63,   1 Jan 28  2005
ugen0.01
crw-rw----  1 root  wheel   63,   2 Jan 28  2005
ugen0.02
crw-rw----  1 root  wheel   63,   3 Jan 28  2005
ugen0.03
crw-rw----  1 root  wheel   63,   4 Jan 28  2005
ugen0.04
crw-rw----  1 root  wheel   63,   5 Jan 28  2005
ugen0.05
crw-rw----  1 root  wheel   63,   6 Jan 28  2005
ugen0.06
crw-rw----  1 root  wheel   63,   7 Jan 28  2005
ugen0.07
crw-rw----  1 root  wheel   63,   8 Jan 28  2005
ugen0.08
crw-rw----  1 root  wheel   63,   9 Jan 28  2005
ugen0.09
crw-rw----  1 root  wheel   63,  10 Jan 28  2005
ugen0.10
crw-rw----  1 root  wheel   63,  11 Jan 28  2005
ugen0.11
crw-rw----  1 root  wheel   63,  12 Jan 28  2005
ugen0.12
crw-rw----  1 root  wheel   63,  13 Jan 28  2005
ugen0.13
crw-rw----  1 root  wheel   63,  14 Jan 28  2005
ugen0.14
crw-rw----  1 root  wheel   63,  15 Jan 28  2005
ugen0.15
crw-rw----  1 root  wheel   63,  16 Jan 28  2005
ugen1.00
crw-rw----  1 root  wheel   63,  17 Jan 28  2005
ugen1.01
crw-rw----  1 root  wheel   63,  18 Jan 28  2005
ugen1.02
crw-rw----  1 root  wheel   63,  19 Jan 28  2005
ugen1.03
crw-rw----  1 root  wheel   63,  20 Jan 28  2005
ugen1.04
crw-rw----  1 root  wheel   63,  21 Jan 28  2005
ugen1.05
crw-rw----  1 root  wheel   63,  22 Jan 28  2005
ugen1.06
crw-rw----  1 root  wheel   63,  23 Jan 28  2005
ugen1.07
crw-rw----  1 root  wheel   63,  24 Jan 28  2005
ugen1.08
crw-rw----  1 root  wheel   63,  25 Jan 28  2005
ugen1.09
crw-rw----  1 root  wheel   63,  26 Jan 28  2005
ugen1.10
crw-rw----  1 root  wheel   63,  27 Jan 28  2005
ugen1.11
crw-rw----  1 root  wheel   63,  28 Jan 28  2005
ugen1.12
crw-rw----  1 root  wheel   63,  29 Jan 28  2005
ugen1.13
crw-rw----  1 root  wheel   63,  30 Jan 28  2005
ugen1.14
crw-rw----  1 root  wheel   63,  31 Jan 28  2005
ugen1.15

What user is this running as?  (I'm logged in as root
here).  Is it not finding it because it's not world
readable?  Or do I need to MAKEDEV an actual
/dev/ugen0?

I was trying to turn on debugging, so I did
setenv CFLAGS "-g -O -Wall" 
./configure --disable-shared [and gmake and gmake
install]
But I don't see any difference in the
sane-find-scanner output, even after also doing a
setenv SANE_DEBUG_UMAX 2 (or 4).

  Alan


--- Henning Meier-Geinitz <henning at meier-geinitz.de>
wrote:

> Hi,
> 
> On Tue, Aug 16, 2005 at 11:15:13AM -0700,
> alancorey at yahoo.com wrote:
> > I'm trying to get a Umax Astra 2200 (using USB)
> > working under OpenBSD 3.6 using
> sane-backends-1.0.16. 
> > I'm not sure whether this backend tries to use
> libusb
> > or not.
> 
> All USB backends use libusb, if available, through
> sanei_usb. Most
> backends (but not all) can also use the kernel
> scanner driver.
> 
> > sane-find-scanner finds a USB scanner but can't
> > identify it.
> 
> This means that you don't use libusb or libusb can't
> access the scanner.
> 
> > I have uscanner enabled in the kernel
> > and the scanner gets found as /dev/uscanner0 as it
> > seems it should.  If I disable uscanner in the
> kernel
> > it doesn't get found at all. 
> > /usr/src/sys/dev/usb/uscanner.c lists this among
> its
> > devices but that may only be for the sake of
> > identifying USB vendors and devices.
> 
> The uscanner driver can only be used if only bulk-in
> and out transfers
> are used. Control messages or identifying devices is
> not supported by
> the BSD uscanner driver.
> 
> You may need to add the USB device to umax.conf
> manually.
> 
> > The status of libusb is unknown.  I installed
> > libusb-0.1.7p2 from the OpenBSD ports collection,
> but
> > Sane seems to not be finding or using it.  Doing a
> > locate libusb shows these files installed:
> > /usr/local/bin/libusb-config
> > /usr/local/lib/libusb.a
> > /usr/local/lib/libusb.la
> > /usr/local/lib/libusb.so.7.0
> > At first I didn't have libusb installed, but after
> > installing it I did a gmake uninstall, then gmake
> > distclean, then configured and installed Sane over
> > again.
> 
> Is "/usr/local/include/usb.h" available?
> 
> The SANE configure script prints the libraries it
> has find near the
> end of its output, "-lusb" should be there.
> > 
> > According to sane-backends-1.0.16/README.openbsd I
> may
> > have to add the vendor and device IDs to
> > sys/devs/usb/uscanner.c and rebuild the kernel. 
> I've
> > made a couple of tries at that but I'm not quite
> sure
> > where to put them.  C isn't my favorite language,
> and
> > I'm rusty at pointers to structs.  It compiles and
> > everything, but didn't seem to have any effect.  I
> > added these: 0x1606 0x0230 for vendor and device,
> or
> > tried to.
> 
> I recommend to not use the kernel scanner driver at
> all. You scanner
> should be detected as /dev/ugen0 or similar when
> uscanner is not
> enabled. That device can be used by libusb.
> 
> > I'm not sure whether I should be trying to
> > troubleshoot uscanner or libusb because I don't
> know
> > whether libusb is used or not.  It would be useful
> to
> > have the backend description tell whether it uses
> > libusb or not, but maybe it depends on the
> platform.
> 
> Bye,
>   Henning
> 
> -- 
> sane-devel mailing list:
> sane-devel at lists.alioth.debian.org
>
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe
> your_password"
>              to
> sane-devel-request at lists.alioth.debian.org
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the sane-devel mailing list