[Nut-upsuser] Re: Xserve, USB, NUT

Ted Bardusch nups at bjmoose.com
Tue Jan 10 06:25:01 UTC 2006


OK, here's what OS X says for the device with 051d in it (the APC vendor 
string): 

./get_descriptor 002 004-051d-0002-00-00 1 0 0 128 0x22 0
Warning: usb_claim_interface: couldn't claim interface
Warning: usb_set_altinterface: could not set alternate interface
Bus 002 device 004-051d-0002-00-00 configuration 1 interface 0 altsetting 0 
endpoint 128 descriptor 0x22 index 0: 

05 84 09 04 a1 01 09 24 a1 02 85 01 09 fe 79 01 75 08 95 01 15 00 26 ff
00 b1 22 85 02 09 ff 79 02 b1 22 85 03 09 fd 79 03 b1 22 05 85 85 04 09
8f 79 03 b1 22 85 05 09 89 79 04 b1 22 85 06 09 8b b1 22 09 2c b1 22 85
0e 09 83 25 64 b1 22 09 67 b1 22 85 0c 09 66 81 22 09 66 b1 a2 85 10 09
8d b1 22 09 8e b1 22 85 0f 09 8c b1 22 85 11 09 29 b1 a2 85 09 09 85 75
10 27 ff ff 00 00 b1 a2 85 0d 09 68 27 ff ff 00 00 66 01 10 55 00 81 a2
09 68 b1 a2 05 84 85 12 09 57 16 ff ff 26 ff 7f b1 a2 85 13 09 55 75 18
17 ff ff ff ff 27 18 c5 13 00 b1 a2 05 85 85 08 09 2a 27 64 05 00 00 16
78 00 81 22 09 2a b1 a2 05 84 85 0a 09 40 75 10 15 00 27 ff ff 00 00 67
21 d1 f0 00 55 05 b1 22 85 0b 09 30 b1 a2 85 14 09 5a 75 08 15 01 25 03
65 00 55 00 81 22 09 5a b1 a2 09 02 a1 02 85 07 05 85 09 44 75 01 15 00
25 01 81 a2 09 44 b1 a2 09 45 81 a2 09 45 b1 a2 09 d0 81 a2 09 d0 b1 a2
09 d1 81 a2 09 d1 b1 a2 09 42 81 a2 09 42 b1 a2 05 84 09 68 81 a2 09 68
b1 a2 09 69 81 a2 09 69 b1 a2 05 85 09 43 81 a2 09 43 b1 a2 05 84 09 73
81 a2 09 73 b1 a2 05 85 09 4b 81 a2 09 4b b1 a2 05 84 09 65 81 a2 09 65
b1 a2 05 85 09 db 81 a2 09 db b1 a2 06 86 ff 09 80 81 a2 09 80 b1 a2 95
03 81 01 b1 01 c0 c0 05 84 09 12 a1 00 85 16 09 58 75 08 95 01 25 06 81
a2 09 58 b1 a2 06 86 ff 85 17 09 19 25 5a 81 22 09 19 b1 a2 85 1b 09 1a
25 03 81 22 09 1a b1 a2 85 1c 09 1b 26 ff 00 81 a2 09 1b b1 a2 05 85 85
15 09 85 75 10 27 ff ff 00 00 81 22 09 85 b1 a2 85 18 09 66 55 0f b1 a2
85 1a 09 2a 27 64 05 00 00 16 78 00 66 01 10 55 00 81 22 09 2a b1 a2 85
19 27 ff ff 00 00 15 00 09 68 b1 a2 05 84 85 1e 09 36 67 01 00 01 00 55
0f b1 a2 85 1f 09 40 67 21 d1 f0 00 55 05 b1 22 85 1d 09 30 b1 a2 c0 09
1a a1 00 85 20 09 30 55 06 b1 a2 06 86 ff 85 21 09 52 75 08 25 0a 65 00
55 00 81 22 09 52 b1 a2 85 22 09 61 25 02 81 a2 09 61 b1 a2 c0 05 84 09
1c a1 00 85 2c 09 35 75 10 27 ff ff 00 00 55 0f b1 a2 85 2a 09 32 66 01
f0 55 0e b1 a2 85 2b 09 30 67 21 d1 f0 00 55 06 b1 a2 85 2d 09 40 16 78
00 26 78 00 55 07 81 22 09 40 b1 a2 85 23 09 54 16 7f 00 26 88 00 81 22
09 54 b1 a2 85 24 09 53 16 61 00 26 6a 00 81 22 09 53 b1 a2 06 86 ff 85
25 09 7e 15 00 27 a4 01 00 00 66 01 10 55 00 81 22 09 7e b1 a2 85 26 09
76 27 76 02 00 00 81 22 09 76 b1 a2 05 84 85 27 09 57 16 ff ff 26 ff 7f
b1 a2 85 28 09 56 b1 a2 85 29 09 55 75 18 17 ff ff ff ff 27 18 c5 13 00
b1 a2 c0 85 2e 09 fe 79 05 75 08 15 00 26 ff 00 65 00 b1 22 85 2f 09 ff
79 02 b1 22 85 30 09 fd 79 03 b1 22 85 31 09 01 79 06 b1 a2 06 86 ff 85
34 09 42 79 07 b1 22 06 86 ff 85 37 09 79 79 08 b1 22 85 32 09 72 25 01
b1 22 05 85 85 35 09 85 75 10 27 ff ff 00 00 b1 22 06 86 ff 85 3e 09 27
75 20 15 00 27 ff ff ff 7f b1 a2 85 3f 09 28 b1 a2 05 84 85 36 09 5a 75
08 15 01 25 03 81 22 09 5a b1 a2 09 02 a1 02 85 33 05 85 09 44 75 01 15
00 25 01 81 a2 09 44 b1 a2 09 45 81 a2 09 45 b1 a2 09 d0 81 a2 09 d0 b1
a2 09 d1 81 a2 09 d1 b1 a2 09 42 81 a2 09 42 b1 a2 05 84 09 68 81 a2 09
68 b1 a2 09 69 81 a2 09 69 b1 a2 05 85 09 43 81 a2 09 43 b1 a2 05 84 09
73 81 a2 09 73 b1 a2 05 85 09 4b 81 a2 09 4b b1 a2 05 84 09 65 81 a2 09
65 b1 a2 05 85 09 db 81 a2 09 db b1 a2 06 86 ff 09 80 81 a2 09 80 b1 a2
95 03 81 01 b1 01 c0 c0 

