[CLUE-Tech] USB trouble

Matt Gushee mgushee at havenrock.com
Fri Jul 30 09:57:27 MDT 2004


<mini-rant>
Why the *%$Q@#&*() can't USB "just work," like SCSI does? Grrr.
</mini-rant>

Ok, I'm not a happy camper today. Here's why: yesterday I went out &
bought a new USB scanner. It's a CanoScan LiDE 30, which the SANE Web
site says is fully supported in the current stable release. I need to
scan & OCR about 500 pages of text ... there's no formal deadline, but
the sooner I get this done the better.

I have two Linux boxes I could potentially use this with, both running
Debian Woody. One is a desktop, the other a laptop. Though the laptop
looks closer to working, I really should be using the desktop if I
can--because it has the disk space for all the scans and a bigger
monitor, which will be good for the OCR work. I also suspect that it
might be a strain on the somewhat-fragile laptop to feed power to the
scanner for a big job like this.

Oh, I should mention that I've never done anything with USB before, and
both machines have customized kernels (and for reasons I won't go into
here, it would take a lot of work to go back to a stock kernel on either
of them), so I am trying to set up USB support for the first time, with
new kernels and new whatever-else-is-required.

Buuuut, it's not working. Specifically:

Box #1: desktop, 2.4.18 kernel
------------------------------
This machine is a bit old and doesn't have built-in USB ports. I bought
an Adaptec USB2Connect 2000 adapter for it, but my system isn't
recognizing the adapter. When I try to

 # modprobe usb-ohci

I get "no such device" errors. I'm not positive it uses OHCI--haven't
found any docs on that yet--but since the chipset is Compaq (?), I'm
guessing it does. In any case, I get the same errors with both uhci and
usb-uhci modules.

Now, as for why there is "no such device," here's what lspci says:

 $ lspci
 # output edited for brevity
 00:0b.0 Class ffff: Compaq: Unknown device 0035 (rev ff)

Uh-oh. But on the other hand:

 $ cat /proc/pci
  PCI devices found:
    [ .... ]
    Bus  0, device  11, function  0:
      USB Controller: PCI device 1032:0035 (Compaq) (rev 66).
        Master Capable.  Latency=255.  Min Gnt=255.Max Lat=255.

So I dunno what's up with that. Does the system recognize the card or
not?

BTW, the card package says I need at least a 266 Mhz CPU; I've got a
Pentium 200 ... but I routinely ignore such CPU "requirements" and in
every case I can remember, the worst that happens is that things run
slowly. Might it actually matter in this case?

Anyway, does anyone have troubleshooting tips for this? Is there a way
to "teach" the kernel about a new PCI device, or am I SOL?


Box #2: laptop, 2.4.22 kernel
-----------------------------
Okay, here, as I said, it's closer to working. UHCI is compiled into the
kernel, and when I plug the scanner into the USB port and/or

 # modprobe scanner

there is a message saying "USB scanner device now attached to scanner0."
And 

 $ sane-find-scanner
 found USB scanner at device /dev/usb/scanner0

But if I run xsane with no arguments, I get an error saying "no devices
available." If I try

 $ xsane scanner0

or

 $ xsane /dev/usb/scanner0 

(which one is correct?) the message says "Failed to open device <foo>.
Invalid argument."

I will note that I have SANE 1.0.7 installed, whereas the "completely
supported" info was for SANE 1.0.14. So I may try a later version. But I
would expect that if the scanner is fully supported now, it would have
been at least partly supported a few minor releases back.

Couple more notes on this:

 * Permissions on /dev/usb/scanner0 are 666, so that shouldn't be a
   problem.

 * /proc/bus/usb exists but contains no files. Should it? This Debian
   package of SANE depends on libusb, which (I have the impression) is
   supposed to be an alternative to the /proc/bus/usb mechanism, so
   maybe that's okay.

Thanks in advance for your sage advice.

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee at havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)



More information about the clue-tech mailing list