How do I go about sending and receiving data from a USB comm port using C#?
The requirements for communication are:
- 115.2 kBaud
- 8-bit character size
- 1 stop bit
- No parity
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A USB comm port appears to the system the same as an onboard port. Use the SerialPort class.
You can find the available ports by calling SerialPort.GetPortNames. If that doesn’t appeal to you, you can also access the port as a file, but that is much more complex and there are few reasons to do so. See the documentation for CreateFile for more.