Re: General USB questions and comments

From: Henning Meier-Geinitz (
Date: Sun Jan 07 2001 - 03:36:56 PST

  • Next message: Oliver Rauch: "Re: sane,saned und XSane/Windows"


    On Sat, Jan 06, 2001 at 05:27:34PM +0100, Oliver Neukum wrote:
    > > Some questions (mostly based on Linux and the USB driver "scanner"):
    > >
    > > * Is there any way to get the vendor and device ids for a given device
    > > file name? One problem for SANE-USB backends is that they can't easily
    > No that I know of. Could you live with an IOCTL for that ?
    > I wouldn't be hard to add to the kernel.

    I think this would be fine. With this addition we could implement
    something like
    usb 1000 0001
    for the backend.conf files to check the standard device files for this

    > > * For find-scanner the idea was to scan /proc/bus/usb/devices. Look for
    > > new devices (starting with "T:" lines) and save all devices
    > > containing an "I: ... Driver=usbscanner" line. Get vendor and
    > > product ids from the "P:" line. Question: How to get the device file
    > > from this information? Can I just assume that the first usbscanner entry
    > You can't. Device numbers depend on the order plugging in and out.
    > > in this list is /dev/usbscanner0? Can the number of one device
    > > change if another one is conncted?
    > You cannot assume that the first device is usbscanner0. While a device is
    > plugged in, it's device node doesn't change. Note: You can't tell easily
    > whether it was replugged.

    I may be wrong but all this doesn't look like scanner.o had more then
    one scanner in mind. Looks pretty weird.


    Source code, list archive, and docs:
    To unsubscribe: echo unsubscribe sane-devel | mail

    This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 03:16:37 PST