Repository navigation
Releases
v0.12.2
v0.12.1
Date: 2026-11-16
Previous release: v0.12.0
No command or flag is added or changed.
Changed
- Built on go-iec60870-5 v0.8.0 (was v0.7.0) and go-serial v0.5.0 (was v0.4.1) (go-iec60870-5 RELEASE.md, v0.8.0; go-serial RELEASE.md, v0.5.0). For the tool this means: the state changes of the IEC 101, 102 and 103 stations reach it one at a time and in order, the closed state last; on Windows a serial device must be given by its device name (
COM3,COM10,\\.\COM10, a device interface name), another form is refused when the port is opened, and every port has aCOMname. docs/iec102ctl/LIMITATIONS.md and docs/iec103ctl/LIMITATIONS.md name go-iec60870-5 v0.8.0.
v0.12.0
Date: 2026-11-15
Previous release: v0.11.1
Takes the parameters that decide what a command changes at a station from the command line only, refuses TLS flags with a tcp:// URL, gives NaN and infinite numbers a JSON form, bounds what the simulated stations take from a model, a line and an upload, and limits iec104ctl server start to 16 connections by default. Still built on go-iec60870-5 v0.7.0 and go-serial v0.4.1.
Breaking
- All four tools: the parameters that decide what a command changes are taken only from the command line. When one of them is set only by its environment variable, the variable is not used: the command runs with the flag's built-in default and writes one line on stderr before anything is sent, for example
notice: IEC104CTL_FREEZE=reset is not used: --freeze is taken only from the command line. Before, the value of the variable was used. To keep the old handling, give the flag on the command line. Read-only uses of the same variables are unchanged (IEC101CTL_CA=255still sendsclient interrogateto every station). The parameters, and what a script that set only the variable gets now:- iec101ctl:
IEC101CTL_FREEZEother thanread(client counters): a counter read;IEC101CTL_SET_DELAY(client delay): a measurement only, no delay sent;IEC101CTL_QUALIFIER(client command):none;IEC101CTL_TIMEother thannow(client clock): the current time;IEC101CTL_CAat the broadcast address (255, or 65535 with--ca-size 2) forclient clock,client reset, andclient counterswith a freeze:--ca 1. - iec102ctl:
IEC102CTL_TIME(client ree set-time): the current time;IEC102CTL_CAUSE,IEC102CTL_RECORD,IEC102CTL_DATAandIEC102CTL_OBJECTS(client request): the defaults (--cause activation,--record 0, no--data,--objects -1). The read commands still takeIEC102CTL_RECORD. - iec103ctl:
IEC103CTL_BROADCAST=true(client clock): a synchronization of the one device at--link-address, confirmed by it ("broadcast": falsewithdevice_time);IEC103CTL_TIMEother thannow: the time of sending, and a value that is not a time is no longer refused with exit3. - iec104ctl:
IEC104CTL_FREEZEother thanread(client counters): a counter read;IEC104CTL_QUALIFIER(client command):none;IEC104CTL_TIMEother thannow(client clock): the current time;IEC104CTL_CA=65535forclient clock,client reset, andclient counterswith a freeze:--ca 1.
- iec101ctl:
- iec101ctl and iec104ctl
client command, iec103ctlclient generic write: a procedure from the environment refuses the command. WithIEC101CTL_COMMAND_MODE,IEC104CTL_COMMAND_MODEorIEC103CTL_WRITE_MODEset and no--mode, the command exits3(invalid_input,invalid_flag_combination) before it connects, withIEC104CTL_COMMAND_MODE=select is not used: --mode is taken only from the command line; give --mode select to run it so, for every value of the variable,executeincluded. It does not fall back to the default, which would execute (or, for iec103ctl, write with execution) where the variable asked to select or to abort. Before, the procedure of the variable was run. Give--modeon the command line. - iec104ctl: a TLS flag with a
tcp://URL is refused.--tls,--tls-ca,--tls-cert,--tls-key,--tls-server-nameor--tls-insecure, or one of the variablesIEC104CTL_TLS,IEC104CTL_TLS_CA,IEC104CTL_TLS_CERT,IEC104CTL_TLS_KEY,IEC104CTL_TLS_SERVER_NAME,IEC104CTL_TLS_INSECURE, together with--url tcp://…now ends every client command with exit2(JSON error kindusage, codeinvalid_flag_combination) before it connects; the message names the flags and thetls://form of the URL. Before, the command connected over plain TCP without the TLS flags. To connect with TLS, give atls://URL, or--ipwith the TLS flags. To keep plain TCP, unset the TLS flags and their variables, also a shell that exportsIEC104CTL_TLS_CERTandIEC104CTL_TLS_KEYforserver start. - iec101ctl and iec104ctl:
<TOOL>_IOAis only the address list ofclient interrogate,client readandclient monitor. The address ofclient commandisIEC101CTL_COMMAND_IOAandIEC104CTL_COMMAND_IOA, the address of iec104ctlclient file list,getandputisIEC104CTL_FILE_IOA. A script that chose the directory of iec104ctlclient file listwithIEC104CTL_IOAsetsIEC104CTL_FILE_IOAnow; with onlyIEC104CTL_IOAit lists the default directory (0).--ioastays a required flag ofclient command,file getandfile put, which no variable replaces. Before, a list or range in<TOOL>_IOA(100-199) stopped every command of the tool at start-up with exit3,versionincluded; it now filters, and every other command runs. - iec102ctl
server start --serialexits4(transport,connection_lost) when its serial port fails while it is served, for example when the adapter is removed; it exited0. Ctrl-C and the end of--durationstill exit0. A script or supervisor that restarted the server on exit0should treat exit4as the port failure it is. - iec104ctl
server startserves at most 16 connections at once by default, and the built-in demo station takes no files. A further connection is closed at once, as with--max-sessionsbefore; before, the default was no limit. To keep the old handling, give--max-sessions 0(no limit) or the number you need, also asIEC104CTL_MAX_SESSIONS. The demo station, whichserver startserves without--configandserver generate-configwrites, has nouploadssection:client file putto it is refused (exit6). To take files, serve a model withuploads: {accept: true}, for example the written demo with that section added.
Added
- All four tools: a NaN or infinite floating point number a station or device sent is
nullin JSON, with a new fieldnon_finitenext to it:"NaN","+Inf"or"-Inf".non_finiteis omitted for every other value; text and table output show the same names (docs/json-output.md). Where it is:- iec101ctl and iec104ctl: the points of
client interrogate,counters,read,scanandmonitor(value), and thecommandevents ofserver start(a refused set point); - iec103ctl: in place of
scl(ASDU 4), as one string per element ofvaluesfor generic data sets and description elements (structure fields too), and as an object forrpv,rsvandrfaof a disturbance channel.
- iec101ctl and iec104ctl: the points of
- iec102ctl
server start:warninganderrorevents in the event log, for an answer that cannot be queued and for the warnings and errors of the library's server.
Changed
- All four tools: a second Ctrl-C (or SIGTERM) while a command is still ending, a logout or the end of a stream, ends the process at once with exit
130(docs/exitcodes.md). Before, it was not noticed. - iec101ctl, iec102ctl and iec103ctl
server startover TCP: at most four connections wait for the line while one is served, each up to half a second; a further one is closed at once (busy). An accept that fails while the server listens is logged as abusyevent whosedetailnames the error, and the server accepts again after a pause of 5 ms growing to 1 s; before,server startended with exit4. The help ofserver startno longer says that a second connection is closed at once. - iec101ctl
discover --link-mode balancedandclient ping --method link-status|link-test: user data the station sends meanwhile (its events) is answered with a negative acknowledgement (DFC set), and the station keeps it for the controlling station that brings the link up next. Before, it was acknowledged and dropped. - iec101ctl and iec104ctl
server start: a set point that is NaN or infinite is answered with a negative confirmation, as a select and as an execute; the target keeps its value, and thecommandevent names the number innon_finite. A model whosesimulatehas a NaN or infinitemin,maxorstepis refused. - iec102ctl:
--access-keyis deprecated: it still works and prints a warning on stderr. Give the key with--access-key-fileorIEC102CTL_ACCESS_KEY; the help and the documents use--access-key-file. - iec102ctl
server start: a model holds at most 1000000 integrated totals in all, listed and generated, and a generated period at most 256 totals, each address once; at most 48 contracted powers and 49 special days (was 127 each), as many as one answer carries. A model beyond a limit is refused when it is loaded, before its totals are generated. - iec103ctl
client disturbance getcreates--outputand--csvbefore it connects: a file that cannot be created, in a directory that does not exist for example, is exit3(output_file_create_failed) before anything is sent; it was exit10after the transfer, whose final acknowledgement lets the device delete the record.--forceempties an existing file at the start; the files are removed when the command fails. - iec103ctl
server start:simulateof an indication is 0 (none) or 100 to 86400000 ms; any other value is refused when the model is loaded. - iec103ctl
server start: a generic write staged with write entry belongs to the line that staged it and ends with the line and with a reset CU or reset FCB. One write stages at most 64 data sets and a line at most four writes; beyond that the write is refused with cause 41 and reply code 7. - iec104ctl
server start: a model file holds at most 16 MiB. A file of the model holds at most 16777215 octets, checked before anything is read or made: fromsizeandcontent, and forpathfrom the size the file system reports, which must be a regular file (not a directory, device or named pipe). The station reads it when it starts. - iec104ctl
server start: the upload limits (uploads.max_files,uploads.max_total_size) count the files being delivered, ...
v0.11.1
Date: 2026-11-15
Previous release: v0.11.0
No command or flag is added or changed.
Changed
- Built on go-serial v0.4.1 (was v0.4.0): on Windows a serial write that times out returns an error together with the bytes written, where it returned a short count without one; on Linux, macOS and the BSDs a port path that is not a character device is refused when it is opened; reads wait correctly on OpenBSD (go-serial RELEASE.md, v0.4.1). This reaches the serial lines of iec101ctl, iec102ctl and iec103ctl.
v0.11.0
Date: 2026-11-14
Previous release: v0.10.1
Reports a request that hits the result limit of go-iec60870-5 as a protocol error. Still built on go-iec60870-5 v0.7.0.
Changed
- All four tools: a request that hits the library's result limit now exits
6(protocol) instead of10(internal), with JSON error kindprotocoland the new coderesult_limit(wasinternal/internal_unexpected). This covers iec101ctl and iec104ctlclient interrogateandclient counters, iec104ctlclient file list, the iec104ctl requests that end because more than 16 answers to earlier requests are queued ahead of them, and the collecting requests of iec102ctl and iec103ctl. Scripts that treated exit10from such a request as the result limit should check for6andresult_limit(docs/exitcodes.md).
v0.10.1
Date: 2026-11-14
Previous release: v0.10.0
Moves the four tools to go-iec60870-5 v0.7.0 (was v0.6.0). The commands' options, output and exit codes are unchanged; the library's new bounds apply with their defaults.
Changed
- Built on go-iec60870-5 v0.7.0 (go-iec60870-5 RELEASE.md, v0.7.0). For the tools this means:
- iec104ctl
client interrogate,client countersandclient file list: one request collects at most 65536 ASDUs (directory entries forfile list), as iec101ctl does since v0.10.0. A request that would collect more ends with the library's result-limit error and what arrived so far; it is reported as in iec101ctl, iec102ctl and iec103ctl. A request that waits for one answer (a command, a read, a clock synchronization) ends with the same error when more than 16 answers to earlier requests are queued ahead of it. - iec104ctl
client file get: a file the station announces with more than 255 sections ends with a protocol error. - iec104ctl
server start: a state handler or accept filter that does not return normally is logged with its stack and closes only its own connection; the station goes on serving the others. - iec104ctl with IEC 62351-5 (
--secure): a remote certificate whose key usage allows neither key agreement nor digital signature is refused, and an authority certificate outside its validity period authorizes nothing. At the simulated station (server start), a completed Station Association ends the session keys of the earlier association; the controlling station then changes the session keys. Session keys that reach their use count or lifetime are no longer accepted from the message that finds them so, not only at the next timer tick. - iec103ctl
server start: the values of a disturbance channel are queued all or none. When the class 1 queue has no room for them the channel ends with TOO 37, which the controlling system acknowledges negatively and may request again; a record with a channel of more than 25575 values (more than the default class 1 queue of 1024 ASDUs holds) is refused with TOO 34 at its selection and no transfer starts. NOE announces the longest channel of the record. - iec103ctl
client disturbance get: keeps to the selected fault number (FAN): an end of transmission of another FAN is skipped, a channel offered for another FAN ends the transfer with what was received so far, and a channel whose values carry another FAN is acknowledged negatively. - iec102ctl
client totalsandclient eventskeep only the data of the requested record address. - iec101ctl, iec102ctl and iec103ctl: a link exchange whose frame waits for room in a full send queue ends at its deadline or on Ctrl-C.
- iec104ctl
v0.10.0
Date: 2026-11-14
Previous release: v0.9.3
Moves the four tools to go-iec60870-5 v0.6.0 (was v0.5.2). The commands' options and output are unchanged; the library's new bounds apply with their defaults.
Changed
- Built on go-iec60870-5 v0.6.0, with the fixes of v0.5.3 (go-iec60870-5 RELEASE.md, v0.5.3 and v0.6.0). For the tools this means:
- iec101ctl, iec102ctl and iec103ctl: one request collects at most 65536 ASDUs (iec102ctl: 131072). A request that would collect more ends with the library's result-limit error and what arrived so far.
- iec104ctl
station: a session has at most 16 file transfers open at once, in addition to the station's own upload limits; one more is refused with "unknown information object address" until a transfer of that session ends. - A library callback that does not return normally is logged with its stack and stops only the station that called it.
- iec101ctl: a request after the client closed reports that the client is closed, where it reported that the link was not initialized.
- Built on go-serial v0.4.0 (was v0.3.0), for the serial lines of iec101ctl, iec102ctl and iec103ctl (go-serial RELEASE.md, v0.4.0).
Fixed
- iec103ctl
stationover TCP: a line ends when its station ends, as in iec101ctl and iec102ctl. With go-iec60870-5 v0.6.0 the station ends itself when a write fails, without a read failing first. The line then stayed open, and every later controlling system was refused as busy.TestHostileMasterfailed 24 of 45 runs that way and now passes.
v0.9.3
Date: 2026-11-13
Previous release: v0.9.2
Fixes iec101ctl client monitor ending on a line that closed during the link start-up,
and moves the interop suites to the images of iec60870-5-interop v0.5.0.
Fixed
- iec101ctl
client monitor: a line that closed while its link was being
initialized ended the monitor with "connection error: the line closed before the link
came up" instead of being opened again. This happened to a line opened again after a
loss, and to the first line when the station closed it right after the link came up,
before the dial returned. Now only a first line whose link never came up ends the
monitor; every other lost line is opened again unless--no-reconnect. iec102ctl has
no monitor, iec103ctl already opened such a line again, and iec104ctl's reconnection is
the library's. - iec101ctl, every client command: a TCP line that closed during the link start-up
failed the command at once with "the line closed before the link came up", where
iec102ctl and iec103ctl open such a line again: a terminal server (or an interop
image) that still serves the previous connection closes the next one. It is now opened
again, with a growing pause, until--timeout; nothing but the link start-up was sent
on it. A serial line is not.
Changed
- Interop: the suites of all four tools run against the images of
iec60870-5-interop v0.5.0 (contract 2.3 unchanged), pinned by the digests of that
release, with its case and known-bug tables. The iec103ctl and iec102ctl suites read
the role a known-bug entry may now carry (<adapter>@client,<adapter>@server).
v0.9.2
Date: 2026-11-12
Previous release: v0.9.1
Built on go-iec60870-5 v0.5.2 (was v0.5.1) and go-serial v0.3.0 (was v0.2.1). No
command, flag or output changes.
Changed
- go-serial v0.3.0 (iec101ctl, iec102ctl, iec103ctl): serial parameters are checked
before they are narrowed, so an out-of-range data-bits or stop-bits value is an error
instead of being truncated to a valid one, and an RS-485 RTS delay above 2^32-1 ms is
refused instead of wrapping around. go-serial now requires Go 1.26, as these tools
already did. - go-iec60870-5 v0.5.2: its interop suites moved to the images of
iec60870-5-interop v0.5.0; the library's code is unchanged.
v0.9.1
Date: 2026-11-12
Previous release: v0.9.0
Built on go-iec60870-5 v0.5.1 (was v0.4.1). Fixes a silent loss of data on noisy
serial lines in iec101ctl, iec102ctl and iec103ctl.
Fixed
- iec101ctl, iec102ctl, iec103ctl: on a line that corrupts octets, a command could
succeed with part of its answer missing (seen:client interrogateof iec103ctl
returning 7 of 8 messages). After rejecting a corrupted frame, the FT 1.2 decoder of
go-iec60870-5 took an E5 octet inside that frame for a valid single-character answer,
so the station's next message was skipped. go-iec60870-5 v0.5.1 never resynchronizes
on the octets of a rejected frame. The chaos tests now check that a command which
succeeds returns everything a clean line returns. --debug: no frame is traced after a command ended (go-iec60870-5 v0.5.0: a link
station'sClosewaits for its writer).- iec103ctl: a line that closes during the link start-up is reported by the library
(go-iec60870-5 v0.5.0:WaitUpreturns the transport error); iec103ctl's own watch
of the line is gone. Errors and exit codes are unchanged (connection_lost, exit 4),
and a TCP line closed during the start-up is still opened again until--timeout.
No command, flag, output format or exit code changed.