<html>
<body>
<font size=3>Carlos,<br>
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.<br><br>
However, I cannot pass 'data' to the UPS as I am issuing
numeric commands, ie:<br><br>
if (strcmp(str, "Q1\r"
<img src="http://messenger.msn.com/MMM2004-08-11_11.52/Resource/emoticons/wink_smile.gif" width=19 height=19 alt="Winking smiley"> == 0)<br>
{<br>
upsdebugx(4, "set_data_ablerex: Doing
Q1 stuff"
<img src="http://messenger.msn.com/MMM2004-08-11_11.52/Resource/emoticons/wink_smile.gif" width=19 height=19 alt="Winking smiley">;<br>
rc = usb_get_string_simple(udev, 3,
report_buf, sizeof(report_buf));<br>
get_done = TRUE;<br>
}<br><br>
I would like to find out how to pass the longer commands with variable
parameter data to the UPS.<br><br>
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!).<br><br>
Jon<br><br>
At 15
<img src="http://messenger.msn.com/MMM2004-08-11_11.52/Resource/emoticons/omg_smile.gif" width=19 height=19 alt="Smiley says O">5 1/02/2007, Carlos Rodrigues wrote:<br>
<blockquote type=cite class=cite cite="">On 2/1/07, <b>Jon Gough</b>
<<a href="mailto:jon.gough@eclipsesystems.com.au">
jon.gough@eclipsesystems.com.au</a></font>> wrote:<br>
<dl>
<dd>Peter,<br>
<dd> 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.<br><br>
</dl><br>
Maybe it's just because it's 4am, or because I skipped too much of the
previous posts, but I'm not getting... <br><br>
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? <br><br>
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). <br><br>
-- <br>
Carlos Rodrigues <br>
_______________________________________________<br>
Nut-upsdev mailing list<br>
Nut-upsdev@lists.alioth.debian.org<br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev" eudora="autourl">
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev</a>
</blockquote>
<BR><BR>
<TABLE width=400><HR>
<P style="FONT: 9pt/11pt verdana"><a href="http://www.avast.com">avast! Antivirus</a>: Outbound message clean.
<P style="FONT: 8pt/11pt verdana">Virus Database (VPS): 000709-1, 31/01/2007<BR>Tested on: 1/02/2007 3:13:58 PM<BR><FONT color=gray>avast! is copyright (c) 2000-2007 ALWIL Software.</FONT></P>
<TBODY></TBODY></TABLE>
<BR>
</body>
<br>
</html>