Read com port

I am trying to interact with a cdc card reader that outputs to a virtual COM port. How can I open a stream for reading from a COM port?

+3
source share
1 answer

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

It is available as a form component in the toolbar in the toolbar → Components → SerialPort

In the properties you can choose which COM port you want to connect to

Since your question is about a stream object, I think you can use SerialPort.BaseStream and pass it to StreamWriter / StreamReader

+3
source

Source: https://habr.com/ru/post/1699584/


All Articles