如何使用连接到串口 [英] How to connect to serial port using

查看:74
本文介绍了如何使用连接到串口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在c#中创建一个连接到串行端口(Modem)的应用程序。我使用wmi代码生成器代码打开com连接但是当我运行时,结果为null因此为空并且它不显示错误。

Hi I am making an application in c# which connects to a serial port(Modem). I am using wmi code generator codes to open com connections but when I run, the result is null thus is empty and it does not display an error.

推荐答案

使用System.IO.Ports.SerialPort类用于访问COM端口。更多信息: https://msdn.microsoft .com / zh-cn / library / system.io.ports.serialport%28v = vs.110%29.aspx [ ^ ]
Use the System.IO.Ports.SerialPort class to acces the COM ports. More info: https://msdn.microsoft.com/en-us/library/system.io.ports.serialport%28v=vs.110%29.aspx[^]


这篇关于如何使用连接到串口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