Longbow.SerialPorts 9.0.2

Prefix Reserved
dotnet add package Longbow.SerialPorts --version 9.0.2
                    
NuGet\Install-Package Longbow.SerialPorts -Version 9.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Longbow.SerialPorts" Version="9.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Longbow.SerialPorts" Version="9.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Longbow.SerialPorts" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Longbow.SerialPorts --version 9.0.2
                    
#r "nuget: Longbow.SerialPorts, 9.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Longbow.SerialPorts@9.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Longbow.SerialPorts&version=9.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Longbow.SerialPorts&version=9.0.2
                    
Install as a Cake Tool

Longbow.SerialPorts

Longbow.SerialPorts is a .NET-based serial port communication extension library. It provides easy-to-use serial port operation interfaces, supports asynchronous data transmission and reception, port management, and is compatible with multiple platforms and frameworks (net6.0, net7.0, net8.0, net9.0).

Features

  • Simple and user-friendly serial port communication interface ITcpSocketFactory
  • Supports asynchronous open, close, send, and receive operations
  • Configurable serial port parameters (port name, baud rate, data bits, parity, stop bits, etc.)
  • Dependency injection extension (AddSerialPortFactory)
  • Compatible with multiple .NET versions

Getting Started

Installation

Install via NuGet:

dotnet add package Longbow.SerialPorts

Usage Example

var factory = serviceProvider.GetRequiredService<ITcpSocketFactory>();
var client = factory.GetOrCreate("com1", options => 
{
    options.PortName = "COM1";
	options.BaudRate = 9600,
	options.DataBits = 8,
	options.Parity = Parity.None,
	options.StopBits = StopBits.One
});
await client.OpenAsync();

var data = new byte[] { 0x01, 0x02, 0x03 };
await client.SendAsync(data);

var received = await client.ReceiveAsync();
await client.CloseAsync();

Dependency Injection

services.AddSerialPortFactory();

API Overview

  • ISerialPortClient: Serial port communication interface with async operations
  • SerialPortOptions: Serial port parameter configuration class

License

Apache-2.0

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Longbow.SerialPorts:

Package Downloads
Longbow.Modbus

Longbow extensions of Modbus

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.0.2 319 9/19/2025
9.0.1 412 9/16/2025
9.0.0 128 9/13/2025