[Nut-upsdev] Changes to usbhid-ups driver

Peter Selinger selinger at mathstat.dal.ca
Tue Sep 4 17:50:18 UTC 2007


Arjen de Korte wrote:
> 
> >> It would probably only be a problem for devices that don't have their
> >> serial number in (usb_device *)descriptor.iSerialNumber, but rather in
> >> "UPS.PowerSummary.iSerialNumber" (like in the belkin-hid subdriver).
> > The Belkin device gives its serial number in both places. The one in
> > UPS.PowerSummary.iSerialNumber is strictly for the convenience of
> > being able to display the serial number with upsc. It's not necessary
> > for matching.
> 
> In that case, the better option would be in the HID-to-NUT translation
> table for Belkin, like
> 
> { "ups.serial", 0, 0, "UPS.PowerSummary.iSerialNumber", NULL, "%s",
> HU_FLAG_OK, stringid_conversion },

I just checked again, and it turns out that I misspoke. My Belkin
device shows the serial number only in UPS.PowerSummary.iSerialNumber,
and *not* in (usb_device *)descriptor.iSerialNumber, which is exactly
what you originally said. Sorry for that. -- Peter
 
> Come to think of it, this is probably valid for many other devices as
> well. Only in case there is no way to reach a variable through the report
> descriptor (or it requires lots of additional processing), it might be
> useful to do this via the vendor specific formatting routines. Or if we
> want to use them in the 'matching = delayed' that entered usbhid-ups
> recently.
> 
> Best regards, Arjen





More information about the Nut-upsdev mailing list