[Nut-upsdev] APC Smart-UPS 1000 RM USB problems with newhidups
Peter Selinger
selinger at mathstat.dal.ca
Tue Feb 14 12:44:51 UTC 2006
George Ross wrote:
>
> > Could you please show me, one more time, the output of the following
> > from your Smart-UPS (the one with a descriptor length of 1040):
> >
> > ./get_descriptor 002 002 1 0 0 128 0x02 0
> > ./get_descriptor 002 002 1 0 0 128 0x21 0
> > ./get_descriptor 002 002 1 0 0 129 0x02 0
> > ./get_descriptor 002 002 1 0 0 129 0x21 0
>
> Here they are, and also a lsusb -v:
>
> Bus 002 device 002 configuration 1 interface 0 altsetting 0 endpoint 128 descriptor 0x02 index 0:
>
> 09 02 22 00 01 01 0b e0 0f 09 04 00 00 01 03 00 00 00 09 21 10 01 21 01
> 22 10 04 07 05 81 03 06 00 64
>
> Bus 002 device 002 configuration 1 interface 0 altsetting 0 endpoint 128 descriptor 0x21 index 0:
>
> 09 21 10 01 21 01 22 f3 f1
Hooray! Note that descriptor 0x02 contains a *valid* copy of
descriptor 0x21 inside it:
09 02 22 00 01 01 0b e0 0f 09 04 00 00 01 03 00 00 00 09 21 10 01 21 01
22 10 04 07 05 81 03 06 00 64 ^^^^^^^^^^^^^^^^^
^^^^^^^^
This shows the report descriptor's size correctly as 0x0410 = 1040.
On the other hand, the isolated copy of descriptor 0x21 is invalid,
and shows 0xf1f3. APC must have stored this descriptor in two places
and forgotten to update one of them.
So now it is clear what to do: we will let NUT, like lsusb, look at
descriptor 0x02 instead of 0x21. My guess is that this will work
correctly for all known devices.
I'll start working on a patch later. -- Peter
More information about the Nut-upsdev
mailing list