I was testing out newhidups with an APC UPS, and I noticed that I needed '-x vendor=American.Power.*' instead of '-x vendor=APC.*' as indicated in the man page. Do other APC USB UPSes use 'APC' in the vendor string? Should we sidestep any such problems and just go with the hex vendor ID for APC examples? This was tested with a snapshot from the development branch, but the man page has '-x vendor=APC.*' in testing as well as 2.0.3-pre2. -- - Charles Lepple
Charles Lepple wrote:> > I was testing out newhidups with an APC UPS, and I noticed that I > needed '-x vendor=American.Power.*' instead of '-x vendor=APC.*' as > indicated in the man page. > > Do other APC USB UPSes use 'APC' in the vendor string? Should we > sidestep any such problems and just go with the hex vendor ID for APC > examples?I believe my wife's Back-UPS has 'APC' as the vendor. But I also believe that for the man page, I just gave a random example; the purpose was to illustrate what a regular expression is. Users should not normally have to use this option unless they have multiple UPSs, and in this case, they should use the actual vendor string of their actual device. Perhaps, for the man page, we should give a generic example such as -x vendor='FooCorporation.*' -- Peter> This was tested with a snapshot from the development branch, but the > man page has '-x vendor=APC.*' in testing as well as 2.0.3-pre2. > > -- > - Charles Lepple > > _______________________________________________ > Nut-upsdev mailing list > Nut-upsdev@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev >
Alfred Ganz
2005-Dec-23 15:52 UTC
[Nut-upsdev] Re: APC regexp match example in newhidups.8
Charles,
It looks like the vendor name story is even a bit more messy. On my
Linux system (2.6.12-1.1372_FC3) the Back-UPS ES 650 shows like this
with "lsusb":
Bus 002 Device 004: ID 051d:0002 American Power Conversion Back-UPS Pro
500/1000/1500
but like this in /proc/bus/usb/devices:
P: Vendor=051d ProdID=0002 Rev= 1.06
S: Manufacturer=APC
S: Product=Back-UPS ES 650 FW:818.w1.D USB FW:w1
and finally like this with "newhidups -u root -DD any":
Checking device (051D/0002) (002/004)
- VendorID: 051d
- ProductID: 0002
- Manufacturer: APC
- Product: Back-UPS ES 650 FW:818.w1.D USB FW:w1
- Serial Number: QB0514232934
- Bus: 002
Trying to match device
Note also that on this system, and for this device, the grep for APC
would have worked!
I like your suggestion of using the vendor id as an example in the man
page, in particular because the newhidups command line uses "vendor"
(a much more appropriate term in many cases) while the output in both
cases above use "Manufacturer", but also because the numeric id's
avoid confusion.
AG
--
----------------------------------------------------------------------
Alfred Ganz alfred-ganz:at:agci.com
AG Consulting, Inc. (203) 624-9667
440 Prospect Street # 11
New Haven, CT 06511
----------------------------------------------------------------------