Jump to content

USB to RS-232 Converters

Recommended Posts

I'm having difficulty communicating with a Tripp-Lite UPS via serial RS-232.

One variable I need to rule out is the USB to RS-232 adapter cables I'm using. I seem to remember there being some chip sets that didn't work well so I thought I'd ask the group.

I've tried two different cables. The SABRENT Model CB-FTDI using the FTDI chipset and the UGreen using the Prolific PL2303 chipset.

Does anyone have any experience with these cables? Any cables/chipsets you have used before without problems?

I'm heading down this path because when I send a command that should ask the unit what the input voltage is I don't get any response at all from the UPS. In fact it doesn't matter what command I send, I get the same results.


The config vi runs with no error, Open and write also run without errors, when I use bytes at port it returns 0, above I just ask for 1024 but the results are always the same, the read function times out with an empty read buffer.

I think next week I'll go into the lab and try using the PXI-8430 and a straight through serial cable. I just really think this should be working...

Does anyone see anything I'm missing?



Link to comment

Since it look like you are sending binary data, you really should turn off the termination character at the VISA Configure Serial Port (Boolean input on the top).  Then you need to read using the protocol of the device.  This should involve reading a start byte, message ID, data, a checksum of some type.

Link to comment
7 minutes ago, rharmon@sandia.gov said:


What do you mean by "Then you need to read using the protocol of the device" The read buffer is always empty.

When I send this polling command the response from the UPS should be 7E05 0318 B004 52 the data being 1200 or 120.0V

1. Make sure you are actually following the protocol of the UPS.  What is the model?  Do you have a link to the programming manual (might also be in the User Manual)?

2. If you send a binary string to the UPS, I almost guarantee it will not spit back "120.0V".  It has a protocol defining the message format.

Since you are getting no data back, I am left to assume you are sending an invalid command.  Though, it is also possible the UPS is using a different pinout than you expect for the RS-232 connection.

Link to comment


The UPS model # is SU750RTXL2U. I have the programming protocol from Tripp-Lite and I would post it here but it clearly says at the bottom of every page "All technical information contained in the document is the exclusive property of Tripp-Lite and may neither be used nor disclosed without its prior written consent."

That said the protocol document is very vague, in my opinion it leaves out some very important information.

As to the string I'm sending (hex) 7E03 0218 009B. 7E is the header and will always be ~ or 7E, 03 is the type (01=Command Rejected (UPS -> Computer), 02=Command Accepted (UPS -> Computer), 03=Polling Command (Computer->UPS), 04 Set Command (Computer -> UPS), 05 Data Returned (UPS -> Computer). 02 is the length (number of bytes from Report ID to Data), 18 is the report ID (in this case 18 is inquire input voltage) 00 is the Data portion in this case no data, 9B is the check sum which is the sum of bytes from header to data.

As to the string I would like to receive it should be 7E05 0318 B004 52 the data portion is B004 which should be 1200 or 120.0V

OK, with all that said. I'm getting a timeout from the read function. I think this means either as you say I'm sending an invalid command, or the UPS isn't receiving the command string at all. Wish I could determine which it is.

Still wondering about the USB to RS-232 converters I'm using.



Link to comment

I work with those CURSED USB to RS232 adapters nearly every day and have had a whole range of different issues with them.  I won't get into it all here, but here are the troubleshooting steps that I typically do in no particular order:

1. Jumper the Tx and Rx pins on the connector closest to your device to form a loop back (pins 2 and 3). 
2. Use PuTTY or some other method to send data out, you should get the exact same data back.  If you get data back, then you're communication is making it round-trip to at LEAST the connector of your device.
3. Try a null-modem cable/adapter, which swaps the Tx and Rx pins between one end of the cable to the other.  Sometimes manufacturers don't make it easy to figure out if it's required.
4. Double-check to make sure your Baud rate, data bits, stop bits, parity and handshaking have been configured to match what the UPS is expecting.  It looks like you're specifying a termination character for READ (For the initialization, 0x0A), but not enabling it.  If the UPS requires a termination character, you'll have to explicitly send one with writes, it doesn't automatically append.  If the UPS is expecting it, you may have to add an "0A" to the end of your hex string.
5. Look in the documentation to find out if the UPS requires any special termination characters, start/stop, etc characters - I.e. is what you're sending properly formatted?  I've had devices which required unusual starting and termination characters before, with or without the common "0x0A termination character.
6. Your VISA Open timeout is zero, try adding something a little longer... possibly 50ms to 250ms or so.

Edited by Bryan
  • Like 1
Link to comment

I just looked up the owner's manual for that UPS (https://www.tripplite.com/support/owners-manual/45875).  If you look at Pg 6, it looks like there are 2 DB9 connectors on the back... is yours like this?  (Stupid question: Are you plugged into the right one?).  Also, on Pg 12, it mentions "dry contact" connections under USB and RS-232.  It's kind of confusing, but it looks like it could possibly be using a mixture of contact closure and RS232 communications on one cable... this seems unusual (and I may be reading it wrong, I'm in a hurry), but if that's the case, connection of anything other than pins 2 and 3 to your computer could be causing issues.  What concerns me is that pin 5 is normally used for communication ground, but the documentation looks like it says that the contact closures are using those pins as well as pin 3.

I'm wondering if the DB9 connections aren't intended for serial communication.  Some devices will show up when plugged in via USB as a Serial Device with a COM port assignment (may require a driver installation from them).  Perhaps that's what they mean by serial/rs-232?  If so, their documentation (that I've found anyway) isn't very helpful.

I also just noticed that your baud rate in picture above is set to 2400, which isn't typically common on modern serial devices anymore.  9600 used to be the norm, but I've seen 19200 and 115200 commonly used on devices as well.  I've never interfaced one of Tripp_Lite's UPSs before though.

Edited by Bryan
Link to comment


Ok... I've always said there are no stupid questions... It's protection for me when I ask that stupid question....

I looked on the back of the unit and there is only one DB9.

You're right about the "dry contact" connections. They are confusing, but Tripp-Lite tech support assures me I can communicate serial on the DB9 connector.

I agree, the manual, protocol documentation and tech support for purposes of software aren't very helpful.



Link to comment


Tried your software... It's for an different version UPS and the protocols are different. That said I just modified your software with the current protocol commands and I get the same results, read function times out.

I'm leaning toward my problem is not software related, but hardware. Probably the USB to RS-232 converters I'm using. I just had a wild thought and tried to connect to the UPS using my USB to RS-232 converter and their PowerAlert software. Of course there are variables they ask you to select the communications protocol and the protocol they sent me (4001) isn't listed out of the probably 30 protocols in their dropdown. I selected a couple that sounded right but I can't connect with their software on this port either.


I'll ohm out the cables they sent to see if anything looks bad.


Thanks for looking and trying.. It's just really hard working from home without the proper resources to get the job done.


Link to comment

Yeah, working from home can be a pain for those of us who require physical hardware in order to be effective at what we're doing.  We're doing somewhat of a 'rotation' of Test Engineers where I work, so on my days in the building, I can grab things to take home if needed... but ya always forget something. Haha!

It would be great if you had access to a physical DB9 Serial connection on a computer to try.  I know that very few laptops come with them these days and we're forced to use those &%#@ adapters.  I know that some of the pins used by the dry contacts are used for other things with normal serial communication, which is why I'm confused that Tripp Lite says it'll work with serial - unless you have to have a custom cable of some kind. 

Like I mentioned before though, I'd be tempted at this point to try using the USB connection on the UPS and install their driver.  Windows may be able to see, and allow you to treat it as a serial device via that method. 

I hope you're able to figure out what's up.  If I think of anything else that could be useful I'll be sure to post it.  In the meantime, if you get it figured out, please keep us updated on what you found. 

Edited by Bryan
Link to comment

Something the "supplied cables" reminded me of is that APC UPS (at least the ones I've been using) use a non-standard pinout on the DB9 for serial communication. The UPS comes with a cable with the correct pinout on each end. Any chance that's what's causing grief? 

Link to comment

Something to consider...

If the Tripp Lite software Power Alert software is installed on the same host, it may be preventing VISA from reading and writing.

If you're trying to monitor the state of your UPS from your application, you could try this



Edited by Phillip Brooks
Link to comment

A huge thank you to all who have chimed in here.

Here is an update as to where I'm at now. At least one of the USB to RS-232 converter cables work. I have been able to get some communications going with the UPS. I used some software that allowed me to monitor the comm port. While running the Tripp-Lite software I was able to see the protocol the UPS was using. Needless to say it differed in large ways from the document Tripp-Lite supplied me. I was angry at first but I'm over it.

In another post I started "My Lack Of Knowledge On Hex" Rolf Kalbermatter sent me to a site https://github.com/networkupstools/nut/blob/master/drivers/tripplitesu.c

which has some code (C code) that someone uploaded. Between all the help you guys have given me and the code I think I'm going to be able to get something going. Well See.

But honestly thank you guys... You are a huge help...


Link to comment
11 hours ago, hooovahh said:

Well if you do get something working, please post any code you feel comfortable sharing.  Obviously others might be interested in the protocol the UPS uses.

I will...

Thanks to everyone who helped... I've made a lot of progress...

In the end I think try to write up something to help others who run into Tripp-Lite road blocks...

Link to comment


Once again I want to thank everyone who chimed in to help me figure out this communications issue. I have attached a small project file that communicated with the Tripp-Lite SmartOnline UPS. If Tripp-Lite tells you to use communications protocol 4001then this software should work.

To say again, Tripp-Lite was not helpful. The protocol document they sent me in no way works. Not even close.

What was helpful.

1. Input from you guys who chimed in here. Huge help... Thanks.

2. https://github.com/networkupstools/nut/blob/master/drivers/tripplitesu.c   although I don't do C, reading the information here was very helpful

3. The Tripp-Lite Programmable MODBUS Card Owner's Manual. A colleague at work found this document and although it doesn't translate perfectly it was helpful.

4. My bullheadedness and refusal to give up when I knew it should be able to be done.

So obviously without input from Tripp-Lite I can give no guarantees on the accuracy of this code. I feel it's right. If anyone wants to try it and let me know how accurate you think it is... That would be helpful. Even better yet if you find errors please let me know.

Thanks again,

Bob Harmon

Tripp-Lite Project.zip

  • Like 1
Link to comment
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.