[sane-devel] Scanner (USB) not found after kernel upgrade

Henning Meier-Geinitz henning at meier-geinitz.de
Sun Feb 12 12:32:20 UTC 2006


Hi,

On 2006-02-08 11:39, Johannes Meixner wrote:
> sanei/sanei_usb.c has more than 1900 lines of code only
> to do USB device access.
> I wonder why on the user-level there is so much detailed
> stuff to be done to communicate with a USB device.

To be fair, this file has support for three different ways to
communicate with USB devices.

> >From my innocent point of view the USB access looks somehow
> broken by design. Shouldn't the kernel provide a simple API
> with only "open" "read" "write" and "close" functions?
> I remember that in Linux/Unix everything is a file
> but I assume I am totally outdated ;-)

This was the way the kernel scanner driver was written. Well, it also
had a "write" call :-)
This just does nor work with SUB devices as they are much more
complex. Actually the kernel provides file-based access by
/proc/bus/usb/something using read/write and ioctl. libusb is just a
wrapper around these calls.

Bye,
  Henning



More information about the sane-devel mailing list