BACnet.Serial 4.0.0-beta.1

This is a prerelease version of BACnet.Serial.
dotnet add package BACnet.Serial --version 4.0.0-beta.1
                    
NuGet\Install-Package BACnet.Serial -Version 4.0.0-beta.1
                    
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="BACnet.Serial" Version="4.0.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BACnet.Serial" Version="4.0.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="BACnet.Serial" />
                    
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 BACnet.Serial --version 4.0.0-beta.1
                    
#r "nuget: BACnet.Serial, 4.0.0-beta.1"
                    
#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 BACnet.Serial@4.0.0-beta.1
                    
#: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=BACnet.Serial&version=4.0.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=BACnet.Serial&version=4.0.0-beta.1&prerelease
                    
Install as a Cake Tool

.NET library for BACnet

build NuGet License: MIT

A standalone BACnet protocol stack for .NET.

The stack was originally developed by Morten Kvistgaard — with significant contributions from F. Chaxel, Steve Karg, and the BACnet Stack (in C) — as part of YABE (Yet Another BACnet Explorer). This repository was forked from the YABE SourceForge SVN and is maintained here as an independent library on NuGet; it is a separate codebase from YABE (YABE keeps its own copy of the stack).

Packages

Package Description
NuGet Core stack — pure-managed BACnet/IP, MS/TP & PTP protocol, encode/decode. No native dependencies.
NuGet pcap-based BACnet/Ethernet (ISO 8802-3) transport (SharpPcap / PacketDotNet).
NuGet Physical serial-port transport (System.IO.Ports) for MS/TP and PTP.
NuGet Optional bridge to route the stack's logs to Common.Logging.

Supported target frameworks

Package net48 netstandard2.0 net8.0 net10.0
BACnet (core)
BACnet.Ethernet
BACnet.Serial
BACnet.Logging.CommonLogging

netstandard2.0 covers .NET 6/7 and other runtimes.

Install

dotnet add package BACnet
# optional native transports:
dotnet add package BACnet.Ethernet
dotnet add package BACnet.Serial

Getting started

A minimal Who-Is / read a property over BACnet/IP:

using System.IO.BACnet;

var client = new BacnetClient(new BacnetIpUdpProtocolTransport(0xBAC0));
client.OnIam += (sender, adr, deviceId, maxApdu, seg, vendorId)
    => Console.WriteLine($"Found device {deviceId} at {adr}");
client.Start();
client.WhoIs();

The Examples/ folder has runnable samples — basic read/write, a device/server, COV subscription, alarm/event handling, BBMD, a serial device, and more.

Logging

The stack uses Microsoft.Extensions.Logging. By default logging is a no-op; wire a factory once and everything logs through it:

using Microsoft.Extensions.Logging;

BacnetLogging.Factory = LoggerFactory.Create(b => b.AddConsole());

Console, Serilog, NLog, and log4net all work via their MEL providers. If you already use Common.Logging, add the BACnet.Logging.CommonLogging package and call b.AddCommonLogging().

Upgrading from 3.x to 4.0

4.0 has a few breaking changes — see MIGRATION.md for details:

  • Logging moved from Common.Logging to Microsoft.Extensions.Logging (the Log property is now ILogger).
  • Native transports split into optional packages: pcap → BACnet.Ethernet, serial → BACnet.Serial. The MS/TP and PTP protocols stay in the core; use SerialTransport.Mstp(...) / .Ptp(...) from BACnet.Serial.

GitHub Packages

Releases are also published to GitHub Packages. To restore from there, add the source https://nuget.pkg.github.com/ela-compil/index.json (a GitHub PAT with read:packages is required).

Contributing

See CONTRIBUTING.md. Licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 is compatible.  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. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0-beta.1 0 7/2/2026