[Nut-upsuser] distinguishing identical multiple usbhid-ups devices
Charles Lepple
clepple at gmail.com
Tue Mar 18 17:20:42 UTC 2008
On Tue, Mar 18, 2008 at 12:47 PM, davor emard <davoremard at gmail.com> wrote:
> Can we have a libusb proxy that would reliably
> distinguish the device by help of kernel, rewrite
> their bus number (or serial number whatever is
> easier) and present modified tree to the nut?
> so nut would connect to the libusb proxy and "see"
> different devices?
I don't think it's possible to distinguish it in software. I am sure
we would accept any patches that would not interfere with normal
operation, but since the kernel does not guarantee the order in which
things are scanned, there is very little that can be done.
> Can nut drive this cyberpower device from
> kernel usbhid* device instead of libusb, so
> udev could be used to enumerate
> devices in hubbed ports and make constant
> /dev/usbhid*
No, the kernel usbhid driver does not provide the functionality that
we need (the usbraw driver might, but that has just made its way into
the mainstream kernels, and it probably suffers the same problems).
udev needs a unique identifier to assign constant device nodes,
regardless of the driver.
> On 3/18/08, Charles Lepple <clepple at gmail.com> wrote:
> > On Tue, Mar 18, 2008 at 9:39 AM, davor emard <davoremard at gmail.com> wrote:
> > > usbhid-ups is capable to distinguish devices from the Bus
> > > they are connected to, but as all are at the same hub the bus
> > > is the same. I'd like if usbhid-ups could distinguish them from
> > > the hubbed port they are plugged in.
> >
> > I forget how the bus numbering goes, but what if you added in another
> > hub between certain devices?
> >
> > You still are not guaranteed that they will be enumerated in the same
> > order every time, but at least the device closest to the motherboard
> > stands a chance of being enumerated first.
> >
> > --
> > - Charles Lepple
> >
>
--
- Charles Lepple
More information about the Nut-upsuser
mailing list