[Nut-upsuser] Battery test feature of APC Back-UPS RS series

Jean Delvare khali at linux-fr.org
Sun Oct 4 12:16:33 UTC 2009


Hi Arnaud,

Sorry for the long delay.

On Wed, 20 May 2009 16:01:20 +0200, Arnaud Quette wrote:
> 2009/5/18 Jean Delvare <khali at linux-fr.org>
> > The USB sniffer I am using [1] is not exactly user-friendly. I have to
> > restart the system for every new capture (otherwise I am unable to
> > reset the capture file), and the capture doesn't end when I exit the
> > application. It is also not possible to manually start or stop the
> > capture. Is there any better USB sniffer application you would
> > recommend?
> 
> I don't know. I've not used windows for years...
> maybe that one, but it's a shareware!
> http://www.hhdsoftware.com/Products/home/usb-monitor.html

OK, I've given it a try, it is quite powerful, unfortunately I don't
know much about USB so I may not be using it in the best way.

Anyway, I managed to capture some data and I hope it will help. I've
asked for HID decoding and URB decoding. The files are here:

http://khali.linux-fr.org/files/nut/

idle-*.htm files are captures when I didn't do anything. test-*.htm
files are captures when I triggered a battery test.

I tried finding differences between the captures, and found that the
test capture had the following entries not present in the idle capture:

000786: Class-Specific Request Sent (DOWN), 03.10.2009 18:15:21.562 +0.046
Request Type:Set Report (Data Field)
Report Type:Feature
ReportID:0x16
Parsed Report:
Report Name:UPS

000787: Class-Specific Data (UP), 03.10.2009 18:15:21.562 +0.0
Request Type:Set Report (Data Field)

000788: Class-Specific Request Sent (DOWN), 03.10.2009 18:15:21.562 +0.0
Request Type:Set Report (Data Field)
Report Type:Feature
ReportID:0x16 Parsed
Report: Report Name:UPS

000789: Class-Specific Data (UP), 03.10.2009 18:15:21.562 +0.0
Request Type:Set Report (Data Field) 

The above is from the HID decoder. The same packets through the URB
decoder look like this:

000786: Class-Specific Request (DOWN), 03.10.2009 18:15:21.562 +0.046
Destination: Interface, Index 0
Reserved Bits: 34
Request: 0x9
Value: 0x316
Send 0x2 bytes to the device

000787: Control Transfer (UP), 03.10.2009 18:15:21.562 +0.0
Status: 0x00000000
Pipe Handle: 0xf86a5c94

 16 01

Setup Packet

000788: Class-Specific Request (DOWN), 03.10.2009 18:15:21.562 +0.0
Destination: Interface, Index 0
Reserved Bits: 34
Request: 0x9 Value: 0x316
Send 0x2 bytes to the device

000789: Control Transfer (UP), 03.10.2009 18:15:21.562 +0.0
Status: 0x00000000
Pipe Handle: 0xf86a5c94

 16 00

Setup Packet

You can look at the html files yourself if you need more details. Is
the above sufficient to attempt to add battery test support for my UPS?
If you need different data than what I provided, I can try other
decoders, please just let me know what you need.

> does usbsnoop provides a waterfall view (like "tail -f"), in which case,
> just copy / paste the exact few lines. Otherwise, it will requires more
> investigations.

usbsnoop doesn't really provide any option, I fear.

-- 
Jean Delvare



More information about the Nut-upsuser mailing list