[sane-devel] sanei_config_attach_matching_devices() for USB

Henning Meier-Geinitz henning at meier-geinitz.de
Tue Feb 5 18:59:25 GMT 2002


Hi,

On Sun, Feb 03, 2002 at 06:06:34PM +0000, Major A wrote:
> OK, it doesn't work by scanning /proc/whatever for USB scanners and
> mapping them to device files. This is because the scanner module will
> find a scanner, assign a major/minor number to it, but without devfs,
> it will have no idea what device files have these major/minor
> number. You can scan all know device files for the major/minor
> numbers, but that isn't really elegant.
> 
> Just to make things clear, I am not talking about checking whether or
> not a device is USB, I'm concerned about scanimage -L in the first
> place, that is finding all USB scanners connected to the computer.

The current implementation may not be nice but it works quite good in
my opinion. The limitation is that you need Linux 2.4.8 or newer.
What's ugly about this is that the scanner module produces a syslog
line for every device file opened which doesn't belong to a connected
scanner. 

Bye,
  Henning



More information about the sane-devel mailing list