Open source · Apache-2.0 · 0.1.0-preview.4
Modbus and OPC UA drivers for .NET
The protocol drivers inside Proxus, published as NuGet packages. Written for .NET 10 and Native AOT: no reflection, no runtime code generation, real async socket I/O, and errors that say what failed, why and what to try next.
- .NET 10, Native AOT
- No third-party dependencies
- Tested against independent stacks
Packages
Four packages, one contract
- Proxus.Drivers.Modbus
- Modbus master over TCP, with RTU and ASCII framing through a gateway or a serial stream you open. Coils, discrete inputs, holding and input registers, typed values and read planning.
- Proxus.Drivers.OpcUa
- OPC UA Binary client: SecureChannel with None, Basic256Sha256, Aes128_Sha256_RsaOaep and Aes256_Sha256_RsaPss; Session, Read, Write, Browse, subscriptions, history, methods and events.
- Proxus.Drivers.Abstractions
- Protocol-neutral values, quality, timestamps, errors and the common driver contract.
- Proxus.Drivers.Core
- Socket and timeout plumbing shared by the drivers.
Protocol guides
Quick start
Read a register and a node
Install (preview packages)
dotnet add package Proxus.Drivers.Modbus --prerelease
dotnet add package Proxus.Drivers.OpcUa --prerelease Modbus TCP: read two holding registers
using Proxus.Drivers.Modbus;
await using var client = new ModbusTcpClient(new ModbusTcpOptions
{
Host = "192.168.1.10",
Port = 502,
UnitId = 1,
ConnectTimeout = TimeSpan.FromSeconds(5),
RequestTimeout = TimeSpan.FromSeconds(5)
});
var connected = await client.ConnectAsync();
if (!connected.IsSuccess) { Console.Error.WriteLine(connected.Error.ToUserMessage()); return; }
var registers = new ushort[2];
var read = await client.ReadHoldingRegistersAsync(0, registers);
Console.WriteLine(read.IsSuccess ? $"hr:0 = {registers[0]}" : read.Error.ToUserMessage()); OPC UA: read the server clock (error handling left out)
using Proxus.Drivers;
using Proxus.Drivers.OpcUa;
await using var client = new OpcUaTcpClient(new OpcUaTcpOptions
{
EndpointUrl = new Uri("opc.tcp://192.168.1.20:4840")
});
await client.ConnectAsync();
await client.OpenAnonymousSessionAsync();
var read = await client.ReadAsync(new OpcUaNodeDescriptor(IndustrialNodeId.Numeric(0, 2258)));
Console.WriteLine($"{read.Value.Value}; quality={read.Value.Quality}"); How much is proven
Every capability says what it was tested against
Each feature carries an evidence level, from byte-exact tests in the repository to interoperability with independent implementations: libmodbus, PyModbus, open62541, asyncua and the OPC Foundation reference server. A simulator is not a physical device, and the guides say so.
- Deterministic tests: byte-exact frames, lifecycles, faults and socket behaviour.
- Independent stacks: the same scenarios against protocol software written by others.
- Native AOT: published native executables run the scenarios, not only the test host.
Where they run
The same drivers as the product
The open-source Proxus Industrial MCP Server reads devices with these packages, and Proxus uses them next to its Siemens S7, EtherNet/IP, CNC and other protocol drivers.
Questions
.NET driver questions, answered.
- Can I use them in a commercial product?
- Yes. The packages are open source under the Apache-2.0 licence, which allows commercial use, modification and redistribution.
- Does the Modbus driver support Modbus RTU?
- Yes. Set the framing to RTU or ASCII and connect through a serial-to-Ethernet gateway, or hand the driver a serial port stream you open yourself; the packages do not depend on a serial-port library.
- Which OPC UA security policies are supported?
- None, Basic256Sha256, Aes128_Sha256_RsaOaep and Aes256_Sha256_RsaPss, with Sign or SignAndEncrypt, and anonymous, user-name or X509 identity tokens.
- Are they production ready?
- The packages are previews (0.1.0-preview.4). Each capability's evidence level is published in the protocol guides, so you can see exactly what was tested and against what before you rely on it.