[Nut-upsuser] Tripplite INTERNETX525

Charles Lepple clepple at gmail.com
Mon Nov 16 02:24:09 UTC 2009


On Nov 11, 2009, at 8:23 AM, Farrukh Ahmad wrote:

> Of course - I'll be more than happy to test any changes...

The quick-and-dirty hack is to comment out lines 1306 to 1331 in  
tripplite_usb.c, starting with:

         if( tl_model == TRIPP_LITE_OMNIVS || tl_model ==  
TRIPP_LITE_OMNIVS_2001 ) {
                 ret = send_cmd(b_msg, sizeof(b_msg), b_value,  
sizeof(b_value));

and going until the "}" at the end of that block.

Reworking the error handling is going to take more work than I  
initially thought.

Basically, this UPS seems to have a simple USB-to-serial converter  
inside, and after you send a valid command, the USB buffer should  
contain the reply to that command. If it contains the response to the  
last valid command (as seen in your original email, where the last  
word on the line is "(bad)"), then we assume that the most recent  
command failed.

Arjen pointed out that it might be a bit extreme to restart the whole  
USB connection if one command fails. I agree, but I am not very  
excited about the possibility of having to round up a whole bunch of  
testers for some rewritten error-handling code.

Another option might be to try some of the other single-letter  
commands and see if there is a different one for reading the battery  
status. The two basic ways are to insert calls to 'debug_message("X",  
2)' (where "X" is a letter not already being decoded as part of the  
1001 protocol) or to monitor the USB communication of the official  
vendor software to determine how they read the battery value.

> As this is a very new device - I'm surprised that it does not  
> respond as expected.. Could it be that Tripplite are changing some  
> aspects of the protocol?

I am surprised that a new device mostly works with an older driver.

We use the word "protocol" loosely here-- the NUT team does not have a  
document that says how these UPSes communicate over USB. (It is a  
different story for the UPSes which use usbhid-ups, since the USB  
Power Device Class Specification dictates that protocol.)



More information about the Nut-upsuser mailing list