OSDP for .NET, a few lines away

A mature, Apache-licensed .NET implementation of the Open Supervised Device Protocol, in production for years. Install the NuGet package, open a connection, and start talking to readers.

Everything a .NET access control application needs

OSDP is the SIA standard for communication between access control field devices and the panels that manage them. OSDP.Net puts the whole protocol behind a clean, async .NET API, so you can focus on your application instead of framing, sequencing, and encryption.

  • Proven in production. A mature library that has been running in deployed systems for years.
  • Secure Channel built in. Encrypted, authenticated sessions, including setting unique per-device keys.
  • Async commands. LEDs, buzzers, outputs, text, file transfer, biometrics, PIV data, and more, each a single awaitable call.
  • Events for everything that happens. Card reads, keypad entries, input status changes, NAKs, and connection changes arrive as .NET events.
  • Many devices, one connection. Manage multiple peripheral devices on the same RS-485 bus from one control panel.
  • Pluggable transports. Serial is included; implement IOsdpConnection for anything else.

Up and running in three steps

  1. Install the package

    Add OSDP.Net from NuGet to any project targeting .NET 8 or later, or .NET Framework 4.6.2 or later.

  2. Start a connection

    Create a ControlPanel, register your event handlers, and open a serial connection to the bus.

  3. Add devices and send commands

    Add each peripheral by address, then call commands such as LED, buzzer, and output control.

# .NET CLI
dotnet add package OSDP.Net

# or the Package Manager Console
PM> Install-Package OSDP.Net
// register events before starting the connection
var panel = new ControlPanel();
panel.ConnectionStatusChanged += OnConnectionChanged;

var id = panel.StartConnection(
    new SerialPortOsdpConnection("COM3", 9600));

panel.AddDevice(id, address: 0,
    useCrc: true, useSecureChannel: true);

await panel.ReaderBuzzerControl(id, 0,
    new ReaderBuzzerControl(0, ToneCode.Default, 2, 2, 1));

Try it without compiling code

Self-contained ACU and PD test consoles are available for download. They are a great way to learn OSDP and try OSDP.Net. Connect using a USB to RS-485 adapter and start exercising devices.

Downloads need JavaScript and a free Z-bit account. Need a copy another way? Email qubit@z-bitco.com.

ACU Console

Act as a control panel: poll devices, send commands, and watch replies and events.

Beta

PD Console

Act as a peripheral device to test a control panel's OSDP implementation.

Building on OSDP.Net?

Z-bit Systems built and maintains OSDP.Net. If you need help integrating it, or want to collaborate on the library, get in touch.

Talk to us