Skip to content

Testing and interop

IEC 102 has the thinnest open ecosystem of the IEC 60870-5 family. Every open implementation is a controlling station for the Spanish REE profile, and there is no open, licensed meter to test against. That shapes what can be shown.

go-iec60870-5 tests the IEC 102 codec against byte strings from recorded meter traffic (749 frames, every one decoded and encoded back octet for octet) and from public test vectors, fuzzes the decoder, runs the client against the server end to end over an in-memory line, and adds hostile-peer and chaos tests on the shared link layer.

iec102ctl runs every command against go-iec60870-5’s own meter (make e2e in iec60870ctl) and its simulated meter against the reference client below.

iec60870-5-interop v0.5.0 has one IEC 102 reference image, ghcr.io/otfabric/iec60870-5-interop-iec102-gisce: the controlling station of gisce/iec870ree v0.14.1 (Python, AGPL-3.0), client only, with a TCP transport of its own. It reads product information, the clock and integrated totals, sets the clock and reads tariffs, inside an REE session. Its status is experimental: there is no independent IEC 102 stack with a meter to run it against. Since v0.5.0 it also runs against OT Fabric’s own meter image (below), which shows both keep the contract but is not independent evidence.

ghcr.io/otfabric/iec60870-5-interop-iec102-otfabric is go-iec60870-5 behind the same container contract as the reference images (adapter name otfabric), new with iec60870-5-interop v0.5.0, so you can test your IEC 102 controlling station or meter against it, the way OT Fabric tests its own stack against yours:

Terminal window
docker run -d --name go-iec102 -p 127.0.0.1:2401:2401 \
ghcr.io/otfabric/iec60870-5-interop-iec102-otfabric:<tag> server
until docker exec go-iec102 test -f /run/iec60870-5-interop/ready; do sleep 0.1; done

It is the first IEC 102 image of the suite with a meter: the go-iec60870-5 integrated total station serves the baseline fixture (integrated totals, the clock, product identification and tariffs, standard and REE profile) on port 2401, and client <operation> runs go-iec60870-5’s controlling station against your meter. The gisce controlling station runs every IEC 102 case of the suite against it. Being OT Fabric’s own meter, that run shows that both keep the contract, not that the meter is right about IEC 102.

Its tags are go-iec60870-5 versions, such as v0.5.1, and latest; a rebuild of a version replaces its tag, so pin the digest when you need an exact build, and version prints the versions inside the image. It is not part of an iec60870-5-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.

Direction Evidence
gisce/iec870ree against the go-iec60870-5 meter (REE profile) 18 checks pass, every result compared with the fixture (make interop-iec102)
gisce/iec870ree against the iec102ctl simulated meter 19 checks pass
go-iec60870-5 and iec102ctl as controlling station Against their own meter and recorded traffic only: no independent peer exists
  • The controlling station against an independent meter. None is available under an open licence; reports from real meters, with the --debug trace, are welcome.
  • One-octet link and common addresses, and the single character E5h: gisce uses two octets and cannot parse E5h.
  • The text of the standard. We do not hold IEC 60870-5-102 or the REE specification; see the library’s IEC 102 interoperability notes for the source of every field.
  • Signatures, class 1 data and shared lines: not implemented.