Reading RS-232 with PC?

Jan 03, 2007 18 Replies

Hi guys:



I'm an ME and I have run across a situation where I need to read what is coming out of an RS-232 port on a medical device. All I really need is to be able to literally see what bytes are coming out...even ASCII letters are OK. I just want to see what the data looks like so that I can determine what protocol is being used.



I can make a cable to plug into the serial port on my computer that reads from their serial-out. What sort of software will simply display what is coming over the line (once I set the data settings, etc.)? This probably has a ridiculously simple answer...doesn't it?



Thanks for any help you can give me.



Don Kansas City



Probably.

Every version of Windows that I know of since 3.0 has included a terminal program. For the last eight or so years this has been "Hyper Terminal", which can be found in Start -> "All Programs" -> "Accessories" -> "Communications".

It sucks in many ways, but it's good enough that I've never been able to overcome my laziness enough to find a better one, and I generally use terminal access a lot when I write embedded applications.

I'm sure that any Linux machine or MAC-OS would also have some sort of terminal programs -- probably multiple ones, and probably many that are better than Hyper Terminal.

Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html

If you have or can get a Borland Delphi compiler, I recommend SerialNG, which is shareware provided by Ekkehard Domning in Germany

formatting link
You can start with the demo terminal programs and add features (such as control character translation) if you need them.

Another useful freeware tool is "portmon", which monitors all activity on a serial port and gives you a log with timestamp info:

formatting link

Both of these may be overkill for your needs. The Windows Hyperterm suggested by others usually works very well.

Paul

If Hyperterminal fails you then try this:

formatting link

John B

Tim, I wrote Term232 for uses like this. It can display in ASCII, decimal values, and hex values. It can be downloaded on our web site, on the Resources page.

formatting link

Gary Peek, Industrologic, Inc.

I use this (free) one and have been pretty happy with it.

formatting link

Bob Stephens

Ignore the suggestions to try "Hyper Terminal" - even by MS standards, it is outstandingly bad.

Far and away the best terminal emulator for serial port work is Tera Term Pro (

formatting link
), as mentioned by another poster.

If you need something more, such as monitoring the status lines or better views for binary data, try RealTerm (

formatting link
). It's more powerful, but harder to use.

These two beat anything I have seen at any price (they are both open source) - and terminal emulator programs have been an essential tool for my job for the last 13 years. If you need something beyond these, you are better off writing your own serial port software (it's not hard).

Of course, if you are using linux, there are other tools like minicom, or just "cat /dev/tty0", for capturing serial data.

Hyperterminal came from Hilgraeve, and I'm amazed that (1) they got the contract in the first place and (2) they even managed to get Microsoft to let them include a "click here to upgrade to the full version!" button in some releases.

It really is crap.

Agreed, although since it's somewhat dated it unfortunately only knows Com1-Com4 so you may end up having to shuffle ports around in Device Manager.

---Joel

On a sunny day (03 Jan 2007 18:52:03 GMT) it happened "David Brown" wrote in :

cat /dev/ttyS0 to be pedantic. That other one may get you in trouble.

If there is enough interest I will modify tera term to use ports greater than 4 (providing the author gives permission). I have had a look at the source and compiled it using VC2005 with no problems.

Hi Don,

*Be sure* that you have an approved medical device with an optoisolated RS232 as long device is connected with the pacient. If you don't, then use a laptop powered only by own batteries, without any charger, printer, or ground connection except the RS232 medical device connected to your laptop.

Real terminal could be a good choice.

greet> Hi guys:

Not necessary. Just edit the TERATERM.INI file (in the directory where you installed TeraTerm), and change the line that says

MaxComPort=4

into whatever number you want.

Thanks, I didn't even know it kept an .Ini file!

So presumably the only real limitation would be newer serial device (e.g., those that show up on USB connections) that -- on infrequent occasion -- call themselves, e.g., HSS1: rather than COM1:, right?

I guess so, but I'm not familiar with those. The ones I've worked with all allowed setting the COM: port in the device manager properties.

why bother, Here's a free on that better...

formatting link

The help file describes it quite clearly. But I too used it for years before someone in a newsgroup pointed out the MaxComPort setting.

The ones I have used have always come up as coms ports - any USB serial device that does not has bad drivers.

If you are using a lot of these USB devices, it helps to clear the old ones out of the registry on occasion, as new devices keep getting higher numbers (assuming they have different serial numbers). Windows may theoretically support 255 ports, but it gets inconvenient after a while.

You can avoid the Windows new hardware dialog for devices that only differ in their serial number (but have otherwise identical vendor/product id).

In order to do that, go to registry path HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\UsbFlags, and create a new binary entry "IgnoreHWSerNum", where is the vendor ID, and the product ID (both 4 digit hex numbers).

I have 129 serial ports and only 16 show up in Tera Term even with MaxComPort set to 129. How can I get all them to show up in Tera Term?

Arlet wrote:

let

Manager.

look in the Registry under your devices.. see what the table has translated too ? it's possible windows is not giving any more than 16 ? in any case, from the programming point of view you maybe able to use the "\\\\.\\COM17" or something like that

"I\'m never wrong, once i thought i was, but was mistaken" Real Programmers Do things like this. http://webpages.charter.net/jamie_5

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required