[Nut-upsdev] Re: [Nut-upsuser] Ablerex 625L USB version

Jon Gough jon.gough at eclipsesystems.com.au
Wed Jan 31 03:28:09 CET 2007


Peter,
    Here is the output.

Regards
    Jon

debug level is '3'
Checking device (FFFF/0000) (001/002)
- VendorID: ffff
- ProductID: 0000
- Manufacturer: UIS Ablerex
- Product: Ablerex USB Interface 049e
- Serial Number: unknown
- Bus: 001
Trying to match device
Device matches
failed to claim USB device, trying 2 more time(s)...
detaching kernel driver from USB device...
trying again to claim USB device...
HID descriptor, method 1: (9 bytes) => 09 21 00 01 00 01 22 78 02
HID descriptor, method 2: (9 bytes) => 09 21 00 01 00 01 22 78 02
HID descriptor retrieved (Reportlen = 632)
Report descriptor retrieved (Reportlen = 632)
Found HID device
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)

Report Descriptor size = 632
Report Descriptor: (632 bytes) => 05 86 09 04 a1 01 05 84 09 1e a1 00 85 01
09 1f 65 00 75 04 95 01 15 00 25 0f 65 00 b1 02 75 04 95 01 b1 03 09 40 75
10 95 01 67 21 d1 f0 00 55 07 15 00 26 fa 00 b1 02 09 42 75 10 95 01 66 01
f0 55 00 15 00 25 3c b1 02 09 53 75 10 95 01 67 21 d1 f0 00 55 07 15 00 26
fa 00 b1 02 09 54 75 10 95 01 67 21 d1 f0 00 55 07 15 00 26 fa 00 b1 02 09
fd 09 fe 09 ff 75 08 95 03 26 ff 00 65 00 b1 00 c0 05 84 09 1e a1 00 85 02
09 1f 65 00 75 04 95 01 15 00 25 0f 65 00 b1 02 95 01 75 04 b1 03 09 40 75
10 95 01 67 21 d1 f0 00 55 07 15 00 26 fa 00 b1 02 09 42 75 10 95 01 66 01
f0 55 00 15 00 25 3c b1 02 09 43 75 10 95 01 66 21 d1 55 07 15 00 27 fe ff
00 00 b1 02 09 44 95 01 75 10 66 21 d1 55 07 15 00 27 fe ff 00 00 b1 02 09
56 75 18 95 01 66 01 10 55 00 15 00 27 fe ff 00 00 b1 02 09 57 75 18 95 01
66 01 10 55 00 15 00 27 fe ff 00 00 b1 02 c0 05 84 09 10 a1 00 85 03 09 11
65 00 75 04 95 01 15 00 25 0f 65 00 b1 02 75 04 95 01 b1 03 09 02 a1 02 09
6d 09 61 75 01 95 02 15 00 25 01 b1 02 75 06 95 01 b1 03 c0 09 30 75 18 95
01 67 21 d1 f0 00 55 05 27 fe ff 00 00 b1 02 09 36 75 10 95 01 67 01 00 01
00 27 fe ff 00 00 b1 02 09 58 75 01 95 06 15 00 25 01 81 02 75 02 95 01 81
03 09 58 75 01 95 04 15 00 25 01 b1 02 75 04 95 01 b1 03 c0 05 84 09 16 a1
00 85 04 09 17 75 04 95 01 15 00 25 0f 65 00 81 02 75 04 95 01 81 03 09 1a
a1 00 09 1b 09 1f 75 04 95 02 15 00 25 0f 65 00 81 02 09 02 a1 02 09 61 75
01 95 01 15 00 25 01 81 02 75 07 95 01 81 03 c0 09 30 75 10 95 01 67 21 d1
f0 00 55 05 27 fe ff 00 00 81 02 09 32 75 10 95 01 66 01 f0 55 05 27 fe ff
00 00 81 02 c0 09 1c a1 00 85 05 09 1d 09 1f 75 04 95 02 15 00 25 0f 65 00
81 02 09 30 75 10 95 01 67 21 d1 f0 00 55 05 27 fe ff 00 00 81 02 09 32 75
10 95 01 66 01 f0 55 05 27 fe ff 00 00 81 02 09 35 75 10 95 01 15 00 26 ff
00 81 02 09 02 a1 02 09 65 09 6e 09 6f 75 01 95 03 15 00 25 01 65 00 81 02
75 05 95 01 81 03 09 39 75 08 95 2e b1 02 c0 c0 c0 c0
Detected a UPS: UIS Ablerex/Ablerex USB Interface 049e
Using subdriver: EXPLORE HID 0.1
Report[r]: (16 bytes) => 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 b0
Path: 00860004.Flow.FlowID, Type: Feature, ReportID: 0x01, Offset: 0, 
Size: 4, Value: 0.000000
Path: 00860004.Flow.ConfigVoltage, Type: Feature, ReportID: 0x01, 
Offset: 8, Size: 16, Value: 0.000000
Path: 00860004.Flow.ConfigFrequency, Type: Feature, ReportID: 0x01, 
Offset: 24, Size: 16, Value: 0.000000
Path: 00860004.Flow.LowVoltageTransfer, Type: Feature, ReportID: 
0x01, Offset: 40, Size: 16, Value: 0.000000
Path: 00860004.Flow.HighVoltageTransfer, Type: Feature, ReportID: 
0x01, Offset: 56, Size: 16, Value: 0.000000
Path: 00860004.Flow.iManufacturer, Type: Feature, ReportID: 0x01, 
Offset: 72, Size: 8, Value: 0.000000
Path: 00860004.Flow.iProduct, Type: Feature, ReportID: 0x01, Offset: 
80, Size: 8, Value: 0.000000
Path: 00860004.Flow.iSerialNumber, Type: Feature, ReportID: 0x01, 
Offset: 88, Size: 8, Value: 0.000000
Path: 00860004.Flow.FlowID, Type: Feature, ReportID: 0x02, Offset: 0, 
Size: 4, Value: 0.000000
Path: 00860004.Flow.ConfigVoltage, Type: Feature, ReportID: 0x02, 
Offset: 8, Size: 16, Value: 0.000000
Path: 00860004.Flow.ConfigFrequency, Type: Feature, ReportID: 0x02, 
Offset: 24, Size: 16, Value: 0.000000
Report[r]: (16 bytes) => 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Path: 00860004.Flow.ConfigApparentPower, Type: Feature, ReportID: 
0x02, Offset: 40, Size: 16, Value: 0.000000
Path: 00860004.Flow.ConfigActivePower, Type: Feature, ReportID: 0x02, 
Offset: 56, Size: 16, Value: 0.000000
Path: 00860004.Flow.DelayBeforeStartup, Type: Feature, ReportID: 
0x02, Offset: 72, Size: 24, Value: 0.000000
Path: 00860004.Flow.DelayBeforeShutdown, Type: Feature, ReportID: 
0x02, Offset: 96, Size: 24, Value: 0.000000
Report[r]: (16 bytes) => 00 00 00 00 00 00 00 00 00 a1 fa b7 31 00 00 00
Path: 00860004.BatterySystem.BatterySystemID, Type: Feature, 
ReportID: 0x03, Offset: 0, Size: 4, Value: 0.000000
Path: 00860004.BatterySystem.PresentStatus.Used, Type: Feature, 
ReportID: 0x03, Offset: 8, Size: 1, Value: 0.000000
Path: 00860004.BatterySystem.PresentStatus.Good, Type: Feature, 
ReportID: 0x03, Offset: 9, Size: 1, Value: 0.000000
Path: 00860004.BatterySystem.Voltage, Type: Feature, ReportID: 0x03, 
Offset: 16, Size: 24, Value: 0.000000
Path: 00860004.BatterySystem.Temperature, Type: Feature, ReportID: 
0x03, Offset: 40, Size: 16, Value: 0.000000
Path: 00860004.BatterySystem.Test, Type: Input, ReportID: 0x03, 
Offset: 0, Size: 1, Value: 0.000000
Path: 00860004.BatterySystem.Test, Type: Feature, ReportID: 0x03, 
Offset: 56, Size: 1, Value: 0.000000
Can't find object 00860004.PowerConverter.PowerConverterID
Path: 00860004.PowerConverter.PowerConverterID, Type: Input, 
ReportID: 0x04, Offset: 0, Size: 4
Can't find object 00860004.PowerConverter.Input.InputID
Path: 00860004.PowerConverter.Input.InputID, Type: Input, ReportID: 
0x04, Offset: 8, Size: 4
Can't find object 00860004.PowerConverter.Input.FlowID
Path: 00860004.PowerConverter.Input.FlowID, Type: Input, ReportID: 
0x04, Offset: 12, Size: 4
Can't find object 00860004.PowerConverter.Input.PresentStatus.Good
Path: 00860004.PowerConverter.Input.PresentStatus.Good, Type: Input, 
ReportID: 0x04, Offset: 16, Size: 1
Can't find object 00860004.PowerConverter.Input.Voltage
Path: 00860004.PowerConverter.Input.Voltage, Type: Input, ReportID: 
0x04, Offset: 24, Size: 16
Can't find object 00860004.PowerConverter.Input.Frequency
Path: 00860004.PowerConverter.Input.Frequency, Type: Input, ReportID: 
0x04, Offset: 40, Size: 16
Can't find object 00860004.PowerConverter.Output.OutputID
Path: 00860004.PowerConverter.Output.OutputID, Type: Input, ReportID: 
0x05, Offset: 0, Size: 4
Can't find object 00860004.PowerConverter.Output.FlowID
Path: 00860004.PowerConverter.Output.FlowID, Type: Input, ReportID: 
0x05, Offset: 4, Size: 4
Can't find object 00860004.PowerConverter.Output.Voltage
Path: 00860004.PowerConverter.Output.Voltage, Type: Input, ReportID: 
0x05, Offset: 8, Size: 16
Can't find object 00860004.PowerConverter.Output.Frequency
Path: 00860004.PowerConverter.Output.Frequency, Type: Input, 
ReportID: 0x05, Offset: 24, Size: 16
Can't find object 00860004.PowerConverter.Output.PercentLoad
Path: 00860004.PowerConverter.Output.PercentLoad, Type: Input, 
ReportID: 0x05, Offset: 40, Size: 16
Can't find object 00860004.PowerConverter.Output.PresentStatus.Overload
Path: 00860004.PowerConverter.Output.PresentStatus.Overload, Type: 
Input, ReportID: 0x05, Offset: 56, Size: 1
Can't find object 00860004.PowerConverter.Output.PresentStatus.Boost
Path: 00860004.PowerConverter.Output.PresentStatus.Boost, Type: 
Input, ReportID: 0x05, Offset: 57, Size: 1
Can't find object 00860004.PowerConverter.Output.PresentStatus.Buck
Path: 00860004.PowerConverter.Output.PresentStatus.Buck, Type: Input, 
ReportID: 0x05, Offset: 58, Size: 1
Report[r]: (16 bytes) => 00 00 00 00 00 d0 be 9d bf 10 00 00 00 a0 0f 00
Path: 00860004.PowerConverter.Output.PresentStatus.00840039, Type: 
Feature, ReportID: 0x05, Offset: 0, Size: 8, Value: 0.000000
upsdrv_updateinfo...
dstate_init: sock /var/state/ups/usbhid-ups-auto open on fd 5
upsdrv_updateinfo...
Waiting for notifications...
Signal 2: exiting
Closing device



