Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,i'm looking for a program that can simulate a serial device, so that when i run my code, which sends data thru the COM port, I can see what's being sent out of the COM port without an actual device connected to my computer.
I've been searching for such programs.Now my question is what would you call such a program?? a Serial port emulator? or Virtual serial port emulator?

I kinda remember seeing someone else used Hyperterminal to do things like this(i may be wrong), but Hypertrm is not supported in Win7 any more. Any suggestions appreciated.
------------
Ok. I meant to ask for usable and LEGIT ones..I don't feel confident just grabbing a program that comes out first on google search
Posted
Updated 6-Jul-12 6:10am
v2
Comments
[no name] 6-Jul-12 12:19pm    
"what would you call such a program"... usually called a "sniffer"
SandiegoSSD 6-Jul-12 14:43pm    
i just looked that word up in Urbandict. wow
[no name] 6-Jul-12 15:00pm    
Why on earth would you look that word up there? Couldn't find a legitimate source? :-)
SoMad 6-Jul-12 20:23pm    
This site mentions alternatives to Hyperterminal, including just copying the 2 files from an XP installation. HyperTerminal Alternatives for Windows 7[^]

Soren Madsen

I don't actually use any of these serial port sniffers, so I am afraid I cannot recommend one. If you are dead set on this approach, please just ignore this post.

I prefer doing end-to-end verification of the data and normally connect two serial ports with a null modem cable, send stuff out one of the ports and read what comes in through the other port.

I made a comment about HyperTerminal, but that is actually not what I would recommend you use. Instead I think you should consider writing your own little program for this purpose, especially if you are going to be interfacing to many different devices through serial ports.

I developed a tool like this for my company. It will read incoming data from a serial port, display it on screen, tag the data blocks with a time stamp and store them to file. This makes it possible to record data and "play it back" at a later time, mimicking the original data flow.
If you develop a tool like this yourself, you obviously do not have to add playback functionality to it. You can put just the amount of functionality in it that you need (and your boss will let you spend time on). In my case, the time I spent working on the tool was well worth it and as I recall, it helped flush out a couple of bugs we had in our serial port library.

If you just need to verify the communication this one time, there are lots of sample programs with code you can use for displaying incoming data from a serial port - there are several good ones here on CP.

Soren Madsen
 
Share this answer
 
Comments
Espen Harlinn 11-Jul-12 4:01am    
Good suggestions :-D
SoMad 11-Jul-12 4:19am    
Thanks Espen.
We also use our tool to acquire data in the field by having someone hook up a laptop running the tool and recording serial data for a given time period. Later the recorded file(s) is sent to our SW department and we can do whatever development we need to do in-house without ever having a Software Engineer in the field and often without ever actually seeing the device in action.

Soren Madsen
Espen Harlinn 11-Jul-12 4:22am    
Well, that sounds pretty useful :-D
This might help: Virtual Serial Port Driver[^]

If you have two serial ports on your computer, Sorens' suggestion is probably cheaper.

Best regards
Espen Harlinn
 
Share this answer
 
Comments
SoMad 11-Jul-12 4:13am    
That actually looks interesting to play around with.
If you don't have two serial ports on the motherboard, you can buy one of the USB COM port cables, but so far I only trust the ones that use the FTDI driver (although it has been a while since I ran comparison tests between various brands).

Soren Madsen
Espen Harlinn 11-Jul-12 4:17am    
Thank you, Soren :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900