david at fubar.dk
Thu Dec 21 09:40:13 PST 2006
On Tue, 2006-12-19 at 15:24 +0000, Martin Owens wrote:
> > > On Tue, Dec 19, 2006 at 02:45:42PM +0000, Martin Owens wrote:
> > > > unfortunately there is no way to tell two scanners apart that have the
> > > > same manufacturer and model id but require different firmware. this
> > > > then requires user input to select the correct model,
> > To clarify: Of course I'm aware that the two scanners probably do not
> > look the same so the user knows which of his scanners are which :-), but
> > if they're both plugged in, how does he know which scanner corresponds
> > to which USB device on his system?
> They would need to plug one in first and configure it, then the other
> and configure that. no way around it.
In this case, the program wishing to configure the device cannot rely on
the HAL UDI in this. Instead it should remember the device by both a)
UDI; and b) it's connection path e.g. what port it is plugged into.
As such, the program needs to be somewhat smart about this; e.g. when it
sees two similar devices it needs to do something to separate the two
Perhaps we should have a property in HAL called info.id_by_path that is
stable insorfar that any device (no matter what brand / function etc.)
gets this ID if, and only if, it's plugged into the _same_ port / slot /
I think the easiest thing is to say that we don't care about this
though. Most people don't plug in two completely identical devices and
most (though some don't) have some sort of serial number that we express
in the HAL UDI.
More information about the hal