|
-
Aug 28th, 2007, 11:27 PM
#1
Thread Starter
Lively Member
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
-
Aug 29th, 2007, 07:13 AM
#2
Lively Member
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.
-
Aug 29th, 2007, 05:24 PM
#3
Thread Starter
Lively Member
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?
-
Aug 29th, 2007, 05:51 PM
#4
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
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Aug 30th, 2007, 12:22 AM
#5
Thread Starter
Lively Member
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?
-
Sep 1st, 2007, 02:49 AM
#6
Thread Starter
Lively Member
Re: Creating a Virtual Serial Port in code
-
Sep 1st, 2007, 07:08 AM
#7
Re: Creating a Virtual Serial Port in code
Take a look at this link, see if it helps:
http://sourceforge.net/projects/com0com/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|