<html>
<body>
<font size=3>Carlos,<br>
&nbsp;&nbsp; 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>
&nbsp;&nbsp; However, I cannot pass 'data' to the UPS as I am issuing
numeric commands, ie:<br><br>
&nbsp;&nbsp; if (strcmp(str, &quot;Q1\r&quot
<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>
&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; upsdebugx(4, &quot;set_data_ablerex: Doing
Q1 stuff&quot
<img src="http://messenger.msn.com/MMM2004-08-11_11.52/Resource/emoticons/wink_smile.gif" width=19 height=19 alt="Winking smiley">;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rc = usb_get_string_simple(udev, 3,
report_buf, sizeof(report_buf));<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get_done = TRUE;<br>
&nbsp;&nbsp; }<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>
&lt;<a href="mailto:jon.gough@eclipsesystems.com.au">
jon.gough@eclipsesystems.com.au</a></font>&gt; wrote:<br>

<dl>
<dd>Peter,<br>

<dd>&nbsp;&nbsp; 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&lt;n&gt;R&lt;m&gt;,
S&lt;n&gt;, T&lt;n&gt;, 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 &quot;megatec&quot; 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>