[Nut-upsuser] Re: Xserve, USB, NUT
clepple at gmail.com
Mon Jan 9 13:28:41 UTC 2006
On 1/9/06, Ted Bardusch <nups at bjmoose.com> wrote:
> Sorry, OS X doesn't have lsusb, and it's not in darwinports yet either.
George and Ted,
can you both try running the program attached to this message:
Peter suggested the following command lines, among others:
get_descriptor 001 003 1 0 0 128 0x21 0
get_descriptor 001 003 1 0 0 128 0x22 0
To compile, I did this:
gcc $(libusb-config --cflags --libs) get_descriptor.c -o get_descriptor
(which should work regardless of where libusb was installed)
George: you will want to replace '001 003' by the bus and device
numbers in the /proc/bus/usb/ path to your UPS.
Ted: Since OS X doesn't have /proc/bus/usb, you will need to run the
program a couple of times, with invalid values for the bus and device
(it will then list the valid options).
If you're lucky, you can open the System Profiler program (Apple menu
-> "About this Mac" -> "more info"), and find out which bus it is. On
my Powerbook, the buses are numbered 001 through 004, and they were in
the same order in System Profiler as for libusb.
Finding the device string should be easy, since the second and third
groups of digits are the Vendor ID and Product ID, respectively.
Here's what worked on my machine:
./get_descriptor 003 002-051d-0002-00-00 1 0 0 128 0x21 0
(It does print a few errors, but that's because the power management
system has claimed the UPS already.)
- Charles Lepple
More information about the Nut-upsuser