At 13:20 31/01/2007, Peter Selinger wrote:
>Jon Gough wrote:
> >
> > Peter,
> >     I have been doing some more testing and I find that if I modify
> > the libusb.c file to set a report size in libusb_get_report to 16 the
> > error messages go away. This is the code as it currently stands:
> >
> > static int libusb_get_report(usb_dev_handle *udev, int ReportId,
> > unsigned char *raw_buf, int ReportSize )
> > {
> >     int ReportSize_test = 16;
> >     unsigned char raw_buf_test[ReportSize_test + 1];
> >     int rc;
> >     unsigned char *p_raw_buf_test;
> >     upsdebugx(4, "Entering libusb_get_report, ReportSize: %i,
> > ReportSize_test: %i",ReportSize, ReportSize_test);
> >
> >          if (udev != NULL)
> >          {
> >                  rc = usb_control_msg(udev,
> >                          USB_ENDPOINT_IN + USB_TYPE_CLASS +
> > USB_RECIP_INTERFACE,
> >                          0x01, /* HID_REPORT_GET */
> >                          ReportId+(0x03<<8), /* HID_REPORT_TYPE_FEATURE */
> >                          0, raw_buf_test, ReportSize_test, USB_TIMEOUT);
> >                          p_raw_buf_test = raw_buf_test +
> > (ReportSize_test - ReportSize);
> >                          memcpy(raw_buf, p_raw_buf_test, ReportSize);
> >                  return rc;
> >          }
> >          else
> >                  return 0;
> > }
> >
> >  From this I now get
>
>Good.
>
> > Detected a UPS: UIS Ablerex/Ablerex USB Interface 049e
> > Using subdriver: EXPLORE HID 0.1
> > parsing 00860004
> > parsing Flow
> > hid_lookup_usage: found 84001e
> > parsing FlowID
> > hid_lookup_usage: found 84001f
> > Path depth = 3, Path: 00860004.Flow.FlowID, Node1/2/3:, 860004, 
> 84001e, 84001f
> > 0: Usage(00860004)
> > 1: Usage(0084001e)
> > 2: Usage(0084001f)
> > Buffer is stale. refreshing
> > Noting in the buffer for rbuf->data[0]
> > Noting in the buffer for rbuf->data[1]
> > Noting in the buffer for rbuf->data[2]
> > Entering libusb_get_report, ReportSize: 13, ReportSize_test: 16
> > Report[r]: (16 bytes) => 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 b0
> > =>> Before exponent: 0, 0/0)
> > =>> After conversion: 0.000000 (0), 0/0)
> > Path: 00860004.Flow.FlowID, Type: Feature, ReportID: 0x01, Offset: 0,
> > Size: 4, Value: 0.000000
> >
> > when i use the usbhid-ups -DDDD -x explore command.
>
>Don't use -DDDD. Please use -DDD and post the entire output until the
>driver begins to loop. I need to see all the lines that start with
>"Path:", as well as the report descriptor (many lines of hexadecimal
>data). It's best if you don't prune away parts of the output.
>
> > It would appear that whatever is setting the length of the report is
> > not getting it quite right. I think this is in hidparse.c, but I am
> > still looking.
>
>No, I believe the driver is setting the length correctly. The problem
>is that the UPS is buggy. It expects a buffer of size 16, although it
>only sends 13 bytes of useful data. We should be able to compensate,
>though.
>
>-- Peter




---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 000709-0, 30/01/2007
Tested on: 31/01/2007 1:28:14 PM
avast! is copyright (c) 2000-2007 ALWIL Software.
http://www.avast.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070131/bafd9612/attachment-0001.htm


More information about the Nut-upsdev mailing list