Haukcode.SigNet
0.1.7
See the version list below for details.
dotnet add package Haukcode.SigNet --version 0.1.7
NuGet\Install-Package Haukcode.SigNet -Version 0.1.7
<PackageReference Include="Haukcode.SigNet" Version="0.1.7" />
<PackageVersion Include="Haukcode.SigNet" Version="0.1.7" />
<PackageReference Include="Haukcode.SigNet" />
paket add Haukcode.SigNet --version 0.1.7
#r "nuget: Haukcode.SigNet, 0.1.7"
#:package Haukcode.SigNet@0.1.7
#addin nuget:?package=Haukcode.SigNet&version=0.1.7
#tool nuget:?package=Haukcode.SigNet&version=0.1.7
Haukcode.SigNet
A cross-platform .NET library for Sig-Net, the secure CoAP-based protocol for DMX512 lighting control over IP: the Sender role and the receive side of the Node role.
What is Sig-Net?
Sig-Net carries DMX512 universes as CoAP NON POST messages over UDP 5683. Every packet is authenticated with HMAC-SHA256 using keys derived from a 256-bit root key, and protected against replay by a per-device session id and per-stream sequence numbers. Universes are folded onto 109 multicast groups (239.254.0.1 to 239.254.0.109).
Features
- Passphrase validation, PBKDF2 root key and HKDF role keys, verified against the spec's Appendix G test vectors
- Levels with universe or per-slot priority, sync, universe announcements
- Discovery: on-boot notification, poll replies, security event reports
- Verified receive with anti-replay, sync hold-and-release, stream loss events
- Sharded sending and kernel receive timestamps through Haukcode.HighPerfComm
- .NET 8.0, 9.0 and 10.0
Quick Start
using Haukcode.SigNet;
using Haukcode.SigNet.Keys;
using System.Net;
var tuid = Tuid.CreateDynamic(manufacturerId: 0x7FF0);
var deviceInfo = new SigNetDeviceInfo(SoemCode.Create(0x7FF0, 0x0001), "My Product", "Stage left");
using var keys = SigNetKeys.FromPassphrase(passphrase, tuid);
// sessionIdStore: your ISessionIdStore; the session id must be persisted (spec 8.3)
using var client = new SigNetClient(keys, tuid, deviceInfo, sessionIdStore, IPAddress.Parse("192.168.1.10"),
channelWriter: packet =>
{
Console.WriteLine($"u{packet.Universe} from {packet.SenderId}");
return Task.CompletedTask;
});
client.JoinUniverse(1);
await client.SendLevels(1, new byte[512], priority: 100);
await client.SendSync();
Received packets are reused once the writer returns; keep packet.Clone() if you queue them.
Key Methods
SendLevels()/SendSync(): transmit; the first frame for a universe announces itStopUniverse()/StopAllUniverses(): announce TID_UNIVERSE LeaveJoinUniverse()/DropUniverse(): receive a universe as inputJoinUniverseForTrigger()/DropUniverseForTrigger(): receive a universe for triggersOnUniverseLost,OnSecurityEvent,GetVerifyCounts(): monitoringLevelRefreshPolicy: the spec 10.6.3 repeat and 1 Hz keep-alive rulesSigNetBeacon: Beacon Mode for a device that is not onboarded yet
License conditions
Sig-Net is owned by Singularity (UK) Ltd and licensed royalty-free. Products built with this library must include the attribution "Sig-Net® Designed by and Copyright Singularity (UK) Ltd.", report a correct SoemCode (your ESTA manufacturer id in the upper 16 bits), and follow the trademark guidelines at https://sig-net.net/. This library is MIT licensed and not affiliated with or endorsed by Singularity (UK) Ltd.
Documentation
- GitHub repository, with implementation notes and open spec questions
- Sig-Net specification
| Product | Versions 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 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 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. |
-
net10.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.1.30)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
-
net8.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.1.30)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
-
net9.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.1.30)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
0.1.0 - Initial implementation against Sig-Net Protocol Framework V1.14
0.1.x - Trigger subscriptions, receive diagnostics, StopAllUniverses, SigNetBeacon