tags:

views:

110

answers:

1
+3  Q: 

reading a com port

I'm trying to interface with a cdc card reader which outputs to a virtual com port. How does one go about opening a stream to read from a com port?

+2  A: 

You can use the SerialPort from System.IO.Ports.SerialPort

It is available as a Form component in the Toolbox under Toolbox->Components->SerialPort

In the properties, you can select which COM port you want to connect to

Since your question relates to a stream object I think you can use SerialPort.BaseStream and cast it into a StreamWriter/StreamReader

Eric