davor emard
2008-Mar-18 13:39 UTC
[Nut-upsuser] distinguishing identical multiple usbhid-ups devices
HI I would like to connect several Cyberpower Value 800E devices over a USB hub to a single host. Problem is how to distinguish them in order to correctly identify because lsusb -vvvv -d and upsc show the same device name and serial number is 0 Bus 002 Device 012: ID 0764:0501 Cyber Power System, Inc. idVendor 0x0764 Cyber Power System, Inc. idProduct 0x0501 bcdDevice 0.01 iManufacturer 3 CPS iProduct 1 UPS VALUE iSerial 0 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. However different serial number would be great. Can I somehow reflash the device to change its serial number? Best regards, Davor
Arjen de Korte
2008-Mar-18 13:55 UTC
[Nut-upsuser] distinguishing identical multiple usbhid-ups devices
> 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.This isn't possible/portable. Only the kernel is aware which physical port the devices are attached to, but this information is lost when they are handed off to the libusb layer. At that time, the only thing we have is an enumerated value, which may (will) change each time you reconnect them. In practice, this is so unstable that it can't be used. The only thing that could possibly tell these devices apart (if they don't have unique serial numbers), is the Bus. So unless you have multiple USB busses on your system, you're limited to just one UPS of this type. We can't fix this in NUT. Best regards, Arjen -- Eindhoven - The Netherlands Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
Charles Lepple
2008-Mar-18 16:01 UTC
[Nut-upsuser] distinguishing identical multiple usbhid-ups devices
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
davor emard
2008-Mar-18 17:29 UTC
[Nut-upsuser] distinguishing identical multiple usbhid-ups devices
iSerial=0 not only cyberpower unit but also many other manufacturers have constant serial number in usb interfaces I can ask cyberpower if they can help me set this serial number but the chances are small I guess On 3/18/08, Charles Lepple <clepple at gmail.com> wrote:> On Tue, Mar 18, 2008 at 12:58 PM, Ricardo Bugalho <ricardo at lip.pt> wrote: > > Hello, > > the usbhid driver can distinguish different devices by their serial > > number. > > > > Just look for "iSerial" in lsusb -v and add an matching "serial" in > > ups.conf. > > Davor already posted the output of lsusb - iSerial is 0. > > -- > - Charles Lepple > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser >