Skip to content

full: IEC 61850 MMS server on TCP 102 beside GOOSE - #36

Merged
tkeairns merged 2 commits into
mainfrom
feat/mms-server
Dec 2, 2026
Merged

tkeairns merged 2 commits into
mainfrom
feat/mms-server

Conversation

@tkeairns

@tkeairns tkeairns commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

What

The combined image serves over IEC 61850-8-1 MMS the logical device its GOOSE already publishes from.

  • lib/mms: a server for one logical device from a const table, as lib/goose publishes one. Discovery, reads at any level, data sets, buffered and unbuffered report control blocks, identify and status, two clients at once. No controls, files, setting groups or TLS. The core is free of I/O; the Zephyr glue is one thread on sockets.
  • nodes/full: ds_pdu through brcb_pdu01 (buffered), ds_dcdc through urcb_dcdc01 (unbuffered), every data object with q and t. zelosfull.cid is the station file for both GOOSE and MMS.
  • snippets/mms, part of the full image.
  • testing/suites/mms: the model against the station file, a read with quality and time, unbuffered reports of the DC-DC, and a PDU change made while no client was connected replayed to the client that resumes. In the core list.
  • testing/suites/goose: the capture socket joins the two multicast addresses, as a subscriber does. A network card drops multicast nobody asked it for, so on hardware the suite saw gcb_pdu and not gcb_dcdc. A test that fails with simulation on now turns it off again.

Why

A bench that publishes GOOSE can now be read the way a station client reads an IED: browsed, polled and reported, from one device.

Tested

  • tests/lib/mms on native_sim: 9 cases. just twister: 85 of 85 cases, every node built.
  • Core on a host with sanitizers against an MMS client: 19 scenarios (browse, reads, both blocks, integrity, two clients, a third refused, a held block, resume by EntryID, a stale EntryID, any TCP split, small PDUs, malformed input, a stalled reader, 20 000 reports in order), a mutation fuzzer, and a protocol dissector over the captures.
  • A second, independent client library: browse, reads, types, data sets, both blocks, on the host and on the board.
  • Renode bench: mms, goose, the DoIP entity, eth, SOME/IP and the coexistence suite.
  • NUCLEO-H753ZI: the mms suite 4 of 4; eth, the DoIP entity and coexistence; 20 changes while away resumed by EntryID in order, 40 overflowing the 32-entry buffer flagged and replayed in order; a client that stops reading dropped after 1.5 s while the other waits 0.5 s once; ECUReset closes an associated client within 40 ms; keepalive probes every 5 s to an idle client; the goose suite 2 of 2, which failed there before its socket joined the multicast addresses.

Notes

  • The glue bounds a send itself, at 500 ms. A blocking socket send waits CONFIG_NET_SOCKET_MAX_SEND_WAIT (10 s) unless CONFIG_NET_CONTEXT_SNDTIMEO is built in, which this image does not set.
  • The node has no clock: time stamps are time since boot, flagged clock not synchronized.

Not run

  • A client that disappears without a FIN (needs a pulled cable); only the probes were observed.
  • The MMS thread's stack use is sized (4 KB), not measured.

lib/mms: a server for one logical device from a const table, as lib/goose
publishes one. Discovery, reads at any level, data sets, one buffered and
one unbuffered report control block, two clients at once, identify and
status. No controls, files, setting groups or TLS. The core is free of
I/O (tests/lib/mms); the Zephyr glue is one thread on sockets, with a
bounded send and TCP keepalive.

nodes/full serves what its GOOSE publishes: ds_pdu through brcb_pdu01,
ds_dcdc through urcb_dcdc01, every data object with q and t.
zelosfull.cid is the station file. testing/suites/mms checks it with an
MMS client on the host.
…ilure

A network card drops multicast nobody asked it for: on hardware the suite
saw gcb_pdu and not gcb_dcdc. A test that failed with simulation on left
it on until a reset.
@tkeairns
tkeairns marked this pull request as ready for review December 2, 2026 18:56
@tkeairns
tkeairns merged commit e7baf02 into main Dec 2, 2026
11 checks passed
@tkeairns
tkeairns deleted the feat/mms-server branch December 2, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant