Kleidos API Search

In development. It changes without notice.

Changelog

The instrument's versions, newest first, by what each changed on the wire: commands, responses, report keys, error numbers and stream records, as the SCPI command set defines them, and the behavior a host can observe. The version is firmware/version.txt; the host package (host/pyproject.toml, kleidos_meter.__version__), its simulator and the firmware's host-test harness carry the same number, and tests/firmware/test_versioning.py holds all of them and the top entry of this file together.

The version rule

  • Minor (0.4.0 → 0.5.0): a new command, a new report key, a new error number, a new stream record, or a behavior a host can observe changes (a new refusal, a new bound). A new key is appended at the end of its report: a key keeps its place.
  • Patch (0.5.0 → 0.5.1): a fix that changes nothing a host can see on the wire.
  • Major (0.x → 1.0.0): a command, a key or a record removed.
  • A changed meaning is not allowed. A key is never renamed or given another unit, and a command never comes to mean something else: a new meaning is a new key or a new command (AGENTS.md, "The protocol is a contract").
  • Every version that reaches main is tagged v<version>, annotated and signed, on the commit that sets it in firmware/version.txt, and gets its entry here in the same commit. SYSTem:INFormation? names the running build by fw= and, from 0.5.0, by elf=, the first 8 bytes of its ELF SHA-256.

The tags v0.2.0, v0.3.0 and v0.4.0 were set on 2026-11-20 on the commits that set those versions; from 0.5.0 each version is tagged when it lands.

0.18.0 (2026-11-27)

The meter's wiring is data the instrument stores and the panel changes, and the panel's chart draws the arithmetic mean. The GPIOs of the INA228's SDA, SCL and ALERT and of the two relays are a pin map, held to the board's pin table (firmware/board/pins.toml, generated into the firmware and the panel), applied only once the INA228 answers on it and put back by itself when it does not; the INA228's averaging and shunt conversion time are a measurement setting per profile, off by default; the panel draws each pixel column's mean over a faint band of its minimum to maximum, with display smoothing that never alters what was recorded, and changes the pin map on a drawing of the board. The images built on the way reported fw=0.17.0 and are told apart by elf=; the release's bench acceptance, with its ELF digest, is in docs/misra.md, "The run of record".

What the Kleidos QA harness must know (docs/scpi.md, "The pin map" and "The averaging override").

  • Keys are appended, none moved or renamed. SYSTem:INFormation? and SYSTem:HEALth? end with pins_src pins_table, so elf= is no longer the last token of SYSTem:INFormation?; ROUTe:STATe? ends with relay1_gpio relay1_active relay2_gpio relay2_active; SENSe:PROFile:REPort? with avg_state vbusct_us; FETCh:HEADer? with avg_state pins_src. MeterLink parses reports by key and reads none of them; its fakes in qa/tests/tools/meter_sim.py answer the earlier keys, which is still a valid answer to it. *IDN? does not change: its four fields are IEEE 488.2's, and every parser splits on them.
  • New commands: SYSTem:PINS?, :PENDing?, :STAGe, :ADDRess, :CLOCk, :CLEar, :APPLy, :DEFault, :RESult?; SENSe:AVERage[:STATe] and its query, and the settings SENSe:AVERage:COUNt <n> and SENSe:CURRent:APERture <seconds> beside their queries. The averaging override is off on every boot and after *RST (SENSe:AVERage? 0, avg_state=off), the profiles' own ADC_CONFIG, as before: a run that never sends them measures as on 0.17.0. A harness that reads period_us, avg and vshct_us from the capture header, rather than assuming a profile's, stays right when a person has turned one on; *RST turns every one off.
  • A new error, 117 "Pin map reverted", queued at boot when a stored pin map's bus did not answer (FW-04), and by SYSTem:PINS:APPLy for a map that was put back (FW-05); and *RST returns the I2C clock to the pin map's boot clock, 400 kHz by the default map, as before.
  • After the first flash of 0.18.0, kleidos-meter calibration verify. The image's partition table gains pins (8 KiB at 0xB000, FW-03) and leaves the calibration's log at 0x9000 as it was, so verify answers applied as after any flash, and restore is needed only where it answers working_copy_lost (a full erase). With no pin map stored the meter boots the default map, the rig as wired (rev D), pin for pin as 0.17.0 did. MeterLink changes nothing: it sends none of the new orders, and a pin map someone else stored is the board's, which no *RST undoes (SYSTem:PINS:DEFault does).
  • No key, command, record or error number is removed or given another meaning; *IDN? is unchanged.

On the host: the panel's chart, its pin view and its averaging (docs/panel.md, docs/http-api.md, docs/cli.md).

  • The chart draws the mean (HO-01, HO-02). Each pixel column's arithmetic mean is the line, over a faint band of the column's minimum to maximum; a display smoothing per chart (off, 1 ms, 10 ms, 100 ms, 1 s) is a centered moving average over whole columns, never shorter than one, which moves the line and never the band or the recorded data, and the caption drawn in the plot names it with the window it takes. The readout gives, at the crosshair, the line's value with the window it averages and that column's minimum and maximum, and for the window in view the samples' mean, RMS, minimum and maximum. GET /api/runs/{run}/decimated answers each bucket's mean and rms beside min, max and n, and an opened run is drawn from its buckets weighed by their counts.
  • The view is exported with its filter named (HO-03). "View as PNG" and "View as CSV" save what the chart shows, made in the page with no request: the image with the source, the window, the instrument and the averaging, and per pixel column the line, the band and the samples it averages, the filter in the header. A run's own exports are unchanged whatever the smoothing.
  • The status bar keeps one height at a width, and no local path reaches the page (HO-04). Each cell has a value line and a qualifier line ("not quotable", the image's elf=, the averaging); the local build, the data directory and a file's errors are named relative to the working directory or the repository, else by their last two components.
  • The simulator, the client and the command line speak the pin map (HO-05). kleidos_meter.pins is pinmap::validate() in Python, held to every line of firmware/test/native/golden/pinmap.vectors, with a board's wiring and what bringing a map up on it finds; the simulator stands on a wiring (--sim-wiring, the rig by default) and applies, reverts, defaults and boots a map as the firmware does, and overrides each profile's averaging. Meter gains pins(), stage(), apply() and pins_defaults(); kleidos-meter pins show|set|apply|defaults.
  • The panel's API serves the pin map and the averaging (HO-06). GET /api/pins answers the board's table, the live and the staged map, the last result and whether the instrument's table is the package's; POST /api/pins/stage, apply and defaults change it, refused unsent while a capture or a sequence runs, while another controller holds the line or while a relay is not at rest, and after a change that moved a relay the null-path check is made and reported. The map is no capture-shaping setting: it is never snapshotted and never written back. The averaging is three settings of the live profile, written back on the way out and named in each run's settings and noise_reduction.
  • A Pins view like a pin configurator (HO-07). Both rails of the devkit drawn terminal by terminal from the table, each pin colored, shaped and named by its state (free, in use, reserved by the board, usable with caution) with a legend and the reason on hover; a pin's dialog gives it a use (INA228 SDA, SCL or ALERT, Relay 1, Relay 2, unused) and its configuration (a relay's active level, a pull, the bus clock and the INA228's address on a bus pin), the draft judged by the firmware's rules in the page with its conflicts drawn on the pins, and nothing sent until Apply, which shows what the instrument answered. Arrows, Enter and Escape do all of it. The page names the relays only Relay 1 and Relay 2; a part appears only in the recommendation note.
  • Noise reduction in the INA228, per profile, in Settings (HO-08). Off, the averaging count and the shunt conversion time, with the sample period they give shown before anything is written; the status bar, the chart, its readout and exports, the runs list and each run's meta.json name the averaging their samples were taken with. POST /api/settings no longer writes an averaging on the live profile when the profile it named was refused.
  • The page's pure modules and the host package are measured whole (HO-09, HO-10). The browser tests' precise block coverage of chart-math.js and pins-math.js is held to host/js_floors.toml (100 % of functions and blocks), every module of the host package to 100 % of its branch sides (99.54 % in 0.17.0), and 20 host mutants (host/mutants/) are each killed. The simulator counts its clock in whole microseconds, as the firmware does, so a relay hold no longer reads one second long.

The firmware, work package by work package.

  • Both sides of 0.18.0 meet, and the simulator answers as the firmware does (FW-08). The conformance suite applies, puts back, refuses and defaults pin maps and turns every count and conversion time of the averaging override on, on three profiles at three bus clocks, and requires the native bridge and the simulator to answer byte for byte, the errors' texts included. What it found wrong in the simulator is now the firmware's: an override was held to one retained read instead of twice a sample's reads (and 100 µs on a ring) and to no longest period, and was not judged again by INITiate, an acquisition or a null window; a ring's acquisition over 600 s and a statistics-only capture of a ring on a bus too slow for it were taken; relays moved back to the rig's own pins read verified=1; the default map applied with APPLy read src=stored; a reverted map whose last good map fails too did not say so; the two 117s of a boot had texts of their own, and a stored map on the default bus "fell back" to it. SimulatedMeter's interim option, the development image's -221, is gone with the refusals. The host package's mutants run in scripts/run_tests.sh (scripts/run_mutants.sh --package, --page and --host), and CI's panel job runs the page's and shows what the browser tests ran of the page's modules (host/js_floors.toml). Nothing changes on the firmware's wire.
  • The firmware's last coverage gaps are closed, and a stuck lead is seen (FW-07). No line, branch side or MC/DC condition of firmware/src is left untaken and no reason excuses one: the nine MC/DC entries (11 conditions) and the 35 branch entries (30 sides, and the constant condition of each while ( true ), which is no branch) are gone, what an invariant made dead removed and the rest reached by a test (docs/testing.md, "Reading the report"). One of those reasons was false: ROUTe:NULLpath ON with the lead already open moves K2 alone, and with K1 stuck closed and K2 taking almost all of the current the check passed (check=ok) while the shunt still conducted; the DUT's current seen through the shunt before anything moves, 2 mA or more with K1 open, now fails it with 104. Nothing else changes on the wire, and the golden transcript is unchanged. scripts/run_mutants.sh runs the host package's mutants (host/mutants/) as well as the firmware's, each by its own kill command.
  • The INA228's averaging and shunt conversion time per profile, a measurement setting, off by default (FW-06; docs/scpi.md, "The averaging override"). SENSe:AVERage[:STATe], SENSe:AVERage:COUNt <n> and SENSe:CURRent:APERture <seconds> take effect: on, the live profile converts with that count and time, its ADC_CONFIG word and period derived from them, and the capture header's adc_config vshct_us avg period_us avg_state, the profile report, SAMPle:TIMer?, the pacing (ALERT on STATE and SLEEP, the timer on TRACE), the watchdog's feed and a ring's dump follow; off, every byte of a capture is as it was. Refused by name with nothing changed, -221: BURST, a period under twice the bus time a sample's reads take at the running clock (judged again at INITiate) or under 100 µs on TRACE, and one over 200 ms. What a window converts with is latched when it starts (Sampler::conversion(), CaptureInfo::averaging), so a later change never re-times a dump. Not persisted; *RST and a boot return every profile to off. firmware/test/native/test_averaging.cpp takes all 64 combinations of three profiles at two bus clocks; ten mutants (scripts/mutants/FW06-*.patch); tests/bench/test_averaging_bench.py is the same on the meter. On the meter STATE at AVG 16 and 64 kept 18,432 and 73,728 µs on ALERT with nothing dropped, and the null path's standard deviation fell from 18.85 µA to 4.85 and 2.38 µA (docs/architecture.md §3.2). Until now the three settings answered -221.
  • The pin map is applied, proved, or put back (FW-05). SYSTem:PINS:APPLy moves the relays (each new pin latched at its released level first, the pin a relay leaves parked toward that level until the next boot), then, on Core 1, ALERT and the bus, brings the INA228 up there, runs the self-test's parts, and saves the map only once they pass; any failure puts the last good map back and proves it, with one 117 and nothing saved. It is refused, -221, with a relay off its rest or a map the rules refuse. SYSTem:PINS:DEFault is the way back from the console alone and is kept whatever its proof finds; SYSTem:PINS:RESult? says how the last one went; verified falls to 0 when a relay moves and a null path that passes its check raises it. Until now both orders answered -221, so no meter holds a record yet. -240 has a second meaning beside a failed I2C transaction: DEFault whose record the flash did not take. New files firmware/src/pin_apply.h/.cpp; pin_boot::bringUpOn(), Ina228Driver::runOnBusCore(), Sampler::moveAlert(), relay::Bank::move(); fifteen mutants (scripts/mutants/FW05-*.patch).
  • The boot runs the pin map (FW-04). app_main() reads the stored map (pin_boot::load()) before it drives anything, and the relays, the parked pins, the bus with its clock, its pulls and its scanned or pinned address, and ALERT with its pull all follow it: relay::ChannelSpec no longer holds a pin or a level, Bank::begin( map ) releases each relay latch-first at the map's released level and parks pinmap::parkedSet( map ), and drive() and padMismatches() read the live wiring; main.cpp's pin constants are gone. A stored bus the INA228 does not answer on falls back to the default bus when those pins are free in the map (src=fallback, one 117, the stored pads parked, the record kept) and otherwise leaves chip=none with the console up; relay and ALERT pins never fall back. SYSTem:PINS?, pins_src, ROUTe:STATe?'s relay keys and the staged map's start read the live map, and verified is 1 only while the relays are the rig's. With no record stored, a boot runs the default map, pin for pin as before. The first flash of this image changes the partition table (FW-03's pins): kleidos-meter calibration verify after it, as after any flash. The host harness's board has its INA228 and relay inputs on wires a test moves, and firmware/test/native/test_pin_boot.cpp boots every case. The bench sweep's sense message, over the console's 255 bytes since FW-02, is two messages again, and a test holds every message of the sweep to the line.
  • A second record log, for the pin map (FW-03). Record logs keeps a state, a buffer and an Acceptor for each of two logs the caller names (flash_log::Log::Calibration, Log::Pins); the calibration's log, its place and its behavior are unchanged byte for byte. firmware/partitions.csv gains pins (data, 8 KiB at 0xB000, right after calib), and the static region check admits each log's two sectors and nothing between or across them. firmware/src/pinmap_store.h keeps the pin map as a 44-byte record of that log (magic PINM, version 1, the board table's digest, the map), and reads as no record, so the default map, any record of another layout, version or table, with a pull or level byte that names no value or a byte of padding that is not zero, or with a map pinmap::validate() refuses, and a refused record newer than the map stored. The boot loads it from FW-04 and SYSTem:PINS:APPLy saves it from FW-05; the first flash of this table over an earlier image leaves 0xB000 as it was, which the log reads as no record. The host tests cut the power after every byte of every write and erase of each log's run and read the other log back after each cut (docs/testing.md); seven mutants (scripts/mutants/FW03-*.patch) are each killed.
  • The wire contract of the pin map and of the averaging override, on both sides at once (FW-02). kCommands gains the thirteen rows with their final flags and counts; SYSTem:PINS:PENDing? reports the staged map and pinmap::validate()'s verdict (valid problem at), so staging SDA on GPIO45 reads valid=0 problem=reserved at=sda, one pin for two roles problem=shared at the later role and ALERT on GPIO39 problem=too_high at=alert, and a refused staging queues one error and stages nothing. The simulator answers every new row as the firmware does, its rules a port of validate() driven by board_pins.json and held to every line of golden/pinmap.vectors, and the conformance suite's exact cases hold the staging's answers byte for byte between the simulator and the native bridge. The simulator also answers SENSe:CURRent:APERture? and SENSe:AVERage:COUNt? now, which it had in its undefined set. The command sweep, the golden transcript (a session of its own, so the earlier sessions keep their bytes but for the appended keys), the every-command heap session and the bench heap sweep's families (pins, and the averaging settings in sense) take the new rows. The image allocates nothing more: the staged map is a member of the console's static object.
  • The board's pin table, and the one definition of a pin map's rules (FW-01). firmware/board/pins.toml is the carrier board pin by pin: every terminal of both rails as docs/carrier-board.md §2 lists them and the GPIOs the module does not break out, each with its class (free, caution, reserved), the reason for it and the sentence the panel will show, what each role needs of a pin (ALERT below GPIO32, the one status register its handler reads) and the default map, the rig as wired (rev D). scripts/gen_pin_table.py writes firmware/src/pin_table.h and the panel's copy, host/kleidos_meter/board_pins.json, with the same CRC-32 of the table's canonical text; --check runs in the commit hooks, so in CI's hooks job, and in scripts/run_tests.sh, and tests/firmware/test_pin_table.py holds the board page's two rail tables to the rows. firmware/src/pinmap.h holds the pin map, its default and the rules, validate() (a role with no pin, a number that is no GPIO, a reserved pin, a pin above the role's limit, two roles on one pin, the address, the clock, in that order) and parkedSet(); static_asserts tie the default map to the wiring the image runs on (main.cpp, relay.h, sampler.cpp), refuse every pin of kReservedPins and both LED lines for every role, and hold the default map's parked set to kParkedPins. firmware/test/native/golden/pinmap.vectors is every verdict the other copies of the rules must give. Nothing drives a pin from the map yet, and the image does what 0.17.0's does. The board page now says GPIO38 is held low by the firmware, as status_led.h does since 0.1.0, where it said free.

The documents (docs/panel.md, docs/carrier-board.md, docs/relay2-click-wiring.md, docs/testing.md).

  • The panel's images are taken by script and held by test (DO-01). scripts/take_panel_shots.py takes every view from serve --sim in a fixed scenario, dark and light at 1280 px and dark at 390, and the states the pages explain; docs/images/panel/manifest.json records what shapes each view, and tests/firmware/test_panel_images.py and the browser test name the image to take again when a view changes. A view whose text holds an absolute path is refused.
  • One section and one image per view (DO-02), and sections for the chart, the pin view and the INA228's noise reduction; the README and the usage guide show the Live view once.
  • Which relay to fit as Relay 2 (DO-03): a solid-state PhotoMOS such as the Relay 2 Click's LCA717, not an electromechanical relay such as the HW-316's, the same sentence in the panel and in both wiring guides, with the LCA717's off-state leakage quoted from its data sheet and its cost worked out for this rig; docs/carrier-board.md says which pins each role may take, held to firmware/board/pins.toml.
  • The rig's drawing instead of photographs to take, and no temporary load (DO-04): the Click's guide points at hardware/rig.kicad_sch rev D and hardware/rig.svg, and a guard fails a line that lists photographs to take or names the temporary 100 Ω load on GPIO16 without saying it was removed.
  • The bench images, and the figures of record (DO-05). The Live, Pins and Calibration and health views over the cable to the meter on 0.18.0's image of record (elf=80a257970e934ff6, 2026-11-26) are filed under docs/images/panel/bench/ by scripts/file_bench_shots.py, listed as kind bench with their date, ELF and file digest, and captioned in docs/panel.md; docs/testing.md gives the release tree's coverage and mutant figures. No tracked file holds an e-mail address.

The review of 2026-11-26.

  • A wrong relay level is seen at rest, and swapped relays fail the null path. An apply that moves a relay reads the shunt before the move and after its proof: from 2 mA, a share that falls to three quarters or less (a lead opened, or the bypass closed, by an active level that energizes the part when the relay is meant released) puts the last good map back with one 117, reason=rest, the two readings in its vs_pv=; under 2 mA it cannot be seen, the map is kept and SYSTem:PINS:DEFault is the way back (docs/scpi.md, "The pin map"). ROUTe:NULLpath ON's K2 step must leave the shunt at least a sixteenth of its share as well as at most three quarters: a share that falls to nothing is a lead that opened (Relay 2 driving Relay 1's part, as relays swapped onto each other's wires with matching levels do) and is refused with 103, the shunt lost all of the dut's current; a lead known not to have opened is named first. The simulator models both, the panel's Apply confirmation says so, and three mutants (RV-closeaddr, RV-restcheck, RV-sixteenth) are killed, the first by a new case for a bus that forgets its pinned address when a move closes it.
  • The report's headline counts what ran. scripts/test_report.py prints N passed, S skipped, F failed of T tests and where the skipped run instead, where it counted the skipped as passed (4031 of 4031 tests passed with 47 of them skipped).
  • Three slips of wording. The Runs view says 1 run for one; the LCA717's 30 MΩ is cited as derived from the data sheet's page 2 (30 V over 1 µA), in the panel, docs/relay2-click-wiring.md and docs/rig-wiring.md alike; and the trademark note every image and the rig's PDF carry names the brand repository's TRADEMARKS.md, with its address, where it named a file this repository does not have (rig.pdf exported again in KiCad 10.0.8's container, its drawing unchanged).
  • Nothing the page scrolls to hides under the status bar. From 720 pixels the bar is sticky and the page's scroll padding is its height, so a pin focused with the arrow keys and a view's own link stop below it (WCAG 2.2 SC 2.4.11); on a phone, where it took a third of the screen, it scrolls away with the page; and the Pins view's description box is last in its column and stays in view beside the lower pins on a wide screen.
  • The chart's cost and resolution are bounded and named. A smoothing window is never longer than twice the view (1 s on a 1 ms view took 134 MB of buffers; the caption names the window drawn), the reduction's buffers shrink again, every lane is reduced in one pass, and a frame waits twice what the last one cost, so drawing never takes more than half the page's time; a held chart is not redrawn for samples past it. A run's history names its buckets in the caption (run buckets 900 ms) and in the view's export (source_resolution, bucket_us), and a zoom stops at one bucket per pixel column.
  • Every module of the page is measured. The JavaScript coverage gate counts all nineteen modules: the two pure ones stay at 100 % of their functions and blocks, the seventeen that draw on the DOM are held to floors that only rise, the gate printing what they leave, and pins.js's and noise.js's untaken blocks are each named with why.
  • A live row is never counted twice. When the line was slow enough for the batch thread to close a row before its last channel came (two batches, 40 ms in the tests' hub), that channel opened a second row of the same time, so a page that fell behind counted one row more than the capture had (host/tests/test_panel_live.py, seen once in CI); a channel that comes after its row closed is now dropped from the live view, the recorded run unchanged, with a test and a host mutant (RV-latechannel).

0.17.0 (2026-11-24)

The firmware allocates nothing from app_main()'s first line on, and the meter has a panel on the PC, over the cable. The images built on the way reported fw=0.16.6 and are told apart by elf=, and the counts an entry below states are those of its own work package's image; the release's, with its bench acceptance and its ELF digest, are in docs/misra.md, "The run of record".

What the Kleidos QA harness must know.

  • After the first flash of 0.17.0 over an earlier image, kleidos-meter calibration restore. The calibration moved from NVS to the firmware's own record log (FW-16, below) and nothing reads NVS any more, so the first boot reports q=uncal and kleidos-meter calibration verify answers working_copy_lost until the registry's copy is written back. The nulls are session state and are taken again, as after any flash. A later flash of 0.17.0 or a newer image keeps the log, unless it erases the whole flash.
  • DIAGnostic:HEAP? ends with four new keys (pre_main_allocs pre_main_frees allocs_since_main frees_since_main, FW-07); the earlier keys keep their places, maint_allocs, maint_frees and free_spiram read 0 and armed always 1. MeterLink reads none of them.
  • Every parameter past the most a command takes is -108 (FW-30), where most commands ignored it; MeterLink sends no such unit. -363 is queued once per message an overrun discards (FW-12).
  • The host tools hold the port. kleidos-meter, in every form, opens the CH343 port exclusively, as MeterLink already does: whichever comes second is refused at once. While kleidos-meter serve runs, a QA run reaches the meter through its passthrough (--scpi-passthrough, socket://127.0.0.1:5025) with a client that opens a pyserial URL; MeterLink opens a device node only, so for it serve is stopped first.
  • Hold a long dump to its CRC-32 and ask again. The line has no flow control, and on 2026-11-24 a full ring's TRACe:DATA? SCALed (36.6 MB) reached the host damaged, or short, the first time it was asked for in both sessions of the acceptance that reached it, whole the second time (docs/testing.md, "A damaged dump is the line's"); RAW is a tenth of the size, and is the one the host tools read.
  • No key, command, record or error number is removed or given another meaning. INITiate no longer has its -221 stream too fast, which no profile could reach (FW-27).

On the host: the panel and its process (docs/panel.md, docs/http-api.md, host/README.md).

  • kleidos-meter serve, the panel on the PC over the cable: one process, the standard library and pyserial, the only opener of the port while it runs. It serves the panel's page (plain ES modules, no third-party JavaScript, its chart on its own Canvas) and a JSON HTTP API on 127.0.0.1:8040, the live samples, marks, status and errors as Server-Sent Events, and a schema of every setting, sequence and route, with what each route takes and answers (GET /api/schema). It starts by taking a snapshot of the capture-shaping settings and writes back what it changed on the way out; it never sends *RST and never changes FORMat.
  • One button per measurement sequence (HEALTH, NULL_RELAY, NULL_LEAD, STATE, SLEEP, TRACE, BURST, COLD_BOOT, CAL_VERIFY, CAL_RESTORE), each with a cleanup that runs whatever happened and leaves the relays on the shunt. The shunt is shown with the registry's value and uncertainty, and an override is taken only with a stated tolerance or uncertainty, under a "Not quotable" banner until the registry's copy is restored.
  • The exclusive open. Every host tool opens the port with an flock (SerialTransport(exclusive=True), the default) and a second opener is refused with PortBusyError, told which serve holds it; until now two openers each lost some of the other's lines. SerialTransport also opens a pyserial URL.
  • The SCPI passthrough (serve --scpi-passthrough [PORT]): one TCP client at a time on 127.0.0.1, byte for byte in both directions, the panel a monitor meanwhile and the settings serve changed written back before the line is handed over.
  • Recordings: every capture serve owns is a run directory (stream.txt, trace.raw with its CRC-32 checked, meta.json), exported as text, CSV or JSON, and refused inside a git work tree; kleidos-meter capture records one with no panel. protocol.decode_dump() decodes a RAW or SCALed ring dump to columns, a RAW one to the integers the SCALed one prints.
  • The passthrough refuses a web page. A cross-site fetch() to http://127.0.0.1:5025/ from any page reaches the passthrough as an HTTP request whose body lines are program messages, past every guard of the panel's HTTP API; one with ROUT:LEAD OPEN,FORC in its body opened the DUT's lead. The client's bytes now reach the instrument a whole line at a time, each looked at first, and a client that writes a line of an HTTP request is dropped there with nothing from it sent (docs/panel.md).
  • The page keeps its events, stays quiet and takes only what serve takes. An answer of /api/events that is not a stream (serve's 503 at its 8 streams, or while it closes) closed the page's EventSource for good, and the page froze while saying it reconnected; it now opens a new one after 1 s, doubling to 15 s. The chart's readout, a live region rewritten each second while it follows a capture, is announced only after a pan, a zoom or the crosshair, not for the whole capture. The run and mark label fields took 200 and 64 characters where serve takes 80 and 15 (and no space or ,;="' in a mark): their limits now come from /api/schema (max_length, pattern of each argument), so a mark is not refused after the click.
  • A header ends where the firmware ends it. The firmware ends a unit's header at a space, a tab, a carriage return or a newline (chars::isSpace), and runs SENS:PROF<TAB>SLEEP as it runs SENS:PROF SLEEP; the simulator, serve's executor (an acquisition's time-out, the settings a message changes, which serve hands back on the way out and before the passthrough) and its schema split on a space alone, so the simulator answered -113 and serve took a tab-separated MEAS? for a 5 s query and a changed profile for none. All of them now split as the firmware does (sim_table.split_header()), and the conformance suite asks both with a tab.
  • The simulator's null reports are the firmware's (DO-05): CALibration:ZERO:RESult? carries profile, n_expect and samples while the window is open, n counted at the profile's period, and the relay tokens of the circuit the window was opened in, as cmdZeroResult writes them; it answered n_expect=74 path=none and n=74 path=<path> before. Nothing changes on the wire. host/tests/test_scpi_doc.py sends the SCPI command set's worked session to the simulator and holds every answer to the bench's keys.
  • A message with a quote left open is refused unsent (the review of 2026-11-24, P2). Both the firmware and serve split a message only outside quotes, so the ;:SYST:ERR:ALL? serve appends after an open quote was quoted with it: the message got no answer to match, and every request stalled for the class's time-out before the line was resynchronized; GET /api/query let any page do it. serve now refuses such a message on every route, as it refuses one the instrument would discard.
  • What the instrument queues on its own is an event, never the next request's error (the review of 2026-11-24, P1). Every message serve sends ends with ;:SYST:ERR:ALL?, so a hold's release (113 to 115), relays a reset released (116) or an overrun's -363, queued since the last poll, came back in whichever message was next: a read of the settings, the relays or the health answered 409 with an error it had not caused, and the notice reached neither the event stream nor the running capture's meta.json. The executor now takes those codes out of a caller's reply and gives them to the listeners as DeviceErrors.
  • A run is exported only once it has ended (the review of 2026-11-24, P3). An export asked for while its run was recording was made from the partial stream.txt (or before a ring run's trace.raw existed) and kept, and every later export of the run served that short file. GET /api/runs/<run>/export now answers 409 (recording) for the run serve is still writing, /api/runs says which one that is (recording), the page offers its exports only once it has ended, and each export is written under a name of its own before it replaces the kept one, so two requests at once no longer write one file.
  • POST /api/scpi says which of its lines ran when a later one fails (the review of 2026-11-24, P4). The route runs its messages one after another and answered only the failure when one after the first timed out (504), found the queue full (503, Retry-After: 1), found the line down or handed over, although the lines before it had already changed the instrument; a client that honored Retry-After sent the whole body again and ran them twice. It now answers 200 with the replies of the lines that ran, failed (message, error, detail) and unsent, and no Retry-After; the console writes the same. A failure of the first line, before anything ran, answers as before.
  • A second Ctrl-C no longer cuts serve's hand-back (the review of 2026-11-24, P5). serve put the default handlers back as soon as the first signal stopped it, so a second Ctrl-C during a cleanup that can last minutes raised KeyboardInterrupt in the middle of it, and a second SIGTERM killed the process: a window it opened stayed open and the settings it changed were not written back. Its handler now stays until the port is released: a second signal says the hand-back is still running, a third abandons it, says so and exits 1.

The firmware, work package by work package.

  • DIAGnostic:HEAP? counts by phase, from the first allocation of ESP-IDF's startup (FW-07). Four keys at the end: pre_main_allocs and pre_main_frees, what ESP-IDF allocated and freed before app_main()'s first line, and allocs_since_main and frees_since_main, every allocation and free since, the boot's and maintenance's included. On 0.16.6's image, once the boot has settled: 39, 4, 79 and 31. The keys of 0.7.0 keep their places and their meaning.
  • A census build (FW-07): the image compiled with METER_HEAP_CENSUS defined (PLATFORMIO_BUILD_SRC_FLAGS=-DMETER_HEAP_CENSUS, no environment of its own) keeps each heap event in a static ring of 384, with its size, capabilities, block, phase and the call sites above the hook, and answers DIAGnostic:HEAP:CENSus? and DIAGnostic:HEAP:CENSus:EVENt? <n>; every other image answers them -113. scripts/heap_census.py reads the ring and prints the census by site and by the firmware function that caused each event.
  • The ALERT pin's interrupt routed without ESP-IDF's GPIO ISR service (FW-09): allocs_since_main reads 3 fewer once the boot has settled (76, or 75 when NVS has a page fewer to load, with frees_since_main 31 or 30), the service's handler table and the interrupt allocator's record and vector for its line gone. The firmware picks a free level-1 line of Core 1 from the CPU's own tables, sets its handler, routes the GPIO's source to it and enables it, and reads and clears the pin's status at the register (docs/architecture.md §5.1). Pacing, *TST? and every report are as before.
  • The LED's off frame written on the RMT's registers, without ESP-IDF's RMT driver (FW-10): allocs_since_main reads 52 and frees_since_main 8 once the boot has settled (24 and 23 fewer than FW-09's first boots), the driver's channel, queue, group, encoder and interrupt gone. Transmit channel 0 sends one 0 bit from its own RAM in loop mode, 96 passes counted and stopped by the hardware, polled, with no interrupt (docs/architecture.md §8). SYSTem:LED? reports the same waveform as before (t0h_ns=300 t0l_ns=950 res_us=1000), which a loopback capture on the meter confirmed to the 12.5 ns tick; the boot takes about the same 4 ms over the two lines. Nothing else changes on the wire.
  • The watchdog is the firmware's own, on the timer ESP-IDF's task watchdog used (FW-11): CONFIG_ESP_TASK_WDT_EN is off, and Timer Group 0's main watchdog timer is set through its low-level layer for a system reset 5 s after its last feed, fed only once the console, the sampler and Core 0's idle task have all checked in (docs/architecture.md §5.1). Nothing is allocated: allocs_since_main reads 2 fewer (the task watchdog's two subscriptions) and pre_main_allocs 4 fewer (its object, Core 0's idle entry and its interrupt's two records). A starved task now resets the chip instead of panicking; the reset reason is the same (SYSTem:HEALth? reset=task_wdt), and DIAGnostic:WATChdog? and DIAGnostic:WATChdog:TEST keep every key and meaning. A console that spins without blocking is now caught too, through Core 0's idle task.
  • A full ring's TRACe:DATA? no longer resets the instrument (FW-11). The dump formats its rows twice, first only to count the block's bytes, and that pass neither checked in with the watchdog nor blocked, so for a full ring (about 5.6 s on the meter) it starved the console's check-in and Core 0's idle task past the 5 s timeout; the same held under the task watchdog since 0.14.0. The counting pass now checks in, and every check-in of the console blocks for one tick (a millisecond in a hundred).
  • The console's UART0 on its registers, without ESP-IDF's UART driver (FW-12): allocs_since_main reads 15 fewer once the boot has settled (35, with frees_since_main 8), the driver's object, receive ring buffer, event queue, mutexes and interrupt records gone. The port is set through its low-level layer, its interrupt routed to a free line of Core 0 with nothing allocated, received bytes go to a static ring of 1,024 bytes with the 128-byte FIFO behind it, as before, and the transmit is polled (docs/architecture.md §4.2). A line that takes nothing for 10 ms now ends the write it holds, counted as dropped=, where the driver would have waited for ever. Rate, frame, pins and every response are as before.
  • A receive overrun queues one -363 per message it discards (FW-12). A dump looks for a loss at every row, and until now queued one -363 for each FIFO overflow a long burst caused while it ran; and the mark that the next message lost bytes was cleared when the message that found it (the dump's own) ended, so the tail of the burst ran as a message of its own, or was refused again as too long. The loss now marks the message it fell in until that message ends, and is reported once.
  • The INA228's bus is the firmware's own I2C master, without ESP-IDF's I2C driver (FW-14): allocs_since_main reads 12 fewer once the boot has settled (23, with frees_since_main 8), the driver's bus object, semaphores, queue, handle slot, device object and interrupt records gone, and a change of the bus clock (SYSTem:COMMunicate:I2C:FREQuency, and *RST when the clock is not 400 kHz) allocates and frees nothing, where it removed and allocated the device handle again (2 allocations and 2 frees, counted as maint_). Every transaction is made on Core 1 as before, the console's through the IPC task, and polled there to its end on I2C0's registers with no interrupt; the clock is a rewrite of the timing registers, still any rate from 50 kHz to 1 MHz (docs/architecture.md §2.4). The protocol does not change; a NACK reports i2c ESP_ERR_INVALID_RESPONSE, as ESP-IDF's driver did. On the bench, 0.16.5's acceptance repeated: on FW-12's image (ELF b7f6e739ae8cee1f) and then on this one (ELF 45c88011a4310051), 2026-11-22, the T-Deck asleep behind the shunt at about 44 µA: 100 of 100 *TST? answered 0; 20 scans at each of 400, 100 and 50 kHz listed 0x40 alone; 200 rounds of DIAGnostic:REGister? 0x3E and 0x3F and DIAGnostic:ALERt? read 0x5449, 0x2281 and memstat=1; 15 s statistics captures of STATE and SLEEP (pace=alert), TRACE and BURST at 1 MHz (pace=timer) with 0 read errors, 0 dropped and 0 stale edges, pace_err_ppm +86, +87, 0 and 0 (+90, +88, 0 and 0 on FW-12's image); the null path's STATE floor sd_na 18.85 µA (18.81 and 18.86 on FW-12's, 19.0 filed with the radio off); and three clock changes left every count of DIAGnostic:HEAP? as it was, where on FW-12's image they added 6 allocations and 6 frees (tests/bench/test_i2c_bench.py). The heap sweep, the UART suite and the watchdog's forced reset pass on it too.
  • The calibration is kept in the firmware's own record log, not in NVS (FW-16). A calibration save (SENSe:CURRent:SHUNt, SENSe:CURRent:SHUNt:RANGe<n>, CALibration:TAG, CALibration:DATE, CALibration:VBUSside, a stored null) appends one record to an append-only log over two 4 KiB sectors of a new calib partition at 0x9000 (firmware/partitions.csv, which holds only it and the image: no NVS, no PHY data), through esp_flash_* from a static buffer, with ESP-IDF's flash region check linked onto a static table that allows those 8 KiB alone (docs/architecture.md §3.7). A save allocates nothing and frees nothing, where it allocated and freed 10 to 26 of each inside NVS, counted as maint_; maint_allocs and maint_frees keep their places and read 0 from now on. allocs_since_main reads 0 once the boot has settled and frees_since_main 2 (23 and 8 from FW-14: NVS's initialization, its handle and what they took), the two frees being the idle task's of the main task's stack and control block, and pre_main_allocs reads 31, 4 fewer; on the meter on 2026-11-23 (ELF f30fed2a5e870da3) the first boot, the registry's restore and every later save read so. The first boot of this image starts uncalibrated (q=uncal, kleidos-meter calibration verify answers working_copy_lost): it does not read NVS, and kleidos-meter calibration restore writes the registry's working copy back; an app flash after it keeps the copy, as before. A stored record whose shunt is outside 0.05..0.2 Ω, or of another layout, is refused as a record whose CRC fails (the record before it stands, else the defaults); a save of such a value writes nothing and queues 106. 106's detail reads calibration write failed (live until reboot) (it read nvs write failed). *TST?'s bit 128 reads the log again: a read that fails, or a refused record no older than the one held. The build now holds only the firmware's component and what it requires (firmware/CMakeLists.txt, COMPONENTS), so neither NVS, nor operator new and delete, nor the C++ exception runtime and its eh_globals, nor any radio component is linked or built (scripts/check_heap_objects.py --elf).
  • The console is the main task, and the heap is counted from app_main()'s first line (FW-17). app_main() no longer returns: once the boot is done it raises ESP-IDF's main task (main, Core 0) from priority 1 to the console's 5 and runs the console's loop on it, so the console's own static task (meter-console) and its 8 KiB stack are gone, the main task's stack is the console's 8,192 bytes (CONFIG_ESP_MAIN_TASK_STACK_SIZE, 3,584 before), and the idle task no longer frees the main task's stack and control block: frees_since_main reads 0 once the boot has settled (2 from FW-16), with allocs_since_main 0. The 0.7.0 steady state starts at app_main()'s first line too, where it began a quarter of a second after the console's announcement: armed reads 1 whenever the instrument answers, and allocs_after_init and frees_after_init count what allocs_since_main and frees_since_main count (the same window, which now includes the boot; the healthy value is still 0). Every key keeps its name and place; SYSTem:HEALth?'s stack_console reads the main task's stack. What the port receives between the UART's start and the announcement is still discarded. A console whose UART cannot come up leaves app_main() waiting for good after its ROM line, where it returned. On the meter (ELF 41f60a8bc5d49b06, 2026-11-23): pre_main_allocs=31 pre_main_frees=4 allocs_since_main=0 frees_since_main=0 at the boot and after every command family of the bench suite, the watchdog's reset and a full ring's dump, and stack_console 6,012 bytes free after them (0.16.6's image: 5,160 after the same sweep).
  • ESP-IDF's startup allocates 16 times, where it allocated 31 (FW-18): pre_main_allocs reads 16 and pre_main_frees 4, each a row of docs/misra.md D1. PSRAM is mapped but no longer a heap (CONFIG_SPIRAM_USE_MEMMAP): free_spiram reads 0, the TRACE ring keeps its 4 MiB, and the 32 KiB internal reserve ESP-IDF set aside for it is free memory again (largest_internal 32,768 bytes higher, min_free_internal 36,780 higher on the meter). PSA's startup initialization, which nothing used, and the idle tasks' stacks and control blocks are linked wrapped onto static answers. ESP-IDF's brownout handling is off and the firmware arms the detector itself, as ESP-IDF does without an interrupt: a hardware reset at the same 2.44 V level, still reported by SYSTem:HEALth? as reset=brownout. Nothing else on the wire changes.
  • A bench suite (tests/bench, --run-bench): it takes the bench lock, reboots the meter and runs every command family, and holds the boot's counts and what each family adds to heap_expectations.toml, which only falls.
  • No allocator reachable from the firmware's own code, by the image's call graph (FW-19). scripts/check_heap_reachability.py (CI's firmware job, pyelftools 0.33) builds the linked image's call graph from its relocation records and fails when any allocator is reachable from any of the firmware's functions; firmware.elf now keeps those records (-Wl,--emit-relocs), so it is about twice the size, while firmware.bin holds the same bytes as without them (only the ELF's digest, elf=, differs), and the toolchain's objdump -d prints BFD assertions over it that change nothing in its output. The host tests' heap session gives every command of the table and requires allocs_since_main=0 frees_since_main=0 after each, and docs/misra.md states the claim that way, for every operation, with no maintenance deviation left in the register. Nothing changes on the wire.
  • The MISRA register is complete and checked (FW-20). docs/misra.md gains the deviations for 6.7.1 (D9, the thirteen static locals), 4.1.1 (D10, every construct of the sources C++17 does not have: C++20 keywords and library names, GCC's attributes, ESP-IDF's section macros) and the relay bank's RTC record (D11), a "Tool suppressions" table with every NOLINT, cppcheck-suppress and .cppcheck-suppress entry and its reason, and "The counts": D2's printf-style calls, D3's C arrays and their decays to a pointer (7.11.2, a count that only falls), and D5's discarded results by the function called. scripts/misra_register.py reads each from the sources and tests/firmware/test_misra_register.py holds the page to them; D4's recursion bound and 6.7.2's sentence are corrected. cppcheck's global unusedFunction suppression is gone: scripts/ast_census.py reads the image's translation units together from clang's AST and fails a function of the firmware's own that none references (tests/firmware/test_ast_census.py). Its first run reported eight: five dead functions, now deleted (Sampler::pace(), channelFromName(), profileFromName(), the one-argument flash_log::mount(), and calmath::pointsAgree() with the two-point combination only it used, which the host judges), two I2C functions only the host tests call, now named as test seams beside the heap monitor's two, and a function template, which the census now reads with its specializations. Nothing on the wire changes.
  • The mechanical MISRA findings fixed, each behind a gate (FW-21). scripts/misra_rules.py reads the image's translation units from clang's AST and the sources' text, and tests/firmware/test_misra_rules.py fails a finding of 5.13.4 (an unsigned literal's U: sha256.h's constants), 8.0.1 for the conditional operator (the operands of 101 conditional expressions parenthesized), 8.1.2 (the two lambdas name their captures), 8.2.2 for FreeRTOS's tick macros (pdMS_TO_TICKS() and portMAX_DELAY give way to rtos::ticksFromMs() and rtos::kWaitForever, firmware/src/rtos_ticks.h), 8.14.1 (no call that writes state on the right of && or ||: 33 places, each made a statement of its own or its pure callee constexpr), 8.19.1 (no comma operator), 9.4.1 (13 else if chains end in an else), 9.5.1 (28 for loops that were not simple are while loops) and 19.6.1 (every header guarded by KLEIDOS_METER_<FILE>_H in place of #pragma once), with a planted case of each. matchFrom(), the header matcher, is an iterative backtracking search over a fixed stack, so the firmware holds no recursion and no suppression of misc-no-recursion (D4 is gone), and scale::decode20() and decode40() extend the sign in unsigned arithmetic (7.0.4). The parser's and the scale's tests are unchanged. Nothing on the wire changes.
  • No C string function and no character arithmetic in the firmware (FW-22). Names and patterns are carried as std::string_view: the command table's patterns, the profiles', relays' and error queue's names and every keyword list a handler matches (scpi::Parameters::choice() takes a std::span of views; the overload over C strings stays for the parser's host tests, a test seam of scripts/ast_census.py, which can now name one overload of several). Lengths come from size(), prefixes from starts_with(), numbers from std::from_chars, and the 13 strlen(), four strncmp() and two strcmp() are gone with <cstring>. A character's class, its upper case and a value's digit come from firmware/src/chars.h, a constexpr table of 128 entries built at compile time and indexed through std::char_traits<char>::to_int_type(), and its byte on the wire, both ways, from std::char_traits<char>. scripts/misra_rules.py fails any conversion between a character type and another type (7.0.3) and any call of a string handling function of <cstring>, <cstdlib>, <cwchar> or <cinttypes> or an #include <cstring> (21.2.2), each proved on a planted case. The parser's, console's and scale's tests are unchanged and pass; the new cases (test_chars.cpp, test_scpi_views.cpp) hold every byte's class against <cctype> and every bound a number had when it was read digit by digit, and passed against the parser before the change too. Nothing on the wire changes.
  • Fixed-width integers and unsigned bit work (FW-23). The firmware's own code names no standard integer type outside a printf format: members, constants, parameters and loop counters are std::int32_t, std::uint32_t, std::uint64_t or std::size_t, and an ESP-IDF function that takes or returns int meets them by an implicit conversion between two 32-bit types of one signedness (6.9.2). Masks and bit positions are std::uint32_t, and so are the SCPI status registers, the command table's flags, the channel masks and relay::Mask; flag tests and field reads go through bits::hasBit() and bits::field() (firmware/src/bits.h), so no narrow unsigned operand is promoted to int, and every integer literal that meets an unsigned operand carries its U (7.0.5). scripts/misra_rules.py fails an operand whose signedness promotion or the usual arithmetic conversions change, and scripts/misra_register.py any integer type name but the 118 the formats still need (d2.integer_names, a count that only falls until the formatter, FW-24 to FW-26), each proved on planted cases; docs/misra.md D12 records what that reading passes, to confirm against the owner's copy. The relay bank's reset record holds the coil masks in 32 bits, so the first reset after this image replaces an older one finds a record of the old layout, refuses it as noise and reports no relay released by it; every later reset reads as before. The device image is 304 bytes smaller. Nothing on the wire changes.
  • The relay bank's, the LED's, the parser's and the sampler's text written by a bounded writer, not snprintf (FW-24). firmware/src/text.h writes into a caller's buffer through typed appends on std::to_chars (text, a character, decimal integers signed and unsigned, zero-padded and hexadecimal ones, a scaled value, a value in thousandths, a report's key=value), with no format string, no variadic call and nothing allocated, cutting an append that does not fit as std::snprintf did. ROUTe:STATe?'s and ROUTe:RESult?'s relay tokens, the reset release's coil list, SYSTem:LED?, every error's <code>,"<text>;<detail>", every scaled response value and the sampler's refusals at INITiate are written through it; the 13 std::snprintf calls of relay.cpp, status_led.cpp, scpi.cpp and sampler.cpp are gone (d2.snprintf 50 to 37 in docs/misra.md). Nothing changed on the wire: a golden transcript, firmware/test/native/golden/console.transcript, recorded before the change from scripted sessions that ask every query of the command table, provoke every error the host harness can reach and stream and dump every record of both formats, is compared byte for byte in every test run and did not change.
  • The console's own responses, errors and stream records written by the bounded writer (FW-25). Every unit, error and record console.cpp writes is composed through typed members of the console on text.h (openUnit() and respondText() for a unit, respondNumber() for a number, respondMoreText(), openRecord() and endRecord() for a stream record, failText() for an error): *IDN?, the status registers' queries, SYSTem:ERRor? and ALL?, SYSTem:HEALth?, SYSTem:INFormation?, SYSTem:STATus?, SYSTem:LED?, DIAGnostic:WATChdog?, ROUTe:STATe?, ROUTe:RESult?, every refusal of the dispatcher and the relay orders, and the METER, METER_MARK, S and K records of both stream formats. Its 13 std::snprintf calls and its 83 calls of the four printf-style members are gone (d2.snprintf 37 to 24, d2.printf_member_calls 234 to 151); the members, and their four std::vsnprintf calls, stay for the handlers of console_commands.cpp, where they are now defined, until FW-26. The relay bank's, the LED's and the parser's helpers append to a writer (relay::writeState(), relay::writeChannels(), led::writeBlankedList(), led::writeReport()) or take a std::span (scpi::formatError()), the error queue takes a std::string_view, and the console's buffers reach the UART as spans, so 62 of the 194 array decays of 7.11.2 are gone (d3.decays 132). A stream record keeps its 384-byte line budget, cut and never overrun. Nothing changed on the wire: the golden transcript is byte for byte the same.
  • Every command's response written by the bounded writer, and no formatted output left (FW-26). The handlers of console_commands.cpp (the SENSe, SAMPle, FORMat, TRIGger, CONFigure, MEASure, READ, FETCh, INITiate, ABORt, TRACe, CALibration and DIAGnostic families, TRACe:DATA?'s block header and dump rows included) compose their units, errors and records with text.h's writer through the console's typed members, respondScaled() and openError() new among them, and the console's four printf-style members, its 24 snprintf and four vsnprintf calls and its va_lists are gone; app_main()'s fallback, when UART0 cannot be set up, writes its line through the ROM's esp_rom_output_putc() instead of esp_rom_printf(). No array decays to a pointer any more: a buffer travels as a std::span or a std::array's data, a character array as a view. The golden transcript is byte for byte the same, so nothing on the wire changed. clang-tidy now runs cppcoreguidelines-pro-type-vararg, cert-dcl50-cpp and cppcoreguidelines-pro-bounds-array-to-pointer-decay with no finding, scripts/misra_rules.py holds MISRA C++:2023 21.10.1 and 30.0.1 by text, and docs/misra.md no longer lists D2; d3.decays reads 0, the C arrays 71 (from 117) and the standard integer names 0. The dead conversions the formatter left (scpi::formatScaled(), scale::formatThousandths(), chars::decimalDigit(), scpi::matches() on C strings) are removed, and the host tests' branch baseline falls from 102 to 88.
  • Every branch the tests cannot take has a written reason, or is gone (FW-27). What could only ever go one way is now a compile-time fact: sampler.cpp asserts over the profile table that every profile converts the shunt, samples at least once a second and has a positive period, and that every channel at once on a streaming profile fits the stream's 80 % of the line, so SENSe:CURRent:APERture? and FETCh:HEADer?'s vshct_us state the shunt's conversion time without asking, a null window no longer checks for zero samples, the pace error no longer checks its period, and INITiate no longer computes a stream's byte rate: the -221 stream too fast refusal could not be reached by any profile and is gone. DIAGnostic:WATChdog?'s panic is a constant of the build, and CONFigure takes the channels it streams from a table, so the dead Function::Charge label of its switch went with it. Every other side the host tests leave untaken is either listed in firmware/test/native/branch_exclusions.toml with its kind and its reason (33 entries, which may now name the one operand of an && or || they are about) or is one a test can take: 54, the branch baseline (88 before). Nothing on the wire changed.
  • The console's and its commands' untaken decisions are tested (FW-28). firmware/test/native/test_console_sides.cpp takes the 30 sides of console.cpp and console_commands.cpp the baseline counted, each case saying by value what the instrument does there: the OPERation summary in *STB?, the QUEStionable CURRent bit from a clip flag, every DIAG_ALRT flag each way, a range switch whose conversion flag comes after its discard (cnvrf=0, no error), two parts on the bus in a scan, the zero bus and die apertures of TRACE and BURST, SENSe:CHARge?'s overflow, the -230 refusals of FETCh under a capture and before any, a die read that fails at a capture's start (die_mc_start=unknown), the relays unavailable, a refused relay option, a stream without current in TEXT and CSV, the samples and the mark held back while a response is half on the wire, *RST and an aborted measurement under a stop the sampler is slow to acknowledge, pace_fallback while a capture runs, a lead cycle that falls due while the loop works, a dump clamped at the ring's end, a blank store, and the calibration from the nulls and a measured shunt to q=cal and, 6 C warmer, q=stale. Two sides have a written reason instead: a unit as long as the whole response buffer, which no handler composes, and alatch=0 in a header, which no capture leaves. The harness's INA228 model gains a conversion flag that comes late and a second part on the bus. The branch baseline is 24 (54 before). Nothing on the wire changed.
  • Every branch the host tests leave is a test or a reason: the baseline is 0, and the mutants are a script (FW-29). firmware/test/native/test_sampler_sides.cpp takes the last 24 sides by value: DIAGnostic:REGister? on every register at its own width, a range switch that waits TRACE's 280 us when the device converts with TRACE's word, a TRACE capture whose closing or opening boundary reads 6 C warmer and so q=stale (the audit's mutants F2 and F2b), the ALERT interrupt that asks for a switch only when the sampler waits, *TST? after a stop the sampler did not acknowledge (32, the probe not asked of a loop still running), a null window that cannot start and one a reset closes unacknowledged, the die's age at the instant it is noted, a threshold mark that meets a full stream queue, and every window of docs/scpi.md at min-1, min, max and max+1 (F9); the parser's cases in test_scpi.cpp take leading spaces, the int64 edge at 2^63 and the path buffer's edges, and the parser's own bound past 2^63, which nothing reaches, is a static_assert. The 22 checks of READ, FETCh and MEASure that asked only for an answer now ask for the simulated circuit's value (F3). branch_exclusions.toml's baseline is 0. The harness reports an interrupt's wake only to a task blocked on the semaphore and counts each portYIELD_FROM_ISR(), and stalls a task by name. scripts/run_mutants.sh applies each scripts/mutants/*.patch (the audit's F1 to F11 and F2b, FW-28's and FW-29's, 31 in all) to a copy of the firmware and requires the host tests to fail on it; tests/firmware/test_mutants.py holds every patch to today's sources. tests/firmware/test_meter_quality_has_evidence.py reads the code with its comments removed. On the wire: *ESE, *SRE, STATus:OPERation:ENABle, STATus:QUEStionable:ENABle and DIAGnostic:REGister? refuse a number past their window, and TRACe:DATA? a count of 0, with -222 (data out of range), as every other window does and docs/scpi.md says, instead of -224.
  • A parameter a command does not take is refused, whatever the command (FW-30). Each entry of the command table carries the most parameters its command takes, and a unit that gives more is -108 before anything is done (SENS:PROF takes at most 1 parameter); until now only a command that takes none, CALibration:DATE and a unit of more than 8 refused one, and the rest ignored the parameters past theirs. TRACe:DATA? with no form written takes two numbers, and refuses a third. CONFigure and MEASure of anything but the current, and CALibration:DATE, word their -108 as every other command does. ROUTe:RELay3 and ROUTe:RELay4 read the state they are given before the -241 of a channel the rig does not wire: none is -109, and a word that is no state is refused as one. No host tool of this repository or of the Kleidos QA harness sends such a unit. On the test side, firmware/test/native/test_sweep.cpp runs every entry of the table (144) and holds each to its forms, its one answer, its -108 and -109, its D, R and C and the allocation ledger at zero; scripts/scpi_table.py is the one reader of the table, and tests/firmware/test_scpi_doc_matches_table.py holds docs/scpi.md's command reference to it, header for header, with its flags and parameter counts, which found the STATus commands missing from the reference and CALibration:SHUNt[:MEASure] with a flag the page does not define. make -C firmware/test/native bridge builds the firmware on the process's standard input and output, for the host client's conformance suite (docs/testing.md).
  • The host track's gates, and a simulator that answers as the firmware does (FW-31; the instrument's own answers do not change). The panel, the executor and kleidos-meter serve (the host track, HO-01 to HO-12) are in this tree, and scripts/run_tests.sh runs their suite with the conformance suite on the firmware's native bridge, required. That run found the simulator answering otherwise than the firmware in 11 of the suite's answers and 96 of 190 malformed ones, all now the firmware's: SENSe:PROFile:REPort?, SENSe:CURRent:RANGe:REPort?, FETCh:HEADer?, CALibration:DATA? and ROUTe:RESult? carry every key in its place; MEASure:VOLTage? and :POWer? select STATE on a profile that converts no bus voltage (0.12.0), MEASure:CURRent? reads its range, and any acquisition is the capture FETCh:STATistics? and FETCh:HEADer? then describe; a parameter more than a command takes is -108 and says how many it does (FW-30), a missing one -109, a number where a word is meant -104, a negative or an overlong integer -222, a tag or a label that is no token -224, a null of more than 600 s -222; the deterministic ring dumps the window asked for. Every module of the host package has a branch floor that only rises (host/branch_floors.toml), a test skipped in CI fails the report's gate unless the gate names the job that runs it instead, and CI's Panel (Playwright) job runs the panel's page in a pinned Chromium.
  • ESP-IDF's startup allocates nothing, and frees nothing (the review of 2026-11-24). DIAGnostic:HEAP? reads pre_main_allocs=0 pre_main_frees=0 where FW-18's image read 16 and 4: the IPC and main tasks, the flash lock and the cross-core and tick interrupts are linked wrapped (-Wl,--wrap=xTaskCreatePinnedToCore, xQueueCreateMutex, esp_intr_alloc) onto static slots and the firmware's own interrupt router (firmware/src/startup_memory.h), and the C library's 4-byte environ, the image's one malloc(), onto a static word (-Wl,--wrap=malloc, HM2-04), each wrap refusing what it does not serve; docs/misra.md D1 has no row left. A flash read refuses a destination outside internal RAM, which ESP-IDF would read through a heap bounce buffer (flash_log::port::read()); the log reads only into its own buffer, so nothing a host sees changes.
  • A ring capture whose pointer cannot be written ends with no sample (the review of 2026-11-24, HM2-06). TRACE and BURST write the INA228's register pointer once and then read every sample from it; the start's last read leaves it on DIAG_ALRT, so one failed write (a NACK or a time-out, which the bus recovers) filled the whole ring with DIAG_ALRT's bytes decoded as shunt counts, with read_err=0 and no error. The write is now made again after a failure, three times at most, and if none takes the capture ends at once with no sample and read_err=1; D5 no longer discards its result.
  • The reachability gate reads relaxed calls and the flash drivers (the review of 2026-11-24, HM2-01 and HM2-02; nothing on the wire changes). scripts/check_heap_reachability.py now reads the long calls the linker relaxed to direct ones (R_XTENSA_ASM_SIMPLIFY, 57 sites in picolibc's stdio, among them printf() to vfprintf()), which put the FILE objects' put and get operations (calloc() on first use) and TLSF's printing default walker in reach: each is a cut with its reason and guards. It also walks every flash call through the chip driver and the host driver ESP-IDF's startup installs, besides the os-function table, and lists the ROM's Cache_Invalidate_Addr it then meets.

0.16.6 (2026-11-21)

  • The meter is serial-only, and the hardware it does not use is parked (the owner's ruling of 2026-11-21, after the NW-00 radio A/B failed: calibration/records/radio-ab-2026-11-21.md, and a transmit-power sweep found a null shift of about −0.06 µV even at 2 dBm: radio-tx-sweep-2026-11-21.md). Wi-Fi and Bluetooth were never linked into this image; a web panel, if one is built, runs on the host over the cable. Nothing changes on the wire.
  • The USB-Serial-JTAG is off (CONFIG_ESP_CONSOLE_SECONDARY_NONE, CONFIG_USJ_ENABLE_USB_SERIAL_JTAG=n). Its secondary console had kept the native port's pad and bus clock on, linked its VFS and a connection monitor, and run the monitor's start-of-frame hook from every FreeRTOS tick. Flashing (the ROM's download mode over the CH343) and the console (UART0) are unchanged; the native port's console and JTAG, never used on this rig, are gone.
  • Every broken-out GPIO the firmware does not use is parked at boot, an input with the internal pull-down, after the relays are released (relay.h kParkedPins): GPIO1, 2, 8–14, 16, 17, 18, 21, 39–42 and 47. GPIO16 and GPIO17, the unwired spares K3 and K4, floated from 0.13.0 on. The strapping, flash, PSRAM, UART0 and native USB pins and every pin in use are left alone (docs/firmware-design.md §6.5).
  • scripts/check_radio_absent.py, in CI, fails an image that defines any Wi-Fi, Bluetooth, PHY, coexistence or USB-Serial-JTAG symbol: 0 on this image, 28 on 0.16.5's (all USB-Serial-JTAG), 1,104 on the NW-00 spike's.

0.16.5 (2026-11-21)

  • Every I2C transaction runs on the bus's core, as the scan's have since 0.16.4. The console, on Core 0, still read and wrote the INA228 itself while the I2C master's interrupt runs on Core 1: DIAGnostic:REGister? and DIAGnostic:ALERt?, *TST?'s reads and writes, the null path's V_SHUNT reads, a range change, SENSe:CHARge? and its reset, a capture's and a null's setup and close, and the device handle's re-creation at a new bus speed. A register transfer that meets a NACK from the far core takes the same path in ESP-IDF 6.0.3's driver as a silent probe's, so a breakout that stopped answering once could leave the next read returning zeros as ESP_OK. The driver now makes every call into the I2C master on the core that opened the bus, through esp_ipc_call_blocking() from the other one, one transaction per call, at the caller's priority, so the sampler is never preempted by it; should that core refuse the call, nothing is made and the command reports i2c ESP_ERR_INVALID_STATE (docs/firmware-design.md §3.1.1). The sampler, already on the bus's core, makes its calls in place as before. Nothing changes on the wire.
  • The host harness now latches a far-core NACK's completion for a register transfer as for a probe, and fails every case that makes an I2C call off the bus's core; 103 of the 208 firmware cases failed before the change.
  • On the bench, clean build of this version (ELF 44038b5fc6701826): 100 of 100 *TST? 0; 20 scans listed 0x40 alone; 200 rounds of DIAGnostic:REGister? 0x3E and 0x3F and DIAGnostic:ALERt? read 0x5449, 0x2281 and memstat=1 every time; a range change to 1 and back with rstacc=1 cnvrf=1, MEASure:CURRent? 40.7, 41.6 and 41.6 µA on ranges 0, 1 and 0; STATE and SLEEP statistics captures of 15 s pace=alert with 8 edges, 13,101 and 223 samples, pace_err_ppm +100 and +103, 0 dropped, 0 stale, 0 read errors; a null-path cycle (ROUTe:NULLpath ON, CALibration:ZERO 10, ABORt) stored its window as the null path stores one; allocs_after_init=0, the watchdog's stalls=0, no error queued.

0.16.4 (2026-11-21)

  • DIAGnostic:I2C:SCAN? lists only what answers, and leaves the bus as it found it. Probed from the console's core, every silent address left its STOP's completion latched in the I2C peripheral, and the next transaction took it for its own: the scan listed seven or eight of 0x40…0x4F, a different set each time, at 400, 100 and 50 kHz, every register read after it returned 0x0000 with no error until a *TST?, and a second scan could reboot the chip. The probes now run on the core the bus's interrupt is on, through esp_ipc_call_blocking(), as the bring-up's always did (docs/firmware-design.md §3.1.1). Should that core refuse the call, the scan probes nothing and reports found=- n=0.
  • *TST? no longer fails bit 32 on a working ALE wire. A conversion that ended inside the self-test's ADC_CONFIG write left the pin low with CNVRF already cleared, and the probe's first read, 0.3 ms later, had no flag to clear and could not release it: no edge in the window, in 15 of 69 calls on the bench. The self-test now lets two periods pass after its writes, as INITiate lets one pass and reads four registers before its probe (docs/firmware-design.md §3.5). Nothing changes on the wire.
  • On the bench, clean build of this version: 100 of 100 *TST? 0; 20 scans at each of 400, 100 and 50 kHz listed 0x40 alone, DIAGnostic:REGister? reading 0x5449 and 0x2281 right after each, and 20 *TST? after them 0; STATE and SLEEP statistics captures of 15 s pace=alert with 8 edges, pace_err_ppm +93 and +91, 0 dropped, 0 stale, 0 read errors; allocs_after_init=0.

0.16.3 (2026-11-21)

  • A pacing probe waits for a stop's acknowledgement, as a start does. Since 0.16.2 the probe (INITiate's and *TST?'s bit 32) is a request to the sampler task. After a stop the loop had not acknowledged (107), *TST? still made that request: the loop could not take it until it ended, the console waited out the window and 500 ms for nothing, and the loop then ran the probe on its own, over whatever the console had set up by then, where the next INITiate's probe could take its answer for its own. The probe now says timer at once while the acknowledgement is due, so *TST? sets bit 32 as it did after the wait, and it runs again once the acknowledgement has come (docs/firmware-design.md §3.5). Nothing changes on the wire.

0.16.2 (2026-11-21)

  • The pacing probe runs where the capture runs. The probe that decides pace= at INITiate (and *TST?'s bit 32) ran in the console task on Core 0 and released the ALE pin before arming its interrupt: a read delayed past the next conversion by Core 0's other work, or a conversion that ended between the release and the arm, cost it edges the capture would have seen, and a working wire came out pace=timer. It now runs in the sampler task on Core 1, arms first and then releases, as the loop does (docs/firmware-design.md §3.5). Nothing changes on the wire. On the NW-00 spike's image with Wi-Fi sending 200 kB/s, the console's probe chose timer in 6 of 40 probes as a station and 20 of 40 as the SoftAP, most of them with no edge at all; the sampler's chose alert in all 80, with 8 edges. On the radio-free image, the same day: 80 of 80 probes alert with 8 edges, *TST? 0, STATE and SLEEP unchanged (interval sd 0.81–0.82 µs and 3.49–3.51 µs, 0 missed, 0 extra, 0 stale, allocs_after_init=0).

0.16.1 (2026-11-21)

  • Nothing a conversion executes is fetched from flash. The sampler's loop, the ALERT pin's handler, the INA228 register reads, the I2C master's transfer path and every FreeRTOS call they make run from IRAM, and the profile table from internal RAM (CONFIG_FREERTOS_IN_IRAM, CONFIG_I2C_ISR_IRAM_SAFE, firmware/src/linker.lf, IRAM_ATTR): both cores share the flash cache, and with Wi-Fi sending on Core 0 an alert-paced STATE capture lost up to 17 % of its conversions (NW-00 spike: pace_err_ppm +26,280 to +182,712 at 50 and 200 kB/s; with this change +92 to +97, as with the radio off). Nothing changes on the wire. On the radio-free image, measured against 0.16.0 the same day: STATE's interval sd 6.4–6.7 µs → 0.80–0.82 µs, SLEEP's 4.1–4.8 → 3.5 µs, BURST at 1 MHz 100.014 µs a sample with 7 re-based deadlines in 10 s → 100.002 µs and none, the counts unchanged (0 missed, 0 extra, 0 stale, allocs_after_init=0). IRAM text grows by 15,508 bytes; internal heap free falls from 330,543 to 313,695. scripts/check_iram_hot_path.py, in CI, fails the image on a hot function or constant in flash (docs/firmware-design.md §3.10.1).

0.16.0 (2026-11-21)

  • The hold is the teardown, and an open capture no longer suspends it. Before, the 120 s hold waited for every open capture, so a host that died with a capture or a stream open and the lead open (ROUTe:LEAD OPEN,FORCe, or under a lead cycle's order) left the DUT without its battery, or the null path standing, until somebody came. Now the hold runs out 120 s after the order that left the path, or after the last window closed, whatever is open, and puts the relays back to rest make-before-break. Only a null window that is sampling suspends it (it is bounded, 600 s), and the hold gets its whole time again once the window stops sampling. Any relay order arms it again, one that moves nothing included.
  • A release under a capture is marked in it. Each move is a mark record (METER_MARK mark=hold:k1:closed …, hold:k2:open; a K row in a ring), written into two slots kept beyond TRACe:MARK's 16, so a capture whose table is full still records it. FETCh:STATistics? appends hold_teardowns (the releases while the capture sampled), QUEStionable bit 10 (hold) is set for the open or last capture that had one, and the error's detail says under a capture, marked hold:. A capture that has ended by itself is not marked.
  • path=both is held too, and its release opens the bypass and queues the new error 115 (Bypass opened): every path but the measuring circuit now ends in K1 closed and the bypass open.
  • A reset says what it released. The commanded coils are kept in RTC memory as they are driven; the boot after a reset that keeps it (a panic, a watchdog, esp_restart(), a brown-out) queues the new error 116 (Relays released by reset, a reset (task_wdt) released k1,k2 (path=bypass)) and SYSTem:HEALth? appends reset_released (- for none, and after every power-on).

0.15.0 (2026-11-21)

  • pace_err_ppm measures the samples' own period. The achieved period is the span from the first sample to the last over the intervals between them; it was dur_us / samples, whose span starts at the capture's start, up to a period before the first sample, so it read the start's phase against the first conversion as an error of up to 1 / samples. On the bench (T-Deck asleep, 2026-11-21) 0.14.0 reported +61 to +63 on STATE and +35 to +37 on SLEEP where both streams' own intervals gave +94 to +96, the same oscillator; 0.15.0 reports +94 and +95 on STATE and +90 and +93 on SLEEP, within 1 ppm of the intervals. The key keeps its meaning, the achieved period against the nominal one; only its estimate is corrected. dur_us is unchanged.
  • CALibration:ZERO is refused under a pending ROUTe:LEAD:CYCLe (-221). A null window refuses every contact move, so a window opened during a cycle refused the cycle's reclose (112) and left the DUT without its battery until the hold, 120 s, instead of the cycle's time (bench, 0.14.0: path=none 600 ms after a 300 ms cycle).
  • A forced drift anchor no longer pushes out a regular one. A failed read forces an anchor at the next sample, at most 16 a capture, in an array sized for those beside the 1,024 regular anchors of a full ring: before, one failed read in a full untriggered ring cost the dump its first anchor (index 0) from 0.11.0, and its last one before. read_err= stays the authoritative count.

0.14.0 (2026-11-20)

  • Both tasks are supervised by the task watchdog, and a starved one reboots the instrument (CONFIG_ESP_TASK_WDT_PANIC, 5 s): the console and the sampler subscribe and feed it through their longest work (a dump, an acquisition, a settle, a capture, the idle wait), every relay releases to the measuring circuit on the reboot, and SYSTem:HEALth? then says reset=task_wdt. Before, a hung task left an instrument that answered nothing and never recovered.
  • New DIAGnostic:WATChdog?: console sampler timeout_s panic stalls. New DIAGnostic:WATChdog:TEST: the console stops feeding the watchdog and the instrument reboots; refused while a window is open.
  • A running capture that takes no sample for 2 s (thirty periods of SLEEP, the slowest), queues 107 ("the sampler took no sample for <n> ms") once and sets QUEStionable TIME until the next capture starts.
  • FETCh:STATistics? appends rebased=: how many times a timer-paced loop came more than a period late and re-based its deadline, where before it read the same conversion back to back to catch up.
  • Nothing else on the wire, but every timing figure moves: the image is built at -O2 (it was IDF's -Og), and the I2C and ALERT interrupts run on Core 1 with the sampler (they ran on Core 0 with the console's UART). BURST at 1 MHz keeps 100.01 µs a sample (pace_err_ppm +110 to +130) where 0.13.0 kept 103.5 µs (+35,000); TRACE, STATE and SLEEP are unchanged. Light heap poisoning, the end-of-stack watchpoint and -Wstack-usage=1024 are on.

0.13.0 (2026-11-20)

  • New ROUTe:LEAD:CYCLe <ms>,FORCe[,LIVE]: K1 opened and reclosed by the instrument 1 to 60,000 ms after the opening's drive, timed by its own clock (bench: 50, 200 and 1,000 ms cycles within 110 µs); both moves are marks under a capture. An explicit ROUTe:LEAD or *RST cancels a pending cycle.
  • An open lead is bounded: the hold that releases a standing null path now also recloses a lead left open (path=none) 120 s after its last window closed, and queues the new error 114, "Lead reclosed". Before, an open lead stayed open until a host closed it.
  • K3 and K4 are not wired, and the firmware says so: GPIO16 and GPIO17 are never configured nor driven (GPIO16 stays free for a temporary load relay), the tokens read k3=spare:unwired k4=spare:unwired (they read spare:off), their pads are not checked, and ROUTe:RELay3|RELay4 is refused with -241 (it answered and moved nothing).
  • New host tool kleidos-meter relay-timing: a TRACE capture, LIVE moves of K1 or K2, and the step after each mark found in the ring dump: the contacts' operate and release times at 280 µs resolution, with how clear each step was (docs/relay-timing.md holds the first record).

0.12.0 (2026-11-20)

  • A real *TST?. Besides the bring-up's three bits (1 INA228, 2 sampling engine, 4 relay inputs) it now reads back the INA228's identity and SHUNT_CAL (8), its trim memory MEMSTAT (16), probes the ALE wire with STATE's pacing probe (32), the relay pads (64), the stored calibration (128) and the tasks' stacks (256). It reads the device, so it is refused while a window is open (-221, 112; it answered before).
  • New SYSTem:HEALth?: reset uptime_us elf fw stack_console stack_sampler allocs_after_init frees_after_init hold_released errors, the reset reason as ESP-IDF names it among them.
  • STATus:QUEStionable gains bit 2, time (the open or last capture's pace fell back, a read failed, or pace_unmet), and bit 9, data lost (dropped= above 0); new STATus:QUEStionable:PTRansition, :NTRansition and the same for STATus:OPERation, with SCPI's defaults (every rise, no fall), which STATus:PRESet restores.
  • New error 113, "Null path released", queued when the hold releases a null path by itself.
  • CONFigure and MEASure of the voltage, the power or the energy select STATE when the live profile converts no bus voltage: MEASure:VOLTage? after a boot on TRACE answers instead of queuing -230. READ? and FETCh? configure nothing and are unchanged.
  • The host's kleidos-meter calibration restore without --yes and with no terminal says so and exits 2, where it died on an EOFError; Meter.self_test() and Meter.health() are new.

0.11.0 (2026-11-20)

  • A level trigger with pre-trigger on the ring profiles. TRIGger:SOURce LEVel with TRIGger:LEVel, TRIGger:SLOPe and TRIGger:PRETrigger: the ring runs circular from INITiate until the current crosses the level from its other side, keeps the pre-trigger samples, records the rest of the ring after the crossing and ends the capture by itself. SYSTem:STATus? appends trig=armed|fired|-; FETCh:STATistics? appends trig_n trig_t_us; FETCh:HEADer? appends trig_source trig_level_na trig_slope trig_pre limit. A level on a stream or a statistics-only capture is refused (-221). TRIGger:SOURce IMMediate was the only source before, and is still the default.
  • Indices in a dump are the capture's. After a wrap the ring's oldest sample is index first= (on the opening row), and T n= t= marks the trigger; <from> in TRACe:DATA? is a place among the held samples. An untriggered dump's rows are the ones they were.
  • The dump carries a CRC-32. METER_DUMP_END becomes METER_DUMP_END crc32=<8 hex> bytes=<n>, the IEEE CRC-32 of every byte of the block before it; Meter.dump() raises on a mismatch.
  • Marks in conversion order. On a streamed capture a TRACe:MARK or LIVE relay mark travels the stream queue behind the samples already in it, so it is never written before a sample of a lower index (it could overtake them).
  • New SENSe:CURRent:THReshold:MARK ON|OFF: a streamed capture writes thr_rise and thr_fall mark records at the threshold's crossings, behind their samples, at most 1,024 a capture; FETCh:STATistics? appends thr_marks.
  • New SENSe:CAPTure:LIMit ON|OFF: INITiate ends a stream or a statistics-only capture by itself after SAMPle:COUNt samples.
  • *OPC waits for a window that ends by itself (a ring, a triggered ring, a limited capture, a null) and sets the ESR's bit 0 when it has; with none running it sets it at once, as before. *OPC? and *WAI stay immediate (docs/scpi.md, "Deviations"). *CLS and *RST forget a pending *OPC.

0.10.0 (2026-11-20)

  • The statistics the uncertainty model needs, appended to FETCh:STATistics?: sd_na (the sample standard deviation of the current, from every sample, in 128-bit integer arithmetic), max_n and max_t_us (where the maximum fell), vmin_uv vmax_uv pmin_uw pmax_uw (the DUT's voltage and power extremes on a bus profile), mean_charge_na and charge_us (the CHARGE pair's shunt-corrected mean current over the span between its own two reads), thr_na above_n above_us rises (the threshold below) and batches batch_samples. Every figure is counted in the sampling loop, so a sample the stream dropped is still in it.
  • New FETCh:STATistics:BATCh?: the last capture's batch means, 32 to 63 complete batches of equal size for a capture of 32 samples or more, from which a host estimates the effective sample size.
  • New SENSe:CAPTure DATA|STATistics: a statistics-only capture, no stream and no ring, on any profile for any duration (TRACE's rate for hours). Its header and SYSTem:STATus? say sink=stats; *RST sets DATA.
  • New SENSe:CURRent:THReshold <amps>|OFF and SENSe:CURRent:THReshold:HYSTeresis <amps>: a level the captures count rises and time above against, with hysteresis. *RST sets OFF and 0.
  • FETCh:VOLTage?, :POWer? and :TEMPerature? are means over every sample the sampler took (before, over the samples that reached the console), and FETCh:ENERgy? is the mean power times the capture's dur_us (before, times the samples the console saw, so a dropped sample shortened it). Their meaning is unchanged; on a capture with no drop the figures are the same.
  • CALibration:ZERO:RESult?'s sd_pv keeps the fraction of a count: the variance was truncated to whole counts squared before its root, which read a null's deviation low (to 0 below one count, by up to 1.4 % at six counts); it is scaled first now, as the new sd_na is.
  • After *RST closes a running STATE or SLEEP capture, FETCh:VOLTage? answers that window's mean (it queued -230): the statistics *RST keeps now carry their own sums.

0.9.0 (2026-11-20)

  • STATE and SLEEP are paced by the ALE pin. The pin is held low from a conversion's end until DIAG_ALRT is read, in either ALATCH mode (bench, 2026-11-20, docs/firmware-design.md §3.5), so the sampler now reads DIAG_ALRT after every edge and its probe at INITiate does the same: their headers say pace=alert pace_edges=<7..9> pace_expect=8 where every capture before said pace=timer pace_edges=1. ALATCH = 1 stays (the clip detector), and on STATE that per-sample read now carries a latched SHNTOL/SHNTUL into flags= too (diag_cfg=0xC001 alatch=1 unchanged).
  • TRACE and BURST stay on the host timer and no longer probe: their headers say pace=timer pace_edges=0 pace_expect=0 (pace_expect was 8).
  • An alert-paced sample is stamped at its edge: t= in the stream is when the conversion-ready edge woke the sampler, the conversion's end, rather than when its reads finished.
  • FETCh:STATistics? appends stale_edges=: edges of an alert-paced capture whose DIAG_ALRT read found no conversion ready. They take no sample; samples / (samples + stale_edges) is the fresh-sample ratio. Always 0 on a timer-paced capture.
  • SENSe:CURRent:RANGe waits out the conversion period the device is running, not the selected profile's: before the first capture the device converts at its reset word's 3,156 µs, and the 280 µs wait of TRACE left SENSe:CURRent:RANGe:REPort? reporting cnvrf=0 after most switches (discard_us=3156 now where it said 280).

0.8.0 (2026-11-20)

  • One image. The firmware is built as one image, meter, and it drives the shunt bypass on the MikroE Relay 2 Click (active high on GPIO15) and the lead on the HW-316's K1: the rig as wired since 2026-11-20 (rev D). The images named meter_relay2 from 0.3.0 to 0.7.0 drove this same rig; an image named meter older than 0.8.0 drove the HW-316's K2 instead, and the code for that bypass is gone.
  • SYSTem:INFormation? reports image=meter and bypass_part=relay2click (both keys keep their place and meaning), and ROUTe:STATe? bypass_part=relay2click.
  • The calibration registry accepts image=meter for configuration mjkdz-r100-relay2click from 0.8.0 (firmware.image_aliases) while the events filed under meter_relay2 stay as they were, and ends mjkdz-r100-hw316's meter at 0.7.0 (firmware.max_version); kleidos-meter calibration verify says applied on the rig reflashed with 0.8.0.

0.7.0 (2026-11-20)

  • New DIAGnostic:HEAP?: how many heap allocations and frees the image made since its steady state began, apart from the two maintenance operations that allocate inside ESP-IDF (a calibration save, an I2C clock change), and the heap's free figures. allocs_after_init=0 frees_after_init=0 is a healthy instrument (docs/misra.md).
  • The TRACE ring is a static array, the sampler's from boot: TRACe:POINts:MAXimum? answers 1048576 before the first ring capture too (it answered 0), and a ring acquisition (MEASure, READ on TRACE or BURST) is capped at the ring from the first one (before, the first could ask for more and end in -230). The refusal no memory (ring floor 4096 refused) cannot happen any more.
  • Nothing else changes on the wire. The firmware's own code no longer allocates: its FreeRTOS objects and task stacks are static, and the NVS handle is opened once and kept.

0.6.1 (2026-11-20)

  • Nothing changes on the wire. Two buffers grow to the worst case GCC can prove, found when the host tests first ran under GCC: the sampler's refusal text (a BURST on a slow bus) and the block header of TRACe:DATA?; neither was cut by any value the instrument produces.
  • docs/scpi.md states a limit of 0.6.0: an acquisition looks for ABORt in the console's 1,024-byte inbox only, so an ABORt sent behind more than that of other messages waits until the acquisition ends by itself.

0.6.0 (2026-11-20)

  • An acquisition (MEASure, READ, CALibration:SHUNt) is bounded: SAMPle:COUNt times the profile's period may not exceed 600 s, else -222 and nothing starts (10^6 SLEEP samples were 18.8 hours of a deaf console). SAMPle:COUNt itself still takes 1..1000000.
  • ABORt ends a running acquisition within a sample period: the acquisition queues -230 (aborted after <n> of <count> samples) and answers nothing; the ABORt unit is consumed and everything sent meanwhile runs after, in order.
  • A stop the sampler task does not acknowledge within 500 ms (ABORt, an acquisition) queues 107 and closes the window with no result; a new window is refused with 107 until the task acknowledges. The loop's statistics cross to the console by value with that acknowledgement.
  • New flag C in docs/scpi.md: SENSe:PROFile, SENSe:CURRent:RANGe[:UPPer], SENSe:CURRent:RANGe:INDex, CONFigure:CURRent, SENSe:CHARge?, SENSe:CHARge:RESet, DIAGnostic:ALERt? and DIAGnostic:REGister? are refused (-221, 112) while a window that ended by itself is not yet closed. Before, SENSe:CHARge:RESet on a filled ring zeroed the accumulator between the window's two boundary reads.
  • A byte that is not printable ASCII or a tab discards its program message with -101, naming the byte in hex; it is never stored or echoed, and an error's detail never carries one.
  • Input lost to a full receive ring while the console is busy queues -363 and discards the message the loss fell in.
  • *RST re-creates the I2C device only when the clock is not 400 kHz already.

0.5.0 (2026-11-20)

  • SYSTem:INFormation? appends elf=: the first 8 bytes of the running image's ELF SHA-256, as 16 lower-case hex digits, the digest esptool writes into the image's description; - when the image has none. Which build is on the bench is read from the instrument and compared with the build's firmware.elf.

0.4.0 (2026-11-20)

  • *IDN? reports the instrument's serial in its third field: KM- and ten hex digits, a digest of the factory eFuse MAC (firmware/src/identity.h), 0 when the eFuse cannot be read. Before 0.4.0 the field was always 0.
  • SYSTem:INFormation? appends serial= and image= (meter or meter_relay2).
  • SENSe:CURRent:SHUNt:RANGe<n> and its query: one range's own shunt value. A capture and the charge correction use the value of their range. SENSe:CURRent:SHUNt now also drops any per-range value (a changed meaning, before the rule above was written).
  • CALibration:DATE <year>,<month>,<day> and CALibration:DATE?: the host's calibration date, stored and echoed.
  • CALibration:DATA? appends shunt_uohm_r0, shunt_uohm_r1 and cal_date.
  • The NVS calibration blob goes to version 3; a version 2 blob is still read and rewritten on the next save, so an app flash keeps the working copy.

0.3.0 (2026-11-20)

  • A second image, meter_relay2, drives the shunt bypass on a MikroE Relay 2 Click (active high, 10 ms each way) instead of the HW-316 (docs/relay2-click-wiring.md).
  • SYSTem:INFormation? and ROUTe:STATe? append bypass_part= (hw316 or relay2click).
  • The shunt calibration against a reference resistor: CALibration:SHUNt:REFerence and its query, CALibration:SHUNt[:MEASure], CALibration:SHUNt:RESult?.

0.2.0 (2026-11-19)

  • The instrument moves to its own repository and speaks SCPI-1999 in place of the key=value console of 0.1.0: IEEE 488.2 common commands, a numbered error queue, the status registers, MEASure/READ/FETCh/CONFigure, INITiate/ABORt captures, TRACe:DATA? as a definite-length block, CALibration, ROUTe for the relays and DIAGnostic. Every capability of the old console is kept; the SCPI command set maps each old command to its SCPI form.
  • The stream's TEXT records are unchanged, so recorded meter.log files read as before; a CSV form is added.

0.1.0 (2026-10-26 to 2026-11-19)

  • The console protocol of key=value lines with METER_OK: and METER_ERR: prefixes, while the instrument was the nested project qa/meter/ of the Kleidos firmware repository. The version was never bumped there, so every image of that period reports fw=0.1.0; an image built before 2026-10-31 prints no clip-detector header line (README.md, "The clip detector").

Back to the top