← Articles
SECS/GEM/7 min read/— views

An Empty CEID List in S2F37 Means Every Event, Not None

A zero-length CEID list makes S2F37 target every collection event, so one CEED byte decides whether S6F11 floods or stops. Real capture.

SECS/GEMMESSCADATroubleshootingChecklists

I wrote a host that enables its subscriptions on every connect: read the config table, collect the CEIDs, send one S2F37. Then a day comes when the table is empty — wrong config path, or no CEID passes the filter. The code does not stop. It sends an S2F37 with an L,0 CEID list, the equipment answers ERACK 0, and the host log says "events enabled". After that one of two things happens. S6F11 arrives thousands of times a minute, or it never arrives at all. Which one is decided by a single CEED byte inside the body.

The 7-byte S2F37 body: L,2 then a BOOLEAN CEED, then two bytes of CEID list. A list length of zero makes the request cover every event, and CEED picks the direction S2F37 body — 7 bytes L,2 CEED CEID list 0102 2501 0100 01 Llength CEED value byte

An empty list means "all", not "nothing"

The body of S2F37 Enable/Disable Event Report is L,2 { CEED, L,n { CEID } } in SEMI E5. CEED is one BOOLEAN byte; the rest is the list of CEIDs the request applies to.

E5 gives n = 0 its own meaning. An empty CEID list makes the target every collection event the equipment has. So the path in host code where len(ceids) returns 0 does not translate to "touch no events" — it translates to "touch all of them". The meaning does not invert. It widens to the maximum.

It is the same design as an empty report list in S2F33, which is a delete-all. One list length byte carries the scope, and 0 means "everything" rather than "none". The difference is that S2F37 has a second byte that picks the direction.

  • CEED = TRUE with an empty list → every event the equipment knows is switched on. Every CEID with a linked report starts coming up as S6F11.
  • CEED = FALSE with an empty list → everything is switched off, including what another host or an engineer turned on.

The second one is quieter and worse. A host that receives nothing is easy to read as "the tool must be idle".

The capture — two frames, one byte apart

These bytes come from the EQ1 passive listener in the SECS/GEM simulator (127.0.0.1:5501, SessionID 11, no faults set), driven from outside by a python socket client. Select and S1F13 came first to reach COMMUNICATING — SELECTED is not COMMUNICATING.

Enable-all first.

TX S2F37 W   00 00 00 11 00 0B 82 25 00 00 00 00 01 03
             01 02 25 01 01 01 00
RX S2F38     00 00 00 0D 00 0B 02 26 00 00 00 00 01 03  21 01 00

The body is <L [2] <BOOLEAN 1> <L [0]>>. 25 01 01 is CEED, and the trailing 01 00 is the CEID list with a length of zero. The frame is 0x11 = 17 bytes after the 4-byte length prefix.

Now disable-all. Same socket, same host, CEED flipped.

TX S2F37 W   00 00 00 11 00 0B 82 25 00 00 00 00 01 04
             01 02 25 01 00 01 00
RX S2F38     00 00 00 0D 00 0B 02 26 00 00 00 00 01 04  21 01 00

Of the 21 bytes in those two requests, exactly two positions differ: the SystemBytes, and the fifth byte of the body. The length is 0x11 in both, and the item structure is identical. A parser reads each as a perfectly valid S2F37. The two replies are also identical across all 13 bytes once SystemBytes is excluded — 21 01 00, a one-byte binary item, ERACK 0.

ERACK 0 does not mean "enabled"

For the third message I sent one CEID this equipment does not have: 9999. The listener's event list is 1001, 1002, 1101, 1102, 1201 and 9001.

TX S2F37 W   00 00 00 17 00 0B 82 25 00 00 00 00 01 05
             01 02 25 01 01 01 01 B1 04 00 00 27 0F
RX S2F38     00 00 00 0D 00 0B 02 26 00 00 00 00 01 05  21 01 00

B1 04 00 00 27 0F is U4 9999. What came back was ERACK 0 again. E5 defines a non-zero ERACK for the case where at least one CEID does not exist, but this listener does not check CEIDs and accepts all three with a zero — the same permissive side as the listener that acks a reversed link order with zeros.

So here is the split between what I verified and what I did not. Three things are byte-verified: an empty-list S2F37 is a valid frame on the wire, enable and disable are one byte apart, and this equipment's replies cannot be used to tell the three requests apart. I did not verify that the enable took effect — this listener does not send S6F11 to a socket client, so there is no way to observe the effect from here. The all-events scope and the rejection code come from E5, and both need confirming against your real equipment.

Which CEIDs are enabled at power-up also varies by tool. Do not assume it; read the equipment manual.

Where to block it on the host side

  • Check the length before you send. If the CEID list is empty, do not build the S2F37 at all. Enable-all and disable-all should be deliberate operator actions, not the failure path of a config loader.
  • Do not use disable-all. If you really need it, list the CEIDs one by one. A long frame is cheaper than a one-byte accident.
  • Do not read ERACK 0 as "my subscription is in". Zero means the equipment accepted the request, and that request may have been a disable-all.
  • Confirm by effect. Define the reports with S2F33, link them with S2F35, then watch for actual S6F11 traffic. That is the only confirmation worth trusting — and returning the S6F12 in time is part of the same job.
  • The equipment's enable state is not yours alone. A disable-all cuts off somebody else's data collection, which is why this one never shows up on your screen.

Even if you never wrote code to turn subscriptions off, the path where len() returns 0 is already there. Walk it once. The bytes are reproducible with the simulator.