Creating a Virtual Serial Port in code
A question for the vb.net GURU(s) out there. Is there a way I can create a virtual serial port in vb.net in code.
Basically I want to be able to read what is being written to a com port (which will be the virtual port) reformat what is being written and send it out another com port. This is of course without buying external software or using a driver for this. I've been searching around alot over the internet but could only find external software to do this. Has anyone done this before?
Thanks in advance
Re: Creating a Virtual Serial Port in code
Its a bit messy but since there are no other ideas at the moment:
You could use a third com port with a looping cable so that what goes out of COM1 can be read via COM2 reformatted and sent out of COM3.
Re: Creating a Virtual Serial Port in code
Thanks for the input, yes I also thought of making a special RS232 cable for this but the only problem is that it would take up 2-3 com ports on a computer.
Do you happen to know if it is even possible using vb.net to utilize only one com port for this?
Re: Creating a Virtual Serial Port in code
It is possible to make a serial port loop back setup, but I've never done it with rs232, only rs422.
HTH
kevin
Re: Creating a Virtual Serial Port in code
The loopback is possible but the only issue is that you will still need to use another serial port to send the reformatted information to another device. Which means two com ports are used instead of just one.
e.g. Com1 transmits to com2, com2 transmits to device.
But unfortunately the plan was to read data being sent out one com port (the virtual port that I'm wanting to learn how to create).
Read the data being sent out the virtual port(this may need looping back).
Reformat the data and send the reformatted data out a physical com port.
If this is possible then I will be able to use only one com port.
Any one done this sort of thing before?
Re: Creating a Virtual Serial Port in code
Re: Creating a Virtual Serial Port in code
Take a look at this link, see if it helps:
http://sourceforge.net/projects/com0com/