4
Answers

Controlling COM ports

kyle

kyle

16y
3.5k
1
Hello all,

I have an embedded PC with 8 serial ports.  (COM1 through COM8).  The application running on this PC defaults to COM1 and you cannot change that.  I need to look at data on the other ports.  In other words, I need to tell the embedded PC that COM 4 is COM1.  I have been doing this with a VB program that I wrote calling batch files using a Change Port command for example if I want to look at the data on COM 5 the VB program runs a batch file containing a [chgport COM1=COM5].  When I need to look at data on COM1 the VB program runs a batch file with [chgport /D COM1]. 

The above is not working very well.  It does work but is not reliable.  Is there a method within C# to redirect the serial ports?  Again, the application running on the embedded PC (OS is XPE) will only look at COM1 so I have to redirect the data from another port to COM1.

Thank you in advance for your time and help.
Answers (4)