> 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.
> * What's the meaning of the other files under /proc/bus/usb/? I'm
> talking of e.g. 001/001.
These are the USB equivalent of sg devices. You are supposed to use
them with the aid of libusb.
> * 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.
HTH
Oliver Neukum
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Sat Jan 06 2001 - 08:19:14 PST