System.IO.Ports
package provides synchronous serial port file resource. Additionally, the functionality of this class can be wrapped in an internal
Stream
object, accessible through the
BaseStream
property, and passed to classes that wrap or use streams.
Key Features
synchronous and event-driven I/O
access to pin and break states
access to serial driver properties
access to
Stream
object through the
BaseStream
property
How to Use
using System.IO.Ports;
// Provides list of available serial ports
string[] portNames = SerialPort.GetPortNames();
// First available port
string myPortName = portNames[0];
int baudRate = 9600;
SerialPort sp = new SerialPort(myPortName, baudRate);
sp.Open();
sp.WriteLine("Hello World!");
System.IO.Ports is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
Lightweight and fast client and server implementation of the Modbus protocol (TCP/RTU, Sync/Async).
This is an IoT device communication protocol implementation client, which will include common industrial communication protocols such as mainstream PLC communication reading, ModBus protocol, and Bacnet protocol. This component is open source and free for life, using the most relaxed MIT open source agreement, you can modify and commercial use at will (commercial use please evaluate and test). 这是一个物联网设备通讯协议实现客户端,将会包括主流PLC通信读取、ModBus协议、Bacnet协议等常用工业通讯协议。本组件终身开源免费,采用最宽松的MIT开源协议,您可以随意修改和商业使用(商业使用请做好评估和测试)。