.......$......y.u.....&..."....y.."....y.."......y.."....y..".....".,.".
...%d.".g."...f.".f......."..."....."...)......u.'.........h'....f..U...
.h.......W...&.......Uu......'...........*'d....x..".*....... at u...'....g
!...U.."...0.....Zu...%.e.U..".Z...........Du...%....D...E...E..........
.........B...B.....h...h...i...i.....C...C.....s...s.....K...K.....e...e
........................................Xu...%....X.........%Z."........
%.."........&..............u.'.....".......fU......*'d....x.f..U..".*...
.'.......h.......6g....U...... at g!...U.."...0........ .0U.......!.Ru.%.e.
U..".R...".a%....a..........,.5u.'....U....*.2f..U....+.0g!...U....-. at .x
.&x.U..". at ...#.T...&...".T...$.S.a.&j..".S......%.~..'....f..U..".~...&.
v'v....".v.....'.W...&.....(.V...).Uu......'...........y.u...&..e.."./..
y..".0..y..".1..y.......4.By.."....7.yy..".2.r%.."...5..u.'....."....>.'
u ..'.......?.(.....6.Zu...%..".Z.......3...Du...%....D...E...E.........
..........B...B.....h...h...i...i.....C...C.....s...s.....K...K.....e...
e............................... 


Charles Lepple writes: 

> 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: 
> 
>   http://lists.alioth.debian.org/pipermail/nut-upsdev/2005-November/000329.html 
> 
> 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 mailing list