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

Jon Gough jon.gough at eclipsesystems.com.au
Thu Feb 1 04:02:52 CET 2007


Alexamder,
    Here is a level 4 dump of the output I currently get. This shows 
that apart from the first call which is to the comm_usb_recv without 
calling the comm_usb_send first, most of it is working. The functions 
I have not implemented end up doing what the original code did, ie 
set_report, get_interrupt.

Jon


debug level is '4'
comm_usb_open
Checking device (0000/0000) (002/001)
- VendorID: 0000
- ProductID: 0000
- Manufacturer: unknown
- Product: unknown
- Serial Number: unknown
- Bus: 002
Trying to match device
comm_usb_match
Device does not match - skipping
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
comm_usb_match
Device matches
HID descriptor, method 1: (9 bytes) => 09 21 00 01 00 01 22 78 02
i=0, extra[i]=09, extra[i+1]=21
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 - Megatec protocol driver 1.5[usb] (2.1.0)
Carlos Rodrigues (c) 2003-2007

comm_usb_open: Flush buffers
comm_usb_recv: Starting
get_data_ablerex: Starting
in libusb_get_interrupt, bufsize: 47
libsub_get_interrupt: rc: -2
get_data_ablerex: len: -2, error: 2, No such file or directory: buf:
get_data_ablerex: Leaving get_data_ablerex: len: 0
comm_usb_recv: len: 0
Starting UPS detection process...
Attempting to detect the UPS...
check_ups: Sending "Q1" command...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 011 50.0 
27.0 25.0 00001000
check_ups: getting receive stuff, ignchars: (#, ret: 46
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
got receive stuff: rc = 45, buffer: 248.0 140.0 248.0 011 50.0 27.0 
25.0 00001000
"Q1" command successful.
Attempting to detect the UPS...
check_ups: Sending "Q1" command...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 012 50.0 
27.0 25.0 00001000
check_ups: getting receive stuff, ignchars: (#, ret: 46
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
got receive stuff: rc = 45, buffer: 248.0 140.0 248.0 012 50.0 27.0 
25.0 00001000
"Q1" command successful.
Attempting to detect the UPS...
check_ups: Sending "Q1" command...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 012 50.0 
27.0 25.0 00001000
check_ups: getting receive stuff, ignchars: (#, ret: 46
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
got receive stuff: rc = 45, buffer: 248.0 140.0 248.0 012 50.0 27.0 
25.0 00001000
"Q1" command successful.
Attempting to detect the UPS...
check_ups: Sending "Q1" command...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 012 50.0 
27.0 25.0 00001000
check_ups: getting receive stuff, ignchars: (#, ret: 46
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
got receive stuff: rc = 45, buffer: 248.0 140.0 248.0 012 50.0 27.0 
25.0 00001000
"Q1" command successful.
Attempting to detect the UPS...
check_ups: Sending "Q1" command...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 012 50.0 
27.0 25.0 00001000
check_ups: getting receive stuff, ignchars: (#, ret: 46
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
got receive stuff: rc = 45, buffer: 248.0 140.0 248.0 012 50.0 27.0 
25.0 00001000
"Q1" command successful.
0 out of 5 detection attempts failed (minimum failures: 2).
Asking for UPS information ("I" command)...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing I stuff
set_data_ablerex: rc: 37, report_buf: UIS AblerexAblerex USB Interface 049e
get_ups_info: getting receive stuff, ignchars: (#
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 37
UPS information: UIS AblerexAblerex USB Interface 049e
Megatec protocol UPS detected [UIS AblerexAble ex USB Int rface 049e].
Asking for UPS power ratings ("F" command)...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing F stuff
set_data_ablerex: rc: 22, report_buf: #240.0 0.0 024.0 50.0
get_firmware_values: getting receive stuff, ignchars: (#
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 22
UPS power ratings: 240.0 0.0 024.0 50.0
Asking for UPS status ("Q1" command)...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 012 50.0 
27.0 25.0 00001000
run_query: getting receive stuff, ignchars: (#
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
UPS status: 248.0 140.0 248.0 012 50.0 27.0 25.0 00001000
24.0V battery, interval [19.4V, 27.4V].
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing C stuff
set_data_ablerex: rc: 10, report_buf: UPS No Ack
Done setting up the UPS.
Asking for UPS status ("Q1" command)...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 012 50.0 
27.0 25.0 00001000
run_query: getting receive stuff, ignchars: (#
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
UPS status: 248.0 140.0 248.0 012 50.0 27.0 25.0 00001000
Charge: 95.0%
dstate_init: sock /var/state/ups/eclipse open on fd 5
Asking for UPS status ("Q1" command)...
comm_usb_send: Starting
comm_usb_send: About to return
set_data_ablerex: Starting
set_data_ablerex: Doing Q1 stuff
set_data_ablerex: rc: 46, report_buf: (248.0 140.0 248.0 012 50.0 
27.0 25.0 00001000
run_query: getting receive stuff, ignchars: (#
comm_usb_recv: Starting
get_data_ablerex: Starting
comm_usb_recv: len: 46
UPS status: 248.0 140.0 248.0 012 50.0 27.0 25.0 00001000
Charge: 95.0%
Signal 2: exiting
comm_usb_close



At 11:48 1/02/2007, Alexander I. Gordeev wrote:
>On Thu, 01 Feb 2007 03:26:09 +0300, Jon Gough 
><jon.gough at eclipsesystems.com.au> wrote:
>
> > Alexander,
> >     I have tried your technique on my system and I am now getting
> > partial success. I can issue the Q1 and F commands and get the
> > required response back. The I command gives me stuff, but it is too
> > short, so I am not sure what I should have here.
> >
>
>Could you, please, post your full output? It'd very interesting for
>me.
>The "I" request corresponds to the sctring descriptor #12 of my own
>UPS. So the driver returns this descriptor.
>Your descriptor #12 seems to be incomplete. As I understood from
>one of your previous posts full information is spread.
>
> >     Now. Do you know how to issue commands to get the UPS to do
> > something, ie battery test ?
> >
>
>Yes, I know. I dumped USB communication between UPS and the Windows
>driver. This dump is still not full. I only know that when you
>press "Test" button WIndows program retrieves string descriptor #4.
>It gets "UPS NO ACK" but there is also a side effect - UPS starts
>self-test.
>Other commands are performed in a similar way.
>I'll get the full dump soon.
>
>This feature is not yet implemented. Only informational requests
>work.
>
>--
>    Alexander




---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 000709-1, 31/01/2007
Tested on: 1/02/2007 2:03:26 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/20070201/93275cd5/attachment.html


More information about the Nut-upsdev mailing list