Friday, July 31, 2009

Test a serial communication piece of code?

I'm preparing to test writing a sets of serial communication codes in C++ to read and write.





It just struck me, is it possible to create two virtual com port on the same pc and running two program that I have written to have them talk to each other just to see if they respond





How would I go about setting up virtual port?





Programming language used is c++. Libraries are open source

Test a serial communication piece of code?
If the OS is Windows 2000 or later, you would have to write two drivers. ALL hardware is virtual. I believe there's a freeware virtual serial port out there, but I don't have any links. (You might also be able to mung serproxy into something you could use - it's a serial-to-IP address interface.)





A better idea would be to run a dumb terminal (or a computer running Hyperterminal or equivalent) to the test computer through a null-modem if necessary.


No comments:

Post a Comment