Testing and interop
OT Fabric tests its IEC 61850 stack against five independent implementations, in both directions: OT Fabric as client, subscriber or publisher against a reference stack, and the reference stack against the OT Fabric server, subscriber or publisher. This page lists the tools, how to run them, and exactly what the evidence covers. It describes iec61850-interop v1.6.1, go-mms v1.9.2, go-iec61850 v1.19.4 and iec61850ctl v0.13.2.
Simulators you can run locally
Section titled “Simulators you can run locally”| Simulator | What it is | Good for |
|---|---|---|
iec61850ctl server start --scl file.icd |
The go-iec61850 server driven by any ICD, CID or SCD, with optional value seeding from a live device | Trying reads, reports and controls against your own model |
go-iec61850 NewServer |
The same server embedded in your Go program, with RegisterControl, SetValue, the report engine, and GOOSE and SV publishing |
Test fixtures in Go code |
go-iec61850 goose.NewHub, sv.NewHub |
In-memory Ethernet with fault injection (loss, duplication, reordering, corruption) | GOOSE and SV tests without privileges or a network |
<stack>-ied-server (iec61850-interop) |
The IED server of libiec61850, IEC61850bean, dscsystems, iec61850-rust or cbsigma, loaded with the interop fixture | Independent C, Java, Go and Rust references |
<stack>-goose-publisher, <stack>-sv-publisher (iec61850-interop) |
GOOSE publishers of libiec61850, dscsystems, iec61850-rust and cbsigma; SV publishers of the first three | Independent traffic for a subscriber under test |
libiec61850-mms-server (iec61850-interop) |
Generic MMS server (no IEC 61850 model) | Raw MMS with go-mms |
Self-tests where an OT Fabric client talks to an OT Fabric server are useful for smoke testing but are not interoperability evidence.
iec61850-interop
Section titled “iec61850-interop”iec61850-interop publishes one container image per independent IEC 61850 stack, the fixtures every stack loads, and the JSON Lines contract every adapter command speaks. It owns the images and fixtures, not the assertions: those live in go-mms, go-iec61850 and iec61850ctl. Until v0.4.1 it was called mms-interop; it was renamed at v1.0.0 because it now covers MMS, IED services, GOOSE and Sampled Values. From v1.0.0 the image names, commands, flags, event shapes, exit codes and fixture revisions follow semantic versioning. The current release is v1.6.1 (contract 1.4): v1.3.0 added OT Fabric’s own image and results.json in the organisation’s interop-result-v1 format, v1.4.0 added cB-Sigma as a fifth reference and general interrogation reports (*-ied-reporter --trigger gi), v1.5.0 added R-GOOSE and R-SV (--transport udp, IEC TR 61850-90-5 over UDP with HMAC-SHA256) in the dscsystems image, and v1.6.0 in the libiec61850 image, so two independent stacks now exchange routable GOOSE and SV.
| Stack | Upstream | Language | Licence | Pinned at |
|---|---|---|---|---|
| libiec61850 | mz-automation/libiec61850 | C | GPL-3.0 | 1.6.2.1-89-g6e265c54 |
| IEC61850bean | beanit/iec61850bean | Java | Apache-2.0 | 1.9.0 |
| dscsystems | dscsystems/go-iec61850 | Go | GPL-3.0 | v0.6.6 |
| iec61850-rust | csp0924/iec61850-rust | Rust | MIT OR Apache-2.0 | v0.2.0 |
| cbsigma | cB-Sigma/iec61850 (client, GOOSE) and cB-Sigma/iec61850-sim (IED server) | Go | Apache-2.0 | v0.1.0, v0.1.0 |
The five share no protocol code with each other or with the OT Fabric libraries. The GPL stacks run in their own containers and are never linked into OT Fabric code.
| Image | MMS server, client | IED server, client, controller, reporter | GOOSE publisher, subscriber | SV publisher, subscriber | SVCB over MMS | R-GOOSE, R-SV over UDP |
|---|---|---|---|---|---|---|
ghcr.io/otfabric/iec61850-interop-libiec61850 |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
ghcr.io/otfabric/iec61850-interop-iec61850bean |
✓ | |||||
ghcr.io/otfabric/iec61850-interop-dscsystems |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
ghcr.io/otfabric/iec61850-interop-iec61850-rust |
✓ | ✓ | ✓ | ✓ | ||
ghcr.io/otfabric/iec61850-interop-cbsigma |
✓ | ✓ |
Every image is multi-arch (linux/amd64, linux/arm64), and every GitHub release lists the image digests and ships a manifest.json with them and the upstream pins. The authoritative capability claim, with each stack’s known limitations, is fixtures/capabilities.json in the repository. Among those found with cB-Sigma: its simulator refuses writes of ST and MX, as IEC 61850-7-2 makes them read-only, and types Enum attributes as Integer(32); and it cannot associate with iec61850-rust, which accepts only an 11-bit parameterCBB where cB-Sigma sends the 18 bits of ISO 9506:2003. libiec61850’s R-GOOSE and R-SV session (RSession) writes each APDU length two octets too long, so it refuses its own SPDUs; it sends only session version 2, no HMAC-SHA256-80, and keeps no replay window.
Fixtures
Section titled “Fixtures”| Revision | Content |
|---|---|
mms-v2 |
Generic MMS: variables of every type, named variable lists, Status, information reports, journals and a file store |
iec61850-v3 |
The IED InteropIED with logical device InteropLD: GGIO1 (SPS, DPS, controls SPCSO1/2/3 for direct, SBO and SBOw, writable SetInt1.setVal[SP]), MMXU1.TotW, MMTR1.TotVAh, dataset dsInterop, urcb01 and brcb01, and the SV control block MSVCB02 |
goose-v1 |
GoCBs gcbAll (eight members: boolean, integer, unsigned, float32, quality, UTC time, Dbpos and a nested MV structure) and gcbBool, with GSE addresses and initial and update values |
sv-v1 |
A 9-2LE merging unit (MSVCB01, 80 samples per period at 50 Hz, one ASDU) and a generic stream (MSVCB02, 1000 samples/s, four ASDUs per frame, every optional field) |
Adapter contract
Section titled “Adapter contract”A server or publisher prints one readiness line on stdout before it accepts connections or sends; client and subscriber adapters print one JSON line per operation or frame. Diagnostics go to stderr. A step a stack does not implement answers {"event":"error","code":"unsupported",...} and exits 4, so the test skips it with that reason. The full contract is in docs/contract.md.
{"event":"ready","address":"0.0.0.0:1102","fixture":"mms-v2",...}{"operation":"read","target":"InteropIEDInteropLD/GGIO1.DPS1.stVal[ST]","ok":true,"value":2}Starting an adapter by hand
Section titled “Starting an adapter by hand”V=v1.6.1R=ghcr.io/otfabric/iec61850-interopdocker run --rm -p 1102:1102 --entrypoint libiec61850-ied-server \ $R-libiec61850:$V --port 1102Then point iec61850ctl at it:
export IEC61850_HOST=127.0.0.1 IEC61850_PORT=1102 IEC61850_IED_NAME=InteropIEDiec61850ctl list lds --format jsoniec61850ctl get object --object InteropLD/MMXU1.TotW.mag.f --fc MX --format jsonGOOSE is layer 2, so both ends need NET_RAW on one named bridge:
docker network create -o com.docker.network.bridge.name=goose0 iec61850-interop-goosedocker run -i --rm --network iec61850-interop-goose --cap-add NET_RAW \ --entrypoint libiec61850-goose-publisher $R-libiec61850:$V \ --iface eth0 --gocb-ref 'InteropIEDInteropLD/LLN0$GO$gcbBool' --go-id InteropGooseBool \ --dataset 'InteropIEDInteropLD/LLN0$dsGooseBool' --app-id 0x1002 --dst 01:0c:cd:01:00:02 \ --values '[{"type":"boolean","value":false},{"type":"bit-string","value":"0000000000000"}]'On a Linux host, goose0 is a port of the same segment: sudo iec61850ctl goose sniff --iface goose0. On macOS and Windows the bridge lives in Docker Desktop’s VM, so run the other side in a container on the same network.
scripts/sv-crosscheck.sh in the repository runs a publisher and a subscriber on a bridge and checks values, header fields and loss (at most 1%) against fixtures/sv/sv.json:
scripts/sv-crosscheck.sh $R-dscsystems:$V dscsystems-sv-publisher \ $R-libiec61850:$V libiec61850-sv-subscriberTo drive the OT Fabric server with a reference client, start iec61850ctl server start --host 0.0.0.0 --port 1102 ... on the host and run the adapter with --add-host=host.docker.internal:host-gateway --host host.docker.internal.
Running the suites
Section titled “Running the suites”The suites need Docker. Tests start each adapter with docker run, wait for the readiness line, run, and tear down. Nothing has to be running beforehand. The CI of each repository pins the images by digest.
make interop # libiec61850MMS_INTEROP_STACK=dscsystems make interopmake interop-all # every peer stackTests are behind -tags=interop. Each scenario has one test body that runs against the stack selected by MMS_INTEROP_STACK; peer limitations are explicit per-stack quirks or skips with reasons.
make interop # MMS, against libiec61850 and IEC61850beanIEC61850_PEER_STACK=iec61850-rust make interopGOOSE_IFACE=goose0 make interop-goose # GOOSE and SV, Linux, needs CAP_NET_RAWThe TestLibIEC* suites are parametrized by IEC61850_PEER_STACK (libiec61850, dscsystems or iec61850-rust); IEC61850bean has its own TestBean* suites. The GOOSE and SV tests run against every stack that has the commands.
make build-nocheckmake e2e # the four client stacks and selfIEC61850CTL_E2E_STACKS=goose-libiec61850 make e2eIEC61850CTL_E2E_STACKS=sv-dscsystems make e2eIEC61850CTL_E2E_STACKS=all make e2e # every CI directionThe e2e package runs the built binary as a black box. e2e/testdata/interop.lock.json pins the images by commit and digest.
A test skipped without a registered limitation fails CI.
go-mms and go-iec61850 pin the iec61850-interop v1.6.1 images by digest, and iec61850ctl the v1.4.0 images. go-mms has no cbsigma suite: that image has no generic MMS server or client.
What has been validated
Section titled “What has been validated”go-mms
Section titled “go-mms”Every scenario runs in both directions, go-mms client against the stack’s MMS server and the stack’s MMS client against the go-mms server: association, Identify, Status, GetNameList, type descriptions, reads and writes of every fixture type with alternate access, named variable lists in domain, VMD and association scope, information reports, file services (directory, open, read with initial position, delete, rename, ObtainFile), journals, and abort in both directions.
| Stack | Result | Notes |
|---|---|---|
| libiec61850 | 121 pass | Its server sends only the named-list form of information reports and ignores the FileOpen initial position; both are asserted, not skipped |
| dscsystems | 113 pass, 8 skip | Its client reads and writes whole variables only, and has no association-specific or writable named variable lists |
| iec61850-rust | 121 pass | Its documented limits (ObtainFile, named variable list deletion, in-memory file store) are asserted |
| IEC61850bean | 14 pass | IED server tests only; the image has no generic MMS server or client |
Extending this suite to every public method found the FileDirectory bug (go-mms issue #2) and fifteen further wire and behaviour bugs, all fixed in go-mms v1.1.0.
go-iec61850
Section titled “go-iec61850”| Area | libiec61850 | IEC61850bean | dscsystems | iec61850-rust | cbsigma |
|---|---|---|---|---|---|
| Go client → stack server: browse, read and write, datasets | ✓ | ✓ | ✓ | ✓ | ✓ |
| Stack client → Go server: browse, read and write, datasets | ✓ | ✓ | ✓ | ✓ | ✓ |
| URCB reporting, both directions | ✓ | ✓ ¹ | ✓ | ✓ | ✓ |
| Direct and SBO control, both directions | ✓ | ✓ | ✓ | ✓ | ✓ |
| SBOw (enhanced security) | ✓ | skip ² | ✓ ³ | ✓ | ✓ |
| CDC reads of DPS and BCR, both directions | ✓ | ✓ | ✓ | ✓ | ✓ |
| MMS file services | ✓ | ✓ | ✓ | not in stack | not run ⁵ |
| GOOSE: Go publisher → stack subscriber | ✓ | n/a | ✓ | ✓ | ✓ |
| GOOSE: stack publisher → Go subscriber, validated from SCL | ✓ | n/a | ✓ | ✓ | ✓ |
| GOOSE: Go IED server GoCB → stack subscriber | ✓ | n/a | ✓ | ✓ | ✓ |
| SV: Go publisher → stack subscriber, 9-2LE and generic | ✓ ⁴ | n/a | ✓ | ✓ | n/a ⁵ |
| SV: stack publisher → Go subscriber, validated from SCL | ✓ | n/a | ✓ | ✓ | n/a ⁵ |
| SV: Go IED server MSVCB → stack subscriber | ✓ | n/a | ✓ | ✓ | n/a ⁵ |
| MSVCB over MMS, Go client → stack server | ✓ | n/a | ✓ | not in stack | n/a ⁵ |
| R-GOOSE and R-SV over UDP, both directions | ✓ ⁶ | n/a | ✓ | n/a | n/a |
¹ The IEC61850bean server does not support URCB reservation; that negative test is skipped.
² The IEC61850bean server does not expose SBOw[CO] as writable.
³ The dscsystems controller waits for CommandTermination, which the go-iec61850 server sends since v1.1.0. That test found the gap.
⁴ libiec61850’s SV subscriber accepts smpMod only as one octet and drops ASDUs with the two-octet form that go-iec61850 and libiec61850’s own publisher send, so the generic stream is skipped for that subscriber and the 9-2LE stream is checked. The go-iec61850 subscriber accepts both widths, which iec61850-rust needs.
⁵ The cbsigma image adapts the IED server, client, controller, reporter and GOOSE commands of cB-Sigma’s stack. It has no generic MMS server or client, and its SV commands are not adapted (cB-Sigma/iec61850 has an SV publisher).
⁶ Six profiles (session versions 1 and 2, each with HMAC-SHA256-80, -128 and -256) run against dscsystems in both directions. libiec61850 interoperates with HMAC-SHA256-128 and -256 towards it and version 2 with HMAC-SHA256-128 from it; the rest are its known limitations, asserted.
The suites also cover BRCB EntryID resume and overflow, the integrity period (skipped against iec61850-rust, which enforces the fixture’s fixed TrgOps and IntgPd), quality and timestamps, multi-client scenarios, negative cases, GOOSE retransmission and supervision timeouts, and SV header fields, optional fields and loss accounting. The per-stack matrix and every deviation are in go-iec61850’s COMPATIBILITY.md and INTEROP.md.
iec61850ctl end to end
Section titled “iec61850ctl end to end”The CLI suite runs the built binary against all five stacks, in 23 CI jobs:
- Client journeys against every IED server: browse and reads against expected values, datasets, RCB discovery, URCB GI subscription in JSON Lines,
control operateon SPCSO1/2/3 with--confirm-ref,set objectwith--verify, BRCB purge and resume by EntryID, and negative cases. SBOw against IEC61850bean and BRCB reads against iec61850-rust are asserted as expected failures. - Reverse journeys: every stack’s controller, reporter and reader against
iec61850ctl server start. - GOOSE, against libiec61850, dscsystems, iec61850-rust and cbsigma: each stack’s publisher into
goose subscribeandgoose sniff, andgoose publishinto each stack’s subscriber, with both states, every value, the control block fields and the supervision timeout checked. - Sampled Values, against libiec61850, dscsystems and iec61850-rust and for both streams:
sv subscribeandsv sniffagainst each publisher andsv publishinto each subscriber, with value, header and loss assertions, plussv svcb getofMSVCB02over MMS.
Test your stack against OT Fabric’s
Section titled “Test your stack against OT Fabric’s”ghcr.io/otfabric/iec61850-interop-otfabric is go-iec61850 behind the same container contract as the reference images (adapter name otfabric), so you can test your IEC 61850 client, server, GOOSE or SV code against it, the way OT Fabric tests its own stack against yours:
docker run -d --name go-iec61850 -p 127.0.0.1:1102:1102 \ --entrypoint otfabric-ied-server ghcr.io/otfabric/iec61850-interop-otfabric:<tag>docker logs -f go-iec61850 # {"event":"ready",...,"adapter":"otfabric",...}The image has every command of the contract under the prefix otfabric-: otfabric-mms-server and otfabric-mms-client (go-mms), and otfabric-ied-*, otfabric-goose-* and otfabric-sv-* (go-iec61850). It loads the same fixtures as the references. It does not take --transport udp yet, so R-GOOSE and R-SV are not in it. --version on any command prints go-iec61850, its commit and the go-mms in the image.
Its tags are go-iec61850 versions, such as v1.19.4, and latest; a rebuild of a version replaces its tag, so pin the digest when you need an exact build. It is not part of a iec61850-interop release or its manifest.json, and it reports independentEngine: false: a result against it tells you about your stack, not something independent about OT Fabric’s. A result you publish, naming your implementation and version, is independent evidence. Like the references, it is for testing only and has no place on a network you do not control.
Not yet validated
Section titled “Not yet validated”- Physical IEDs and merging units from any vendor, and commercial IEC 61850 stacks.
- Conformance testing to the UCA test procedures.
- SV timing under real load: the publisher is software-timed and has no PTP or 1PPS synchronization.
- Edition 2.1 (2007B4) features beyond those listed.
- Dynamic dataset creation on the server (not implemented).
- Setting group value banks and the interlocking and synchrocheck conditions against an independent stack: no reference image exercises the SGCB services or sends Check bits, so these have go-iec61850’s own tests only.
- IEC 62351-6 for layer-2 GOOSE and SV (not implemented), and encryption on R-GOOSE and R-SV.