[sane-devel] Problems with SANE 1.0.13 and HP ScanJet 5300C

Henning Meier-Geinitz henning@meier-geinitz.de
Mon, 12 Jul 2004 19:54:26 +0200


Hi,

On Tue, Jul 06, 2004 at 08:49:15PM +0200, Thomas Rösch wrote:
> I searched with Google and found many hints how to get a HP ScanJet 5300C to 
> work with SANE, but I was either too stupid to apply the hints or they did 
> not work at all.

Having a look at the man page may also help :-)

> SANE-FIND-SCANNER as root:
> found SCSI scanner "HP ScanJet 5300C 6.00" at /dev/sg0

Ok.

> found USB scanner (vendor=0x03f0, product=0x0701) at libusb:003:002

Also ok.

> SCANIMAGE -L as root:
> device `avision:/dev/sg0' is a Hewlett-Packard ScanJet 5300C flatbed scanner

Looks fine.

> SANE-FIND-SCANNER as user:
>   # No SCSI scanners found. If you expected something different, make sure 

chmod a+rw /dev/sg0

Or, if you use devfs, read man sane-scsi.

> found USB scanner (vendor=0x03f0, product=0x0701) at libusb:003:002

Still found as USB device.

> SCANIMAGE -L as user:
> No scanners were identified. If you were expecting something different,

Probably the above mentioned permission problem.

> Obviously, SCANIMAGE does only detect a SCSI scanner, but I connected my 
> scanner with USB and I even do not have a SCSI port in my PC.

Your scanner is still a SCSI scanner. In fact, it's SCSI-over-USB.

> Also as a normal user SCANIMAGE does not find any scanner which seems
> to be an authorization problem.

Yes, see above.

Explanation: There is a Linux kernel driver ("hpusbscsi") that
emulates a SCSI device. So you can just use your scanner as if it were
a SCSI device. The driver sends the SCSI commands through the USB.

That's the reason why the scan applications think that your scanner is
a SCSI scanner.

Have you actually tried to scan with scanimage as root?

As your scanner is also a USB device, it's also listed in the USB
section of sane-find-scanner. As the scanner is calimed by the kernel
driver hpusbscsi, you can't use it as a normal SCSI deveice as long as
that kernel driver is loaded. That's the reason for the "device busy"
messages in the log file. IIRC the debug messages even mention that a
possible reason for this error is that a kernel driver is loaded.

At least with sane 1.0.14 you can either use the hpusbscsi driver or
direct USB access. If hpusbscsi doesn't work for you, rmmod that
driver and try without.

> But when I start e. g. XSANE (0.92) I receive the message "no devices 
> available" and the program closes again (it does not matter if I run it as 
> root or as normal user).

That's strange as usually SANE frontends behave the same way. Are you
really sure that you run xsane as root?

Bye,
  Henning