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

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


Carlos,
    I am using Serial-Over-USB to drive my UPS. I have taken the work 
that was done for the AGILER interface and added the ABLEREX 
interface. However, I could not get the 'get_interrupt' command to 
work. It would not return any useful data. So I had to change the 
'set_data code' to issue 'usb_get_string_simple' and translate the 
character requests into index numbers. The 'get_data' just reads a 
static variable that is set by the 'set_data'. In this way I can get 
most of the functionality working.

    However, I cannot pass 'data' to the UPS as I am issuing numeric 
commands, ie:

    if (strcmp(str, "Q1\r") == 0)
    {
       upsdebugx(4, "set_data_ablerex: Doing Q1 stuff");
       rc = usb_get_string_simple(udev, 3, report_buf, sizeof(report_buf));
       get_done = TRUE;
    }

I would like to find out how to pass the longer commands with 
variable parameter data to the UPS.

Anyway. I think you should go to bed! 4am is for sleeping not coding! 
Here in Australia it is only 15:10, (or 04:10 UTC, which of course 
you already know!).

Jon

At 15:05 1/02/2007, Carlos Rodrigues wrote:
>On 2/1/07, Jon Gough 
><<mailto:jon.gough at eclipsesystems.com.au>jon.gough at eclipsesystems.com.au> 
>wrote:
>Peter,
>    I understand that the real functionality should be elsewhere 
> than the driver. But the commands for the serial interface allow 
> for sending parameters to the UPS, ie S<n>R<m>, S<n>, T<n>, so I 
> just wanted to be able to do that as well. This would then make the 
> driver issue all the commands that are possible.
>
>
>Maybe it's just because it's 4am, or because I skipped too much of 
>the previous posts, but I'm not getting...
>
>The "megatec" driver already does it. If we're talking about a 
>simple layer to communicate with the UPS over USB instead of serial 
>(something that has been talked about), then it's just that, a 
>simple layer under the unmodified megatec driver. Or are we talking 
>about more than just a simple encapsulation of the megatec protocol, 
>something like a mix of megatec strings and USB specific stuff?
>
>I went back a few posts, but since I haven't had much time to read 
>everything thoroughly, I'm starting to get confused with all this 
>(and starting to think that there isn't much hope of concentrating 
>all things megatec under a single driver).
>
>--
>Carlos Rodrigues
>_______________________________________________
>Nut-upsdev mailing list
>Nut-upsdev at lists.alioth.debian.org
>http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev




---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 000709-1, 31/01/2007
Tested on: 1/02/2007 3:13:57 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/f54469c9/attachment.htm


More information about the Nut-upsdev mailing list