[Nut-upsuser] Two identical UPS's on USB - how to diferentiate?

Charles Lepple clepple at gmail.com
Mon Jun 6 11:26:58 UTC 2011


On Jun 3, 2011, at 8:21 AM, Danilo Godec wrote:

> Hi,
>
> I have two identical UPS's on USB bus. The original machine I was  
> going
> to use for UPS monitoring only had had USB bus, so these two UPS's  
> were
> seen like that:
>
> Bus 001 Device 009: ID 14f0:00c9
> Bus 001 Device 007: ID 14f0:00c9

I don't know much about the blazer_usb driver (which seems to be the  
appropriate one for this hardware), but in general, I am pretty sure  
that using libusb to access USB devices does not let us distinguish  
between a device which has already been claimed by another NUT driver,  
versus a device which is claimed by a kernel driver (usually the USB  
HID driver). Even so, we don't know whether it has been claimed until  
we try to open it and get an error.

The short version is that we need something unique to distinguish the  
two devices when opening them, even if it doesn't matter later on  
which one is claimed by which driver.

> There was no description on the right side either. If I used the
> 'verbose' flag, both UPS's had the exact same output...

If you run 'lsusb' without any options, that description comes from  
the usb.ids file. Your distribution might have a script to pull down  
an updated version, but since the lookup keys are the Vendor ID (14f0)  
and Product ID (00c9), that description won't distinguish between the  
two devices either.

This situation is a good argument for including a USB serial number on  
new devices (which would show up in the lsusb verbose output).



More information about the Nut-upsuser mailing list