[Nut-upsdev] Re: about [ #302111 ] newhidups support for Belkin

Peter Selinger selinger at mathstat.dal.ca
Wed Sep 14 16:30:20 UTC 2005


Arnaud Quette wrote:
> 
> > * I documented the new variables and instant commands in
> > new-names.txt. Some of them already existed in other drivers, but
> > had not yet been documented.
> 
> 
> please discuss (seen Charles ;-) before adding any entry to the naming.
> if you find some undocumented vars in drivers, announce these on the -dev  
> ml.
> 
> - ups.devicechemistry => that would more fit to "battery.type" (opaque 
> string?!)

Done.

> Also, don't forget to bump newhidups drv release, as we can attach a release 
> to the added mfr support...

Done. 
 
> * One exception is the variable ups.serial.internal, which should not
> > really exist. The information contained in that variable should
> > normally be in ups.serial. The problem is that the Belkin UPS does
> > not announce its serial number in the device descriptor (like a good
> > HID device should), but in a report. So this info is not available
> > at initialization time. So either one needs a specialized function
> > for retrieving the Belkin serial number at initialization time, or
> > one needs to set the variable ups.serial "after the fact". I could
> > not figure out how to do that, so I left the variable
> > ups.serial.internal, and a "FIXME" comment, for the time being.
> 
> 
> you can stick at ups.serial. If it already exists, it will be updated by 
> dstat_setinfo(). Otherwise, it will be created. 

No, this does not work. I don't know why, but the variable ups.serial
cannot be updated from the HID2NUT lookup table. It just keeps the
value "unknown" that was set during the initialization. That's why I
introduced the new variable ups.serial.internal. I was hoping that you
might know why ups.serial can't be updated (perhaps it is marked
"constant" somewhere?)
  
> btw, you can remove "John Stamp" reference as he only added things in 
> apc-hid.h...

Done. 

-- Peter



More information about the Nut-upsdev mailing list