Warning
This library is early access and subject to frequent change.
A native TypeScript/Node implementation of the Sig-Net® protocol SDK, ported from WayneHowell/public-sig-net-sdk.
Sig-Net® Designed by and Copyright Singularity (UK) Ltd
import { buildDMXPacket, calculateMulticastAddress, deriveSenderKey, parseK0Hex, parseTuidHex, sendMulticast } from 'node-sig-net'
const k0 = parseK0Hex('52fcc2e7749f40358ba00b1d557dc11861e89868e139f23014f6a0cfe59cf173')
const senderKey = deriveSenderKey(k0)
const dmxData = Buffer.alloc(512)
const tuid = parseTuidHex('534C00000001')
const packet = buildDMXPacket({
universe: 517,
dmxData,
tuid,
endpoint: 1,
mfgCode: 0,
sessionId: 1,
seqNum: 1,
senderKey,
messageId: 1,
})
await sendMulticast(packet, calculateMulticastAddress(517))Run the receiver in one terminal:
yarn example:receiverRun the sender in another terminal:
yarn example:senderBoth examples use universe 1, the test K0/TUID constants, and the folded
multicast address for that universe. If your OS needs an explicit multicast
interface for receive, set SIGNET_IFACE, for example:
SIGNET_IFACE=192.168.1.20 yarn example:receiver