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

A Zero in the S2F33 Report List Makes It a Delete-All, Not a Define

Real socket capture of all three S2F33 shapes — define, delete-one, delete-all — plus E5's DRACK 0-4 table and two requests that should have been refused but got 0.

SECS/GEMMESSCADATroubleshootingChecklists

I wrote a host that re-defines its reports on every reconnect. Connect, send S1F13, walk the config table, send S2F33. Then one day the table was empty — a config file that didn't load, or a filter that matched nothing. The code did not stop. It sent S2F33 with an empty report list, the equipment answered DRACK 0, and the host log got one line reading "report definition complete". From that day on, not a single S6F11 arrived.

The 10 bytes of an S2F33 body: L,2 then a U4 DATAID, with the last two bytes holding the report list. A zero length byte makes it a delete-all request S2F33 body — 10 bytes L,2 DATAID report list 0102 B10400 000001 01 00 Llength list count byte

The two frames differ in one trailing byte

SEMI E5 gives S2F33 Define Report the body L,2 { DATAID, L,n { L,2 { RPTID, L,m { VID } } } }. The second element of the outer list is the report list, and n is its length.

E5 assigns that n = 0 case its own meaning. An empty report list is a request to delete every report defined on the equipment. By the same rule, a report entry whose VID list is empty deletes that one RPTID. Define, delete-one and delete-all all live inside the same S2F33, and the only thing that distinguishes them is a list count byte.

The GEM name is worth knowing for document searches: in E30 the S2F33/S2F35/S2F37 group is the Dynamic Event Report Configuration capability. Letting the host define and delete reports at runtime is a requirement of that capability, which is why the delete path is in the spec rather than left to the implementer.

That byte is usually a variable in host code. len(reports), straight through. When the table is empty it is zero, and a zero there still produces a perfectly valid S2F33. Nothing is malformed — not the frame, not the count of length bytes in the item header. It becomes a well-formed different command, and no parser has a complaint.

The capture — define, delete-one, delete-all

These bytes come from a python socket client driving the EQ1 passive listener in the SECS/GEM simulator from outside (127.0.0.1:5501, SessionID 11, no faults). Select and S1F13 took the session to COMMUNICATING first — SELECTED is not COMMUNICATING. Captured 2026-11-10, back to back on one connection, and only frames the equipment side logged as RX are listed. The raw export is in content/demos/s2f33-zero-length-report-list.json.

An ordinary define: RPTID 500 over VID 101 and 102.

TX S2F33 W   00 00 00 2A 00 0B 82 21 00 00 00 00 80 03
             01 02 B1 04 00 00 00 01
                   01 01 01 02 B1 04 00 00 01 F4 01 02 B1 04 00 00 00 65 B1 04 00 00 00 66
RX S2F34     00 00 00 0D 00 0B 02 22 00 00 00 00 80 03  21 01 00   3.5 ms

The body is <L [2] <U4 1> <L [1] <L [2] <U4 500> <L [2] <U4 101> <U4 102>>>>>. The frame after the 4-byte length prefix is 0x2A = 42 bytes. 01 01 is the report list, length one.

Next the middle shape — delete just RPTID 500. Only the VID list's count byte is zero.

TX S2F33 W   00 00 00 1E 00 0B 82 21 00 00 00 00 80 05
             01 02 B1 04 00 00 00 01
                   01 01 01 02 B1 04 00 00 01 F4 01 00
RX S2F34     00 00 00 0D 00 0B 02 22 00 00 00 00 80 05  21 01 00   0.7 ms

0x1E = 30 bytes. The report list still has length one, and the trailing 01 00 is the empty VID list. The RPTID is still on the wire — you have to say which report to delete.

Now delete-all. Same host, same socket, and the only thing changed is the report list.

TX S2F33 W   00 00 00 14 00 0B 82 21 00 00 00 00 80 06
             01 02 B1 04 00 00 00 01
                   01 00
RX S2F34     00 00 00 0D 00 0B 02 22 00 00 00 00 80 06  21 01 00   4.2 ms

01 00 — one list item, length zero. The frame shrank to 0x14 = 20 bytes, with nowhere for an RPTID or a VID to sit. And the three S2F34 replies differ only in SystemBytes; the other 13 bytes are identical. 21 01 00: a one-byte binary item, DRACK 0.

DRACK has values other than 0

E5's S2F34 DRACK is a one-byte binary item with five defined values.

DRACKMeaning
0Acknowledge
1Denied, insufficient space
2Denied, invalid format
3Denied, at least one RPTID already defined
4Denied, at least one VID does not exist

3 is the one that matters most to a host that re-defines its reports on every reconnect. It means the equipment rejects a redefinition of an RPTID that already exists, so that host has to either delete first or treat 3 as normal.

This listener does neither. I sent the same define twice in a row, identical down to the body bytes.

TX S2F33 W   ... 80 03   01 02 B1 04 00 00 00 01 01 01 01 02 B1 04 00 00 01 F4 ...
RX S2F34     ... 80 03   21 01 00   3.5 ms
TX S2F33 W   ... 80 04   (body byte-for-byte identical to the frame above)
RX S2F34     ... 80 04   21 01 00   2.6 ms

The second one is 0 as well, not 3. Same story straight after the delete-all, linking the now-gone RPTID 500 to CEID 1 with S2F35.

TX S2F35 W   00 00 00 24 00 0B 82 23 00 00 00 00 80 07
             01 02 B1 04 00 00 00 01
                   01 01 01 02 B1 04 00 00 00 01 01 01 B1 04 00 00 01 F4
RX S2F36     00 00 00 0D 00 0B 02 24 00 00 00 00 80 07  21 01 00   1.4 ms

LRACK 0. E5's S2F36 table has 5 = at least one RPTID does not exist, and a request linking an RPTID deleted seconds earlier still gets 0.

There is a conclusion to stop short of here. This listener does not process S2F33 structurally. It is the same permissive listener that answers 0 even when you link reports in the wrong order, and it exposes no report store. So I have not verified that a delete actually happened. What I verified in bytes is three things: all three shapes are valid frames on the wire, this equipment's reply cannot tell a define from a delete, and two requests that should have been refused got 0. The delete semantics and the DRACK/LRACK values themselves are E5's text, and on a real tool they need checking separately.

Where the host stops it

  • Check the length before you send. If the report list is empty, don't build the S2F33 at all. A delete-all should be something an operator presses deliberately, not a failure path in a config loader.
  • Don't read DRACK 0 as "my definition landed". Zero means the equipment accepted the request, and the request may have been a deletion.
  • A host that re-defines on reconnect has to design for DRACK 3 first. Either delete then redefine, or read 3 as "already there" and move on. Raising 3 as a fault means an alarm on every reconnect.
  • Confirm by reading back. Whether S2F35 links against the RPTID, and whether S6F11 actually arrives, is the only confirmation worth anything. An ack is not a confirmation.
  • The equipment's report definitions are not yours alone. A delete-all takes out reports another host or an engineer configured. That is what makes this one quiet: the data collection that breaks belongs to someone else.

Even if you never wrote code to delete a report definition, the path where len() returns zero already exists. Walking that path once is the whole point of this article. The bytes are reproducible against the simulator